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