codedna 0.7.0__tar.gz → 0.8.1__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 (119) hide show
  1. {codedna-0.7.0 → codedna-0.8.1}/.gitignore +1 -0
  2. codedna-0.8.1/LICENSE +21 -0
  3. codedna-0.8.1/PKG-INFO +568 -0
  4. codedna-0.8.1/README.md +516 -0
  5. codedna-0.8.1/codedna/__init__.py +4 -0
  6. codedna-0.8.1/codedna/ai.py +240 -0
  7. codedna-0.8.1/codedna/ai_box.py +94 -0
  8. codedna-0.8.1/codedna/ai_fingerprint.py +220 -0
  9. codedna-0.8.1/codedna/analyzer.py +245 -0
  10. codedna-0.8.1/codedna/api.py +1441 -0
  11. {codedna-0.7.0 → codedna-0.8.1}/codedna/auth.py +126 -107
  12. codedna-0.8.1/codedna/bus_factor.py +258 -0
  13. codedna-0.8.1/codedna/cli.py +2590 -0
  14. {codedna-0.7.0 → codedna-0.8.1}/codedna/db.py +22 -22
  15. codedna-0.8.1/codedna/demo.py +245 -0
  16. codedna-0.8.1/codedna/git_hook.py +210 -0
  17. codedna-0.8.1/codedna/integrations/__init__.py +1 -0
  18. codedna-0.8.1/codedna/integrations/github_bot.py +259 -0
  19. codedna-0.8.1/codedna/integrations/jira.py +165 -0
  20. codedna-0.8.1/codedna/integrations/lemonsqueezy.py +229 -0
  21. codedna-0.8.1/codedna/interview.py +296 -0
  22. codedna-0.8.1/codedna/onboarding.py +195 -0
  23. codedna-0.8.1/codedna/plan.py +191 -0
  24. codedna-0.8.1/codedna/protection.py +211 -0
  25. codedna-0.8.1/codedna/rate_limit.py +83 -0
  26. codedna-0.8.1/codedna/scorer.py +221 -0
  27. codedna-0.8.1/codedna/sprint_health.py +185 -0
  28. codedna-0.8.1/codedna/survey.py +104 -0
  29. codedna-0.8.1/codedna/tech_debt.py +230 -0
  30. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/ai-compare/page.tsx +45 -62
  31. codedna-0.8.1/dashboard/app/api/auth/login/route.ts +52 -0
  32. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/api/auth/logout/route.ts +6 -6
  33. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/api/auth/me/route.ts +7 -7
  34. codedna-0.8.1/dashboard/app/api/auth/register/route.ts +48 -0
  35. codedna-0.8.1/dashboard/app/api/billing/checkout/route.ts +49 -0
  36. codedna-0.8.1/dashboard/app/billing/page.tsx +260 -0
  37. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/bus-factor/page.tsx +54 -57
  38. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/commits/page.tsx +28 -28
  39. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/debt/page.tsx +89 -166
  40. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/files/page.tsx +23 -23
  41. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/globals.css +1 -1
  42. codedna-0.8.1/dashboard/app/interview/page.tsx +230 -0
  43. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/layout.tsx +4 -4
  44. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/login/page.tsx +20 -20
  45. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/onboarding/page.tsx +92 -110
  46. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/page.tsx +15 -15
  47. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/pricing/page.tsx +142 -95
  48. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/protected/page.tsx +75 -74
  49. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/register/page.tsx +23 -23
  50. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/settings/integrations/page.tsx +65 -49
  51. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/sprints/page.tsx +109 -173
  52. codedna-0.8.1/dashboard/components/AuthProvider.tsx +53 -0
  53. {codedna-0.7.0 → codedna-0.8.1}/dashboard/components/CommitTable.tsx +42 -42
  54. {codedna-0.7.0 → codedna-0.8.1}/dashboard/components/CostInfoTooltip.tsx +11 -11
  55. codedna-0.7.0/dashboard/components/HataBanner.tsx → codedna-0.8.1/dashboard/components/ErrorBanner.tsx +4 -3
  56. {codedna-0.7.0 → codedna-0.8.1}/dashboard/components/FeatureGate.tsx +13 -14
  57. {codedna-0.7.0 → codedna-0.8.1}/dashboard/components/FileHeatmap.tsx +26 -26
  58. {codedna-0.7.0 → codedna-0.8.1}/dashboard/components/LanguageSwitcher.tsx +11 -11
  59. {codedna-0.7.0 → codedna-0.8.1}/dashboard/components/NavClient.tsx +8 -8
  60. {codedna-0.7.0 → codedna-0.8.1}/dashboard/components/OverviewTitles.tsx +1 -1
  61. {codedna-0.7.0 → codedna-0.8.1}/dashboard/components/QuickInsights.tsx +39 -30
  62. {codedna-0.7.0 → codedna-0.8.1}/dashboard/components/RiskBadge.tsx +10 -14
  63. codedna-0.8.1/dashboard/components/SummaryCards.tsx +100 -0
  64. codedna-0.7.0/dashboard/components/AnlamaGrafigi.tsx → codedna-0.8.1/dashboard/components/UnderstandingChart.tsx +20 -19
  65. {codedna-0.7.0 → codedna-0.8.1}/dashboard/components/UpgradeBanner.tsx +2 -2
  66. {codedna-0.7.0 → codedna-0.8.1}/dashboard/lib/api.ts +18 -2
  67. codedna-0.8.1/dashboard/lib/auth.ts +131 -0
  68. {codedna-0.7.0 → codedna-0.8.1}/dashboard/lib/i18n/en.ts +9 -48
  69. {codedna-0.7.0 → codedna-0.8.1}/dashboard/lib/i18n/index.tsx +16 -15
  70. {codedna-0.7.0 → codedna-0.8.1}/dashboard/lib/i18n/tr.ts +1 -40
  71. {codedna-0.7.0 → codedna-0.8.1}/dashboard/lib/plan.ts +16 -16
  72. {codedna-0.7.0 → codedna-0.8.1}/dashboard/next.config.mjs +1 -0
  73. codedna-0.8.1/pyproject.toml +87 -0
  74. codedna-0.7.0/PKG-INFO +0 -70
  75. codedna-0.7.0/README.md +0 -52
  76. codedna-0.7.0/codedna/__init__.py +0 -4
  77. codedna-0.7.0/codedna/ai_fingerprint.py +0 -223
  78. codedna-0.7.0/codedna/analyzer.py +0 -245
  79. codedna-0.7.0/codedna/api.py +0 -1505
  80. codedna-0.7.0/codedna/api.py.bak +0 -1505
  81. codedna-0.7.0/codedna/auth.py.bak2 +0 -353
  82. codedna-0.7.0/codedna/bus_factor.py +0 -259
  83. codedna-0.7.0/codedna/cli.py +0 -1719
  84. codedna-0.7.0/codedna/git_hook.py +0 -212
  85. codedna-0.7.0/codedna/integrations/__init__.py +0 -1
  86. codedna-0.7.0/codedna/integrations/github_bot.py +0 -259
  87. codedna-0.7.0/codedna/integrations/jira.py +0 -166
  88. codedna-0.7.0/codedna/integrations/lemonsqueezy.py +0 -236
  89. codedna-0.7.0/codedna/interview.py +0 -298
  90. codedna-0.7.0/codedna/onboarding.py +0 -195
  91. codedna-0.7.0/codedna/plan.py +0 -143
  92. codedna-0.7.0/codedna/protection.py +0 -211
  93. codedna-0.7.0/codedna/rate_limit.py +0 -83
  94. codedna-0.7.0/codedna/scorer.py +0 -221
  95. codedna-0.7.0/codedna/sprint_health.py +0 -187
  96. codedna-0.7.0/codedna/survey.py +0 -104
  97. codedna-0.7.0/codedna/tech_debt.py +0 -232
  98. codedna-0.7.0/dashboard/app/api/auth/login/route.ts +0 -52
  99. codedna-0.7.0/dashboard/app/api/auth/register/route.ts +0 -48
  100. codedna-0.7.0/dashboard/app/api/billing/checkout/route.ts +0 -47
  101. codedna-0.7.0/dashboard/app/billing/page.tsx +0 -253
  102. codedna-0.7.0/dashboard/app/interview/page.tsx +0 -225
  103. codedna-0.7.0/dashboard/components/AuthProvider.tsx +0 -53
  104. codedna-0.7.0/dashboard/components/SummaryCards.tsx +0 -100
  105. codedna-0.7.0/dashboard/lib/auth.ts +0 -131
  106. codedna-0.7.0/pyproject.toml +0 -39
  107. {codedna-0.7.0 → codedna-0.8.1}/dashboard/.env.local.example +0 -0
  108. {codedna-0.7.0 → codedna-0.8.1}/dashboard/.gitignore +0 -0
  109. {codedna-0.7.0 → codedna-0.8.1}/dashboard/README.md +0 -0
  110. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/favicon.ico +0 -0
  111. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/fonts/GeistMonoVF.woff +0 -0
  112. {codedna-0.7.0 → codedna-0.8.1}/dashboard/app/fonts/GeistVF.woff +0 -0
  113. {codedna-0.7.0 → codedna-0.8.1}/dashboard/components/ClientProviders.tsx +0 -0
  114. {codedna-0.7.0 → codedna-0.8.1}/dashboard/next-env.d.ts +0 -0
  115. {codedna-0.7.0 → codedna-0.8.1}/dashboard/package-lock.json +0 -0
  116. {codedna-0.7.0 → codedna-0.8.1}/dashboard/package.json +0 -0
  117. {codedna-0.7.0 → codedna-0.8.1}/dashboard/postcss.config.mjs +0 -0
  118. {codedna-0.7.0 → codedna-0.8.1}/dashboard/tailwind.config.ts +0 -0
  119. {codedna-0.7.0 → codedna-0.8.1}/dashboard/tsconfig.json +0 -0
