codedna 0.9.0__tar.gz → 0.9.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. codedna-0.9.2/PKG-INFO +401 -0
  2. codedna-0.9.2/README.md +346 -0
  3. {codedna-0.9.0 → codedna-0.9.2}/codedna/__init__.py +1 -1
  4. {codedna-0.9.0 → codedna-0.9.2}/codedna/analyzer.py +0 -2
  5. {codedna-0.9.0 → codedna-0.9.2}/codedna/api.py +1 -1
  6. {codedna-0.9.0 → codedna-0.9.2}/codedna/cli.py +23 -8
  7. {codedna-0.9.0 → codedna-0.9.2}/codedna/db.py +11 -5
  8. codedna-0.9.2/codedna/nl.py +234 -0
  9. codedna-0.9.2/codedna/nl_tools.json +127 -0
  10. {codedna-0.9.0 → codedna-0.9.2}/codedna/scorer.py +2 -1
  11. {codedna-0.9.0 → codedna-0.9.2}/codedna/tech_debt.py +1 -1
  12. {codedna-0.9.0 → codedna-0.9.2}/pyproject.toml +15 -7
  13. codedna-0.9.0/PKG-INFO +0 -577
  14. codedna-0.9.0/README.md +0 -525
  15. {codedna-0.9.0 → codedna-0.9.2}/.gitignore +0 -0
  16. {codedna-0.9.0 → codedna-0.9.2}/LICENSE +0 -0
  17. {codedna-0.9.0 → codedna-0.9.2}/codedna/ai.py +0 -0
  18. {codedna-0.9.0 → codedna-0.9.2}/codedna/ai_box.py +0 -0
  19. {codedna-0.9.0 → codedna-0.9.2}/codedna/ai_fingerprint.py +0 -0
  20. {codedna-0.9.0 → codedna-0.9.2}/codedna/auth.py +0 -0
  21. {codedna-0.9.0 → codedna-0.9.2}/codedna/bus_factor.py +0 -0
  22. {codedna-0.9.0 → codedna-0.9.2}/codedna/demo.py +0 -0
  23. {codedna-0.9.0 → codedna-0.9.2}/codedna/git_hook.py +0 -0
  24. {codedna-0.9.0 → codedna-0.9.2}/codedna/integrations/__init__.py +0 -0
  25. {codedna-0.9.0 → codedna-0.9.2}/codedna/integrations/github_bot.py +0 -0
  26. {codedna-0.9.0 → codedna-0.9.2}/codedna/integrations/jira.py +0 -0
  27. {codedna-0.9.0 → codedna-0.9.2}/codedna/integrations/lemonsqueezy.py +0 -0
  28. {codedna-0.9.0 → codedna-0.9.2}/codedna/interview.py +0 -0
  29. {codedna-0.9.0 → codedna-0.9.2}/codedna/onboarding.py +0 -0
  30. {codedna-0.9.0 → codedna-0.9.2}/codedna/plan.py +0 -0
  31. {codedna-0.9.0 → codedna-0.9.2}/codedna/protection.py +0 -0
  32. {codedna-0.9.0 → codedna-0.9.2}/codedna/rate_limit.py +0 -0
  33. {codedna-0.9.0 → codedna-0.9.2}/codedna/sprint_health.py +0 -0
  34. {codedna-0.9.0 → codedna-0.9.2}/codedna/survey.py +0 -0
  35. {codedna-0.9.0 → codedna-0.9.2}/codedna/webhooks.py +0 -0
  36. {codedna-0.9.0 → codedna-0.9.2}/dashboard/.env.local.example +0 -0
  37. {codedna-0.9.0 → codedna-0.9.2}/dashboard/.gitignore +0 -0
  38. {codedna-0.9.0 → codedna-0.9.2}/dashboard/Dockerfile +0 -0
  39. {codedna-0.9.0 → codedna-0.9.2}/dashboard/README.md +0 -0
  40. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/ai-compare/page.tsx +0 -0
  41. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/api/auth/login/route.ts +0 -0
  42. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/api/auth/logout/route.ts +0 -0
  43. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/api/auth/me/route.ts +0 -0
  44. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/api/auth/register/route.ts +0 -0
  45. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/api/billing/checkout/route.ts +0 -0
  46. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/billing/page.tsx +0 -0
  47. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/bus-factor/page.tsx +0 -0
  48. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/commits/page.tsx +0 -0
  49. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/debt/page.tsx +0 -0
  50. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/favicon.ico +0 -0
  51. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/feedback/page.tsx +0 -0
  52. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/files/page.tsx +0 -0
  53. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/fonts/GeistMonoVF.woff +0 -0
  54. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/fonts/GeistVF.woff +0 -0
  55. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/globals.css +0 -0
  56. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/interview/page.tsx +0 -0
  57. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/layout.tsx +0 -0
  58. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/login/page.tsx +0 -0
  59. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/onboarding/page.tsx +0 -0
  60. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/page.tsx +0 -0
  61. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/pricing/page.tsx +0 -0
  62. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/protected/page.tsx +0 -0
  63. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/register/page.tsx +0 -0
  64. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/repos/page.tsx +0 -0
  65. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/settings/integrations/page.tsx +0 -0
  66. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/sprints/page.tsx +0 -0
  67. {codedna-0.9.0 → codedna-0.9.2}/dashboard/app/trends/page.tsx +0 -0
  68. {codedna-0.9.0 → codedna-0.9.2}/dashboard/components/AuthProvider.tsx +0 -0
  69. {codedna-0.9.0 → codedna-0.9.2}/dashboard/components/ClientProviders.tsx +0 -0
  70. {codedna-0.9.0 → codedna-0.9.2}/dashboard/components/CommitTable.tsx +0 -0
  71. {codedna-0.9.0 → codedna-0.9.2}/dashboard/components/CostInfoTooltip.tsx +0 -0
  72. {codedna-0.9.0 → codedna-0.9.2}/dashboard/components/ErrorBanner.tsx +0 -0
  73. {codedna-0.9.0 → codedna-0.9.2}/dashboard/components/FeatureGate.tsx +0 -0
  74. {codedna-0.9.0 → codedna-0.9.2}/dashboard/components/FileHeatmap.tsx +0 -0
  75. {codedna-0.9.0 → codedna-0.9.2}/dashboard/components/LanguageSwitcher.tsx +0 -0
  76. {codedna-0.9.0 → codedna-0.9.2}/dashboard/components/NavClient.tsx +0 -0
  77. {codedna-0.9.0 → codedna-0.9.2}/dashboard/components/OverviewTitles.tsx +0 -0
  78. {codedna-0.9.0 → codedna-0.9.2}/dashboard/components/QuickInsights.tsx +0 -0
  79. {codedna-0.9.0 → codedna-0.9.2}/dashboard/components/RiskBadge.tsx +0 -0
  80. {codedna-0.9.0 → codedna-0.9.2}/dashboard/components/SummaryCards.tsx +0 -0
  81. {codedna-0.9.0 → codedna-0.9.2}/dashboard/components/UnderstandingChart.tsx +0 -0
  82. {codedna-0.9.0 → codedna-0.9.2}/dashboard/components/UpgradeBanner.tsx +0 -0
  83. {codedna-0.9.0 → codedna-0.9.2}/dashboard/lib/api.ts +0 -0
  84. {codedna-0.9.0 → codedna-0.9.2}/dashboard/lib/auth.ts +0 -0
  85. {codedna-0.9.0 → codedna-0.9.2}/dashboard/lib/i18n/en.ts +0 -0
  86. {codedna-0.9.0 → codedna-0.9.2}/dashboard/lib/i18n/index.tsx +0 -0
  87. {codedna-0.9.0 → codedna-0.9.2}/dashboard/lib/i18n/tr.ts +0 -0
  88. {codedna-0.9.0 → codedna-0.9.2}/dashboard/lib/plan.ts +0 -0
  89. {codedna-0.9.0 → codedna-0.9.2}/dashboard/next-env.d.ts +0 -0
  90. {codedna-0.9.0 → codedna-0.9.2}/dashboard/next.config.mjs +0 -0
  91. {codedna-0.9.0 → codedna-0.9.2}/dashboard/package-lock.json +0 -0
  92. {codedna-0.9.0 → codedna-0.9.2}/dashboard/package.json +0 -0
  93. {codedna-0.9.0 → codedna-0.9.2}/dashboard/postcss.config.mjs +0 -0
  94. {codedna-0.9.0 → codedna-0.9.2}/dashboard/tailwind.config.ts +0 -0
  95. {codedna-0.9.0 → codedna-0.9.2}/dashboard/tsconfig.json +0 -0