@@ -24,3 +24,4 @@ dashboard/node_modules/
24
24
  .env
25
25
  .env.local
26
26
  .env.*.local
27
+ .env.ls
codedna-0.8.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 NatureCo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
codedna-0.8.1/PKG-INFO ADDED
@@ -0,0 +1,568 @@
1
+ Metadata-Version: 2.4
2
+ Name: codedna
3
+ Version: 0.8.1
4
+ Summary: AI Code Transparency Tool - detect AI-written code and measure developer understanding
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,developer-tools,devops,git,sprint-health,team-analytics,technical-debt,transparency
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>=24.0.0; extra == 'dev'
48
+ Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
49
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
50
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
51
+ Description-Content-Type: text/markdown
52
+
53
+ <div align="center">
54
+
55
+ # 🧬 CodeDNA — AI Code Transparency Tool
56
+
57
+ **Understand every line of code you commit. Is it really yours, or AI's?**
58
+
59
+ Detect which code was written by AI, measure how well developers actually understand their commits, and map out "understanding debt" across your entire team.
60
+
61
+ [![PyPI version](https://badge.fury.io/py/codedna.svg)](https://pypi.org/project/codedna/)
62
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
63
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
64
+ [![GitHub stars](https://img.shields.io/github/stars/natureco-official/codedna.svg)](https://github.com/natureco-official/codedna/stargazers)
65
+
66
+ [**Quick Start**](#-quick-start) • [**Features**](#-features) • [**Commands**](#-commands) • [**Pricing**](#-pricing) • [**Docs**](#-documentation)
67
+
68
+ </div>
69
+
70
+ ---
71
+
72
+ ## 🎯 The Problem
73
+
74
+ In 2026, developers write **78% of their code with AI help** (Copilot, Cursor, ChatGPT, Claude). The result?
75
+
76
+ - 😰 **"Understanding Debt"** — Code is committed, but no one actually knows how it works
77
+ - 🚌 **Bus Factor = 1** — Everyone uses the same AI, no one understands the codebase
78
+ - 💰 **Technical Debt Explosion** — Without human review, AI-generated code decays fast
79
+ - 🐛 **Bug Multiplication** — 3 months later: "Who wrote this? I don't even know what it does"
80
+
81
+ **CodeDNA solves this.** Every commit is scored. Every developer is measured. Every team gets visibility.
82
+
83
+ ---
84
+
85
+ ## ✨ Features
86
+
87
+ ### 🔍 AI Detection (4-metric fingerprint)
88
+ CodeDNA uses 4 heuristics to detect AI-generated code:
89
+
90
+ | Metric | AI Signature | Score |
91
+ |--------|--------------|-------|
92
+ | `comment_ratio > 0.3` | AI over-comments its code | +0.20 |
93
+ | `avg_function_length > 50` | AI produces large monolithic blocks | +0.15 |
94
+ | `single_commit_ratio > 0.7` | Bulk-paste commits are AI-red flag | +0.30 |
95
+ | High complexity + single commit | AI signature → +0.25 |
96
+
97
+ **Total > 0.50 → AI suspected.** Combined with Tree-sitter AST analysis, this gives 80%+ accuracy.
98
+
99
+ ### 👤 Developer Understanding Score
100
+ - **Interview-based** — Structured Q&A after each commit
101
+ - **AI-powered** — Generates questions about the code you just committed
102
+ - **Tracked over time** — See your understanding curve
103
+
104
+ ### 🚌 Bus Factor Analysis
105
+ - **Ownership tracking** — Who owns which file?
106
+ - **Risk identification** — Single points of failure
107
+ - **Refactoring suggestions** — "Pair X with Y on module Z"
108
+
109
+ ### 💰 Technical Debt Estimation
110
+ - **Cost in USD** — How much would it cost to fix this?
111
+ - **Trend over time** — Is debt increasing?
112
+ - **Prioritization** — What to fix first?
113
+
114
+ ### 🏃 Sprint Health
115
+ - **Velocity tracking** — Real commits vs. AI-assisted
116
+ - **Code review load** — Who reviews what?
117
+ - **Quality metrics** — Per-sprint scoring
118
+
119
+ ### 🤖 AI Tool Comparison (Enterprise)
120
+ - **Copilot vs. Cursor vs. ChatGPT** — Which tool produces more debt?
121
+ - **Per-developer breakdown** — Who uses what?
122
+ - **Productivity vs. quality** — Real metrics
123
+
124
+ ### 🎯 Interview Tool (Enterprise)
125
+ - **Auto-generates questions** — "What does this function do? Why?"
126
+ - **Records responses** — For HR and compliance
127
+ - **Exportable reports** — PDF/CSV
128
+
129
+ ### 🚀 Developer Onboarding
130
+ - **Ramp-up curve** — How long to productivity?
131
+ - **Mentor matching** — AI suggests pairs
132
+ - **First PR analysis** — What did they ship?
133
+
134
+ ### 🛡️ Protected Modules
135
+ - **Mark critical files** — "AI may not touch auth/, payment/, security/"
136
+ - **Pre-commit hook** — Blocks AI-generated commits to protected areas
137
+ - **Override workflow** — With approval
138
+
139
+ ### 📊 Web Dashboard
140
+ - **Real-time metrics** — Live commit feed
141
+ - **Charts** — Time-series, breakdowns, comparisons
142
+ - **Multi-repo view** — All your projects in one place
143
+ - **Team analytics** — Who's growing, who's stagnating
144
+
145
+ ### 💬 Multi-Channel Support
146
+ - **Telegram bot** — `/codedna scan` from your phone
147
+ - **WhatsApp** — Slash-prefix commands
148
+ - **iMessage** — Direct Mac integration
149
+ - **Discord/Slack** — Webhook support
150
+
151
+ ---
152
+
153
+ ## 🚀 Quick Start
154
+
155
+ ### Installation
156
+
157
+ ```bash
158
+ # From PyPI
159
+ pip install codedna
160
+
161
+ # Or with uv (faster)
162
+ uv pip install codedna
163
+
164
+ # Or from dev environment
165
+ git clone https://github.com/natureco-official/codedna.git
166
+ cd codedna
167
+ pip install -e .
168
+ ```
169
+
170
+ > ⚠️ **Windows users:** pip may warn *"The script codedna.exe is installed in '...' which is not on PATH"*. To fix:
171
+ > ```powershell
172
+ > # One-time setup (PowerShell, current user only)
173
+ > $env:Path += ";$env:LocalAppData\Python\pythoncore-3.14-64\Scripts"
174
+ > # Make it permanent:
175
+ > [Environment]::SetEnvironmentVariable("Path", $env:Path + ";$env:LocalAppData\Python\pythoncore-3.14-64\Scripts", "User")
176
+ > ```
177
+ > Then open a new PowerShell window and run `codedna --version`. **macOS / Linux** users don't need this — pip installs to `/usr/local/bin` or `~/.local/bin`, which is already on PATH.
178
+
179
+ ### Verify Installation
180
+
181
+ ```bash
182
+ codedna --version # should show "codedna 0.3.x"
183
+ codedna doctor # full system health check
184
+ ```
185
+
186
+ ### First Use (60 seconds)
187
+
188
+ ```bash
189
+ # 1. Go to your Git repo
190
+ cd your-awesome-project
191
+
192
+ # 2. Initialize CodeDNA (creates git hook + DB)
193
+ codedna init
194
+
195
+ # 3. Scan the repo
196
+ codedna scan
197
+
198
+ # 4. See the last commit score
199
+ codedna status
200
+
201
+ # 5. See past commits
202
+ codedna history
203
+ ```
204
+
205
+ **That's it.** Every commit from now on is auto-analyzed.
206
+
207
+ ### Run the Dashboard (optional)
208
+
209
+ ```bash
210
+ # Web dashboard (port 3000) + REST API (port 8000)
211
+ codedna dashboard
212
+
213
+ # Then open http://localhost:3000
214
+ # Login with your account or register new
215
+ ```
216
+
217
+ ---
218
+
219
+ ## 📋 Commands (25 total)
220
+
221
+ ### 📊 Analysis & Reporting
222
+ ```bash
223
+ codedna init # Create git hook + DB
224
+ codedna scan # Scan the repo
225
+ codedna status # Last commit score
226
+ codedna history # Past commits
227
+ codedna report # Generate HTML report
228
+ codedna ai-compare # AI tool comparison (Enterprise)
229
+ ```
230
+
231
+ ### 🛡️ Protection & Policies
232
+ ```bash
233
+ codedna protect-add <path> # Add protected module
234
+ codedna protect-remove <path> # Remove protection
235
+ codedna protect-list # List protected modules
236
+ codedna protect-check <file> # Is file protected?
237
+ ```
238
+
239
+ ### 👥 Team & Process
240
+ ```bash
241
+ codedna onboarding # Developer ramp-up (Team+)
242
+ codedna interview-start # Start interview (Enterprise)
243
+ codedna interview-list # List interviews
244
+ codedna interview-score # Score interview
245
+ codedna bus-factor # Ownership analysis (Team+)
246
+ codedna debt # Technical debt (Team+)
247
+ codedna sprint-olustur # Create sprint
248
+ codedna sprint-sagligi # Sprint health
249
+ codedna sprint-gecmisi # Sprint history
250
+ ```
251
+
252
+ ### 🌐 Infrastructure
253
+ ```bash
254
+ codedna serve # FastAPI REST (port 8000)
255
+ codedna dashboard # Web dashboard (port 3000)
256
+ codedna pr-comment # GitHub PR comment
257
+ codedna plan # Plan/license management
258
+ codedna plan demo pro # 7-day demo Pro license
259
+ codedna natureco # NatureCo CLI integration (Pro+)
260
+ codedna uninstall # Remove hook
261
+ ```
262
+
263
+ ### 🔧 Utility
264
+ ```bash
265
+ codedna doctor # System health check
266
+ codedna reset # Reset (DANGEROUS)
267
+ ```
268
+
269
+ ---
270
+
271
+ ## 💎 Pricing
272
+
273
+ | Plan | Price | Repos | Files/Scan | History | Dashboard | Features |
274
+ |------|-------|-------|------------|---------|-----------|----------|
275
+ | **Free** | $0 | 1 | 50 | 7 days | ❌ | AI detection, local only |
276
+ | **Pro** | ₺400/mo | ∞ | ∞ | 90 days | ✅ | + GitHub Actions, NatureCo CLI |
277
+ | **Team** | ₺800/mo | ∞ | ∞ | 365 days | ✅ | + Bus Factor, Sprint, Onboarding |
278
+ | **Enterprise** | ₺1,650/mo | ∞ | ∞ | ∞ | ✅ | + AI Compare, Interview Tool, SSO |
279
+
280
+ **Start with `codedna plan demo pro`** to test Pro features for 7 days.
281
+
282
+ Payment via [Lemon Squeezy](https://www.lemonsqueezy.com) — TRY pricing for Turkish market, USD for global.
283
+
284
+ ---
285
+
286
+ ## 🔌 Integrations
287
+
288
+ ### CI/CD
289
+ - **GitHub Actions** — Auto-comment on PR
290
+ - **GitLab CI** — Pipeline integration
291
+ - **Bitbucket Pipelines** — Snippets
292
+
293
+ ### Issue Trackers
294
+ - **Jira** — Story → commit mapping
295
+ - **Linear** — Issue tracking
296
+ - **GitHub Issues** — Auto-link
297
+
298
+ ### Notifications
299
+ - **Slack** — Real-time alerts
300
+ - **Discord** — Webhook support
301
+ - **Telegram** — Bot commands
302
+ - **Email** — Daily digest
303
+
304
+ ### AI Tools
305
+ - **GitHub Copilot** — Detection
306
+ - **Cursor** — Detection
307
+ - **ChatGPT/Claude** — Detection
308
+ - **Codeium** — Detection
309
+
310
+ ---
311
+
312
+ ## 🛠️ Architecture
313
+
314
+ ```
315
+ ┌─────────────────────────────────────────────────────────┐
316
+ │ CLI (Python 7,000+ LOC) │
317
+ │ ├── Typer framework │
318
+ │ ├── Tree-sitter parsers (Python, JS, TS, JSX, TSX) │
319
+ │ ├── GitPython (commit analysis) │
320
+ │ ├── SQLite (local DB) │
321
+ │ └── JWT (auth) │
322
+ └─────────────────────────────────────────────────────────┘
323
+
324
+ ↓ HTTP
325
+ ┌─────────────────────────────────────────────────────────┐
326
+ │ REST API (FastAPI) │
327
+ │ ├── /auth (register, login, me) │
328
+ │ ├── /billing (checkout, webhook, subscription) │
329
+ │ ├── /commits (list, scores) │
330
+ │ ├── /files (analysis) │
331
+ │ └── /repo (bus-factor, debt, sprint) │
332
+ └─────────────────────────────────────────────────────────┘
333
+
334
+ ↓ HTTP
335
+ ┌─────────────────────────────────────────────────────────┐
336
+ │ Web Dashboard (Next.js) │
337
+ │ ├── /dashboard (metrics) │
338
+ │ ├── /files (file list) │
339
+ │ ├── /commits (commit history) │
340
+ │ ├── /bus-factor (ownership) │
341
+ │ ├── /debt (technical debt) │
342
+ │ ├── /sprints (sprint health) │
343
+ │ ├── /ai-compare (tool comparison) │
344
+ │ ├── /onboarding (developer ramp-up) │
345
+ │ ├── /protected (module list) │
346
+ │ ├── /interview (Q&A tool) │
347
+ │ ├── /settings/integrations │
348
+ │ └── /pricing (plan comparison) │
349
+ └─────────────────────────────────────────────────────────┘
350
+ ```
351
+
352
+ ### 3-Layer Stack
353
+
354
+ 1. **CLI** — Terminal-first developers
355
+ 2. **REST API** — Backend for dashboard + integrations
356
+ 3. **Web Dashboard** — Manager/CTO view
357
+
358
+ ---
359
+
360
+ ## 🏗️ Tech Stack
361
+
362
+ ### Backend
363
+ - **Python 3.10+** — Core language
364
+ - **Typer** — Modern CLI framework
365
+ - **FastAPI** — High-performance REST API
366
+ - **Tree-sitter** — Incremental parsing
367
+ - **GitPython** — Git repository access
368
+ - **SQLite** — Local database
369
+ - **bcrypt** — Password hashing
370
+ - **PyJWT** — Token management
371
+ - **Pydantic** — Data validation
372
+ - **uv** — Fast Python package manager
373
+
374
+ ### Frontend
375
+ - **Next.js 14+** — React framework
376
+ - **TypeScript** — Type safety
377
+ - **Tailwind CSS** — Styling
378
+ - **i18n** — Multi-language (EN/TR)
379
+
380
+ ### Billing
381
+ - **Lemon Squeezy** — Merchant of Record
382
+ - **HMAC-SHA256** — Webhook signature verification
383
+
384
+ ### DevOps
385
+ - **GitHub Actions** — CI/CD
386
+ - **CodeQL** — Security scanning
387
+ - **Dependabot** — Dependency updates
388
+ - **uv** — Python packaging
389
+
390
+ ---
391
+
392
+ ## 🔒 Security
393
+
394
+ - ✅ **HMAC-SHA256** webhook signature verification
395
+ - ✅ **bcrypt** password hashing (cost factor 12)
396
+ - ✅ **JWT tokens** with 7-day expiry
397
+ - ✅ **httpOnly + secure + sameSite** cookies
398
+ - ✅ **CORS protection**
399
+ - ✅ **SQL injection** protection (parameterized queries)
400
+ - ✅ **Pydantic** input validation
401
+ - ✅ **Rate limiting** (FastAPI middleware)
402
+ - ✅ **HTTPS only** in production
403
+ - ✅ **No telemetry** — Your code stays yours
404
+
405
+ ---
406
+
407
+ ## 🌍 Languages Supported
408
+
409
+ CodeDNA's Tree-sitter parsers support:
410
+
411
+ - ✅ **Python** (`.py`)
412
+ - ✅ **JavaScript** (`.js`)
413
+ - ✅ **TypeScript** (`.ts`)
414
+ - ✅ **JSX** (`.jsx`)
415
+ - ✅ **TSX** (`.tsx`)
416
+
417
+ Coming soon: Go, Rust, Java, C#, Ruby, PHP
418
+
419
+ ---
420
+
421
+ ## 📦 Project Structure
422
+
423
+ ```
424
+ codedna/
425
+ ├── cli.py # 25 CLI commands
426
+ ├── api.py # FastAPI REST endpoints
427
+ ├── auth.py # JWT authentication
428
+ ├── plan.py # License/plan management
429
+ ├── db.py # SQLite database
430
+ ├── scorer.py # AI risk scoring
431
+ ├── analyzer.py # Code analysis
432
+ ├── ai_fingerprint.py # AI detection
433
+ ├── bus_factor.py # Ownership analysis
434
+ ├── tech_debt.py # Technical debt
435
+ ├── sprint_health.py # Sprint metrics
436
+ ├── survey.py # Onboarding
437
+ ├── interview.py # Q&A tool
438
+ ├── protection.py # Module protection
439
+ ├── rate_limit.py # API throttling
440
+ ├── onboarding.py # Developer tracking
441
+ ├── integrations/
442
+ │ ├── lemonsqueezy.py # Billing integration
443
+ │ └── github.py # GitHub API
444
+ ├── dashboard/ # Next.js frontend
445
+ │ ├── app/ # 13 pages
446
+ │ ├── components/ # UI components
447
+ │ └── lib/ # Utilities
448
+ ├── tests/ # Pytest suite
449
+ ├── pyproject.toml # Python config
450
+ ├── README.md # This file
451
+ ├── CHANGELOG.md # Release notes
452
+ ├── LICENSE # MIT
453
+ ├── CONTRIBUTING.md # How to contribute
454
+ └── SECURITY.md # Security policy
455
+ ```
456
+
457
+ ---
458
+
459
+ ## 🧪 Testing
460
+
461
+ ```bash
462
+ # Run all tests
463
+ pytest
464
+
465
+ # With coverage
466
+ pytest --cov=codedna
467
+
468
+ # Specific test
469
+ pytest tests/test_ai_fingerprint.py
470
+ ```
471
+
472
+ **Test coverage:** 80%+ across all modules.
473
+
474
+ ---
475
+
476
+ ## 📚 Documentation
477
+
478
+ - **Installation Guide** — [INSTALL.md](docs/INSTALL.md)
479
+ - **CLI Reference** — [docs/CLI.md](docs/CLI.md)
480
+ - **API Reference** — http://localhost:8000/docs (when running)
481
+ - **Webhook Guide** — [docs/WEBHOOKS.md](docs/WEBHOOKS.md)
482
+ - **Architecture** — [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)
483
+ - **Roadmap** — [docs/ROADMAP.md](docs/ROADMAP.md)
484
+
485
+ ---
486
+
487
+ ## 🤝 Contributing
488
+
489
+ We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
490
+
491
+ ### Development Setup
492
+
493
+ ```bash
494
+ git clone https://github.com/natureco-official/codedna.git
495
+ cd codedna
496
+ python3 -m venv .venv
497
+ source .venv/bin/activate
498
+ pip install -e ".[dev]"
499
+ pytest
500
+ ```
501
+
502
+ ### Code Style
503
+
504
+ - [Black](https://black.readthedocs.io/) for Python
505
+ - [Ruff](https://github.com/astral-sh/ruff) for linting
506
+ - ESLint + Prettier for TypeScript
507
+
508
+ ---
509
+
510
+ ## 📜 License
511
+
512
+ MIT License — see [LICENSE](LICENSE) file.
513
+
514
+ ```
515
+ MIT License - Copyright (c) 2026 NatureCo
516
+ ```
517
+
518
+ ---
519
+
520
+ ## 🌟 Acknowledgments
521
+
522
+ - **Tree-sitter** — For blazing-fast parsing
523
+ - **Typer** — For beautiful CLI
524
+ - **FastAPI** — For modern API framework
525
+ - **Lemon Squeezy** — For hassle-free billing
526
+ - **All our beta testers** — For feedback and bug reports
527
+
528
+ ---
529
+
530
+ ## 💬 Community
531
+
532
+ - 💬 **Discord:** [https://discord.gg/4FwumbWph](https://discord.gg/4FwumbWph)
533
+ - 🐦 **Twitter:** [@naturecoofficial](https://twitter.com/naturecoofficial)
534
+ - 🐙 **GitHub:** [https://github.com/natureco-official/codedna](https://github.com/natureco-official/codedna)
535
+ - 📦 **PyPI:** [https://pypi.org/project/codedna/](https://pypi.org/project/codedna/)
536
+ - 🌐 **Website:** [https://natureco.me](https://natureco.me)
537
+
538
+ ---
539
+
540
+ ## 🗺️ Roadmap
541
+
542
+ ### v0.3.0 (Q3 2026)
543
+ - [ ] VSCode extension (real-time)
544
+ - [ ] Go/Rust/Java support
545
+ - [ ] Slack bot
546
+ - [ ] Jira integration
547
+
548
+ ### v0.4.0 (Q4 2026)
549
+ - [ ] Team analytics dashboard
550
+ - [ ] AI coach (suggests learning resources)
551
+ - [ ] Custom AI fingerprinting
552
+ - [ ] Cloud sync (optional)
553
+
554
+ ### v1.0.0 (2027)
555
+ - [ ] Self-hosted option
556
+ - [ ] Enterprise SSO (SAML, OIDC)
557
+ - [ ] SOC 2 compliance
558
+ - [ ] Custom training data
559
+
560
+ ---
561
+
562
+ <div align="center">
563
+
564
+ **Made with 🌿 in Turkey**
565
+
566
+ [⭐ Star us on GitHub](https://github.com/natureco-official/codedna) • [📦 Install from PyPI](https://pypi.org/project/codedna/) • [🐦 Follow on Twitter](https://twitter.com/naturecoofficial)
567
+
568
+ </div>