codedna-0.9.2/PKG-INFO ADDED
@@ -0,0 +1,401 @@
1
+ Metadata-Version: 2.4
2
+ Name: codedna
3
+ Version: 0.9.2
4
+ Summary: AI Code Transparency Tool — detect AI-written code, analyze commit quality, track understanding debt, sprint health, bus factor, and more
5
+ Project-URL: Homepage, https://codedna.dev
6
+ Project-URL: Repository, https://github.com/natureco-official/codedna
7
+ Project-URL: Issues, https://github.com/natureco-official/codedna/issues
8
+ Project-URL: Changelog, https://github.com/natureco-official/codedna/blob/main/CHANGELOG.md
9
+ Author-email: NatureCo <hello@natureco.me>
10
+ Maintainer-email: Gencay Olgun <info@natureco.me>
11
+ License: MIT
12
+ License-File: LICENSE
13
+ Keywords: ai,ai-detection,bus-factor,code-analysis,code-quality,commit-analysis,developer-tools,devops,discord,docker,export,feedback,git,multi-repo,slack,sprint-health,team-analytics,technical-debt,transparency,trends,webhook
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Environment :: Console
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Natural Language :: English
19
+ Classifier: Natural Language :: Turkish
20
+ Classifier: Operating System :: MacOS
21
+ Classifier: Operating System :: Microsoft :: Windows
22
+ Classifier: Operating System :: OS Independent
23
+ Classifier: Operating System :: POSIX :: Linux
24
+ Classifier: Programming Language :: Python :: 3
25
+ Classifier: Programming Language :: Python :: 3.10
26
+ Classifier: Programming Language :: Python :: 3.11
27
+ Classifier: Programming Language :: Python :: 3.12
28
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
29
+ Classifier: Topic :: Software Development :: Quality Assurance
30
+ Classifier: Topic :: Utilities
31
+ Classifier: Typing :: Typed
32
+ Requires-Python: >=3.10
33
+ Requires-Dist: bcrypt>=5.0.0
34
+ Requires-Dist: fastapi>=0.138.0
35
+ Requires-Dist: gitpython>=3.1.50
36
+ Requires-Dist: pyjwt>=2.13.0
37
+ Requires-Dist: rich>=15.0.0
38
+ Requires-Dist: tree-sitter-javascript>=0.25.0
39
+ Requires-Dist: tree-sitter-python>=0.25.0
40
+ Requires-Dist: tree-sitter-typescript>=0.23.2
41
+ Requires-Dist: tree-sitter>=0.25.2
42
+ Requires-Dist: typer>=0.26.7
43
+ Requires-Dist: uvicorn[standard]>=0.49.0
44
+ Provides-Extra: dashboard
45
+ Requires-Dist: next-cmd>=0.5.0; extra == 'dashboard'
46
+ Provides-Extra: dev
47
+ Requires-Dist: black>=26.5.1; extra == 'dev'
48
+ Requires-Dist: pytest-cov>=7.1.0; extra == 'dev'
49
+ Requires-Dist: pytest>=9.1.1; extra == 'dev'
50
+ Requires-Dist: ruff>=0.15.19; extra == 'dev'
51
+ Provides-Extra: nl
52
+ Requires-Dist: huggingface-hub; extra == 'nl'
53
+ Requires-Dist: pyarrow<18,>=14; extra == 'nl'
54
+ Description-Content-Type: text/markdown
55
+
56
+ <div align="center">
57
+
58
+ # 🧬 CodeDNA — AI Code Transparency Tool
59
+
60
+ **Understand every line of code you commit. Is it really yours, or AI's?**
61
+
62
+ Detect which code was written by AI, measure how well developers actually understand their commits, analyze commit quality, track trends, and map out "understanding debt" across your entire team.
63
+
64
+ [![PyPI version](https://badge.fury.io/py/codedna.svg)](https://pypi.org/project/codedna/)
65
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
66
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
67
+ [![GitHub stars](https://img.shields.io/github/stars/natureco-official/codedna.svg)](https://github.com/natureco-official/codedna/stargazers)
68
+
69
+ [**Quick Start**](#-quick-start) • [**Features**](#-features) • [**Commands**](#-commands) • [**Pricing**](#-pricing) • [**Docs**](#-documentation)
70
+
71
+ </div>
72
+
73
+ ---
74
+
75
+ ## 🎯 The Problem
76
+
77
+ In 2026, developers write **78% of their code with AI help** (Copilot, Cursor, ChatGPT, Claude). The result?
78
+
79
+ - 😰 **"Understanding Debt"** — Code is committed, but no one actually knows how it works
80
+ - 🚌 **Bus Factor = 1** — Everyone uses the same AI, no one understands the codebase
81
+ - 💰 **Technical Debt Explosion** — Without human review, AI-generated code decays fast
82
+ - 🐛 **Bug Multiplication** — 3 months later: "Who wrote this? I don't even know what it does"
83
+
84
+ **CodeDNA solves this.** Every commit is scored. Every developer is measured. Every team gets visibility.
85
+
86
+ ---
87
+
88
+ ## ✨ Features
89
+
90
+ ### 🔍 AI Detection (4-metric fingerprint)
91
+ CodeDNA uses 4 heuristics to detect AI-generated code:
92
+
93
+ | Metric | AI Signature | Score |
94
+ |--------|--------------|-------|
95
+ | `comment_ratio > 0.3` | AI over-comments its code | +0.20 |
96
+ | `avg_function_length > 50` | AI produces large monolithic blocks | +0.15 |
97
+ | `single_commit_ratio > 0.7` | Bulk-paste commits are AI-red flag | +0.30 |
98
+ | High complexity + single commit | AI signature → +0.25 |
99
+
100
+ **Total > 0.50 → AI suspected.** Combined with Tree-sitter AST analysis, this gives 80%+ accuracy.
101
+
102
+ ### 🤖 AI Score Explanation
103
+ Each file's score includes a plain-English breakdown of why it scored that way:
104
+ - *"High comment ratio (35%) — AI-generated code tends to over-comment (+0.20)"*
105
+ - *"High single-commit ratio (85%) — bulk paste indicator (+0.30)"*
106
+
107
+ ### 📝 Commit Message Quality Analysis
108
+ - Detects conventional commit types (`feat:`, `fix:`, `docs:`, etc.)
109
+ - Estimates quality score (0-5) based on message clarity
110
+ - Detects ticket references (JIRA, GitHub Issues)
111
+ - Score bonus for scope + ticket references
112
+
113
+ ### 📊 Export & Import
114
+ - `codedna export --format json|csv` — export all data
115
+ - `codedna import file.json` — restore from export
116
+ - API endpoints: `GET /export`, `POST /import`
117
+
118
+ ### 👤 Developer Understanding Score
119
+ - **Survey-based** — Quick Q&A after each commit
120
+ - **Tracked over time** — See your understanding curve
121
+ - **Trend charts** — Dashboard `/trends` page
122
+
123
+ ### 🚌 Bus Factor Analysis
124
+ - **Ownership tracking** — Who owns which file?
125
+ - **Risk identification** — Single points of failure
126
+
127
+ ### 💰 Technical Debt Estimation
128
+ - **Cost in USD** — How much would it cost to fix this?
129
+ - **Trend over time** — Is debt increasing?
130
+
131
+ ### 🏃 Sprint Health
132
+ - **Velocity tracking** — Real commits vs. AI-assisted
133
+ - **Quality metrics** — Per-sprint scoring
134
+
135
+ ### 📈 Trend Charts (Dashboard)
136
+ Time-series visualization of:
137
+ - Daily average AI probability over time
138
+ - Understanding score trend
139
+ - Commit frequency bar chart
140
+
141
+ ### 👀 Live Monitoring (`codedna watch`)
142
+ - Polls git repo for new commits (configurable interval)
143
+ - Auto-runs analysis on each new commit
144
+ - `--once` flag for cron-based usage
145
+ - `--notify` for webhook alerts
146
+
147
+ ### 🔔 Webhook Notifications (Slack/Discord)
148
+ - Configure via `codedna webhook` interactive wizard
149
+ - Automatic alerts on high AI risk detection
150
+ - Protected module violation notifications
151
+ - Configurable risk threshold
152
+
153
+ ### 💬 Feedback Loop
154
+ - Dashboard `/feedback` page
155
+ - Mark AI detections as correct/incorrect/unsure
156
+ - API endpoints for CRUD operations
157
+ - Historical view of all feedback
158
+
159
+ ### 📂 Multi-Repo Dashboard
160
+ - Add/remove repositories via dashboard `/repos`
161
+ - API-backed CRUD with `~/.codedna/repos.json`
162
+ - Centralized view across projects
163
+
164
+ ### 🤖 AI Tool Comparison (Enterprise)
165
+ Copilot vs. Cursor vs. Claude — which tool produces more debt?
166
+
167
+ ### 🎯 Interview Tool (Enterprise)
168
+ Auto-generates questions from real code, records responses, exports reports.
169
+
170
+ ### 🚀 Developer Onboarding
171
+ Ramp-up curve, mentor matching, first PR analysis.
172
+
173
+ ### 🛡️ Protected Modules
174
+ Mark critical files — "AI may not touch auth/, payment/, security/"
175
+
176
+ ### 🐳 Docker Self-Hosted
177
+ ```bash
178
+ docker compose up
179
+ # API → http://localhost:8000
180
+ # Dashboard → http://localhost:3000
181
+ ```
182
+
183
+ ---
184
+
185
+ ## 🚀 Quick Start
186
+
187
+ ### Installation
188
+
189
+ ```bash
190
+ pip install codedna
191
+ ```
192
+
193
+ ### First Use (60 seconds)
194
+
195
+ ```bash
196
+ cd your-awesome-project
197
+ codedna init # Install git hook + create DB
198
+ codedna scan # Analyze all files
199
+ codedna status # Last commit score
200
+ codedna history # Past commits
201
+ ```
202
+
203
+ ### Run the Dashboard
204
+
205
+ ```bash
206
+ codedna dashboard # Web UI (port 3000) + API (port 8000)
207
+ codedna serve # API only (port 8000)
208
+ ```
209
+
210
+ ---
211
+
212
+ ## 📋 Commands (30+ total)
213
+
214
+ ### 📊 Analysis & Reporting
215
+ ```bash
216
+ codedna scan # Full repo AI scan
217
+ codedna status # Last commit score + commit message analysis
218
+ codedna history # Commit history with understanding scores
219
+ codedna report # Generate HTML report
220
+ codedna ai-compare # AI tool comparison (Enterprise)
221
+ codedna export --format json # Export all data (JSON/CSV)
222
+ codedna import file.json # Restore from export
223
+ ```
224
+
225
+ ### 👀 Monitoring
226
+ ```bash
227
+ codedna watch # Live repo monitoring (poll mode)
228
+ codedna watch --once # Single analysis (cron-friendly)
229
+ codedna watch --notify # With webhook alerts
230
+ codedna webhook --show # Show webhook config
231
+ codedna webhook --test # Send test notification
232
+ codedna webhook --reset # Clear webhook config
233
+ ```
234
+
235
+ ### 🛡️ Protection & Policies
236
+ ```bash
237
+ codedna protect add <path> # Add protected module
238
+ codedna protect remove <path> # Remove protection
239
+ codedna protect list # List protected modules
240
+ codedna protect check # Show violations
241
+ ```
242
+
243
+ ### 👥 Team & Process
244
+ ```bash
245
+ codedna onboarding # Developer ramp-up (Team+)
246
+ codedna interview start # Start interview (Enterprise)
247
+ codedna interview list # List interviews
248
+ codedna interview score # Score interview
249
+ codedna bus-factor # Ownership analysis (Team+)
250
+ codedna debt # Technical debt (Team+)
251
+ codedna sprint create # Create sprint
252
+ codedna sprint health # Latest sprint score
253
+ codedna sprint history # All sprints
254
+ ```
255
+
256
+ ### 🌐 Infrastructure
257
+ ```bash
258
+ codedna serve # FastAPI REST (port 8000)
259
+ codedna dashboard # Web dashboard (port 3000)
260
+ codedna pr-comment # GitHub PR comment
261
+ codedna plan # Plan/license management
262
+ codedna setup # AI analysis config wizard
263
+ codedna security-check # Pre-publish secret scanner
264
+ codedna doctor # System health check
265
+ codedna update # Self-upgrade from PyPI
266
+ codedna uninstall # Remove git hook
267
+ ```
268
+
269
+ ---
270
+
271
+ ## 💎 Pricing
272
+
273
+ | Plan | Price | Repos | History | Dashboard | Key Features |
274
+ |------|-------|-------|---------|-----------|--------------|
275
+ | **Free** | $0 | 1 | 7 days | ❌ | AI detection, local only |
276
+ | **Pro** | $12/mo | ∞ | 90 days | ✅ | + Export, Webhooks, Watch |
277
+ | **Team** | $24/mo | ∞ | 365 days | ✅ | + Bus Factor, Sprint, Onboarding |
278
+ | **Enterprise** | $49/mo | ∞ | ∞ | ✅ | + AI Compare, Interview Tool, SSO |
279
+
280
+ ---
281
+
282
+ ## 🔌 Integrations
283
+
284
+ - **GitHub Actions** — Auto-comment on PR
285
+ - **Jira** — Sprint health webhook
286
+ - **Slack** — AI risk notifications
287
+ - **Discord** — Webhook alerts
288
+ - **GitHub Copilot / Cursor / Claude** — AI tool detection
289
+ - **Docker** — Self-hosted deployment
290
+
291
+ ---
292
+
293
+ ## 🛠️ Architecture
294
+
295
+ ```
296
+ CLI (Python, Typer, Tree-sitter, GitPython, SQLite)
297
+
298
+ ├── codedna scan / status / history
299
+ ├── codedna export / import
300
+ ├── codedna watch / webhook
301
+ ├── codedna protect / bus-factor / debt
302
+ ├── codedna sprint / onboarding
303
+ ├── codedna serve / dashboard
304
+ └── codedna doctor / update / security-check
305
+
306
+ ↓ HTTP
307
+ REST API (FastAPI, JWT Auth, Rate Limiting)
308
+ ├── /health, /repo/*
309
+ ├── /commits, /files, /report
310
+ ├── /survey, /sprints, /bus-factor, /debt
311
+ ├── /trends, /trends/commits
312
+ ├── /feedback (POST + GET)
313
+ ├── /repos (GET + POST + DELETE)
314
+ ├── /export, /import
315
+ ├── /auth (register, login, me)
316
+ └── /billing (checkout, webhook, subscription)
317
+
318
+ ↓ HTTP
319
+ Web Dashboard (Next.js 14, TypeScript, Tailwind)
320
+ ├── / (overview + metrics)
321
+ ├── /files, /commits, /report
322
+ ├── /bus-factor, /debt, /sprints
323
+ ├── /trends (charts)
324
+ ├── /feedback (AI accuracy feedback)
325
+ ├── /repos (multi-repo management)
326
+ ├── /ai-compare, /onboarding
327
+ ├── /protected, /interview
328
+ ├── /pricing, /billing
329
+ └── /login, /register
330
+ ```
331
+
332
+ ### Self-Hosted (Docker)
333
+
334
+ ```bash
335
+ git clone https://github.com/natureco-official/codedna.git
336
+ cd codedna
337
+ docker compose up
338
+ ```
339
+
340
+ ---
341
+
342
+ ## 🏗️ Tech Stack
343
+
344
+ - **Python 3.10+** with Typer, FastAPI, Tree-sitter, GitPython, SQLite
345
+ - **Next.js 14** with TypeScript, Tailwind CSS
346
+ - **Docker** — API + Dashboard containers
347
+ - **Lemon Squeezy** — Billing
348
+ - **uv** — Python packaging
349
+
350
+ ---
351
+
352
+ ## 🔒 Security
353
+
354
+ - HMAC-SHA256 webhook verification
355
+ - bcrypt password hashing (cost 12)
356
+ - JWT tokens (7-day expiry)
357
+ - httpOnly + secure + sameSite cookies
358
+ - Parameterized SQL queries
359
+ - Pydantic input validation
360
+ - Rate limiting
361
+ - No telemetry — your code stays yours
362
+
363
+ ---
364
+
365
+ ## 🌍 Supported Languages
366
+
367
+ Python (`.py`), JavaScript (`.js`), TypeScript (`.ts`), JSX (`.jsx`), TSX (`.tsx`)
368
+
369
+ ---
370
+
371
+ ## 🧪 Testing
372
+
373
+ ```bash
374
+ pytest # 23+ tests
375
+ pytest --cov=codedna # With coverage
376
+ ```
377
+
378
+ ---
379
+
380
+ ## 📚 Documentation
381
+
382
+ - CLI Reference — `codedna --help` or per-command `--help`
383
+ - API Reference — http://localhost:8000/docs (when running)
384
+ - [Contributing Guide](CONTRIBUTING.md)
385
+ - [Security Policy](SECURITY.md)
386
+
387
+ ---
388
+
389
+ ## 📜 License
390
+
391
+ MIT License — Copyright (c) 2026 NatureCo
392
+
393
+ ---
394
+
395
+ <div align="center">
396
+
397
+ **Made with 🌿 in Turkey**
398
+
399
+ [⭐ Star us on GitHub](https://github.com/natureco-official/codedna) • [📦 Install from PyPI](https://pypi.org/project/codedna/)
400
+
401
+ </div>