docit-ai 1.0.0

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 (81) hide show
  1. package/.env.example +1 -0
  2. package/INSTRUCTIONS.MD +70 -0
  3. package/dist/ai/engine.d.ts +24 -0
  4. package/dist/ai/engine.d.ts.map +1 -0
  5. package/dist/ai/engine.js +69 -0
  6. package/dist/ai/engine.js.map +1 -0
  7. package/dist/ai/prompts.d.ts +11 -0
  8. package/dist/ai/prompts.d.ts.map +1 -0
  9. package/dist/ai/prompts.js +116 -0
  10. package/dist/ai/prompts.js.map +1 -0
  11. package/dist/cli/index.d.ts +3 -0
  12. package/dist/cli/index.d.ts.map +1 -0
  13. package/dist/cli/index.js +384 -0
  14. package/dist/cli/index.js.map +1 -0
  15. package/dist/formatter/index.d.ts +13 -0
  16. package/dist/formatter/index.d.ts.map +1 -0
  17. package/dist/formatter/index.js +76 -0
  18. package/dist/formatter/index.js.map +1 -0
  19. package/dist/index.d.ts +7 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +9 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/parser/extractor.d.ts +23 -0
  24. package/dist/parser/extractor.d.ts.map +1 -0
  25. package/dist/parser/extractor.js +148 -0
  26. package/dist/parser/extractor.js.map +1 -0
  27. package/dist/scanner/index.d.ts +11 -0
  28. package/dist/scanner/index.d.ts.map +1 -0
  29. package/dist/scanner/index.js +30 -0
  30. package/dist/scanner/index.js.map +1 -0
  31. package/package.json +31 -0
  32. package/server/.env.example +22 -0
  33. package/server/package-lock.json +4426 -0
  34. package/server/package.json +31 -0
  35. package/server/src/config/database.d.ts +18 -0
  36. package/server/src/config/database.d.ts.map +1 -0
  37. package/server/src/config/database.js +8 -0
  38. package/server/src/config/database.js.map +1 -0
  39. package/server/src/config/database.ts +31 -0
  40. package/server/src/index.d.ts +2 -0
  41. package/server/src/index.d.ts.map +1 -0
  42. package/server/src/index.js +33 -0
  43. package/server/src/index.js.map +1 -0
  44. package/server/src/index.ts +55 -0
  45. package/server/src/middleware/auth.d.ts +12 -0
  46. package/server/src/middleware/auth.d.ts.map +1 -0
  47. package/server/src/middleware/auth.js +35 -0
  48. package/server/src/middleware/auth.js.map +1 -0
  49. package/server/src/middleware/auth.ts +56 -0
  50. package/server/src/routes/auth.d.ts +3 -0
  51. package/server/src/routes/auth.d.ts.map +1 -0
  52. package/server/src/routes/auth.js +145 -0
  53. package/server/src/routes/auth.js.map +1 -0
  54. package/server/src/routes/auth.ts +185 -0
  55. package/server/src/routes/dashboard.ts +243 -0
  56. package/server/src/routes/generate.d.ts +3 -0
  57. package/server/src/routes/generate.d.ts.map +1 -0
  58. package/server/src/routes/generate.js +55 -0
  59. package/server/src/routes/generate.js.map +1 -0
  60. package/server/src/routes/generate.ts +75 -0
  61. package/server/src/routes/payment.ts +192 -0
  62. package/server/src/services/ai.d.ts +10 -0
  63. package/server/src/services/ai.d.ts.map +1 -0
  64. package/server/src/services/ai.js +75 -0
  65. package/server/src/services/ai.js.map +1 -0
  66. package/server/src/services/ai.ts +99 -0
  67. package/server/src/services/payment.ts +141 -0
  68. package/server/src/types/flutterwave.d.ts +60 -0
  69. package/server/supabase_payments.sql +35 -0
  70. package/server/supabase_schema.sql +90 -0
  71. package/server/tsconfig.json +17 -0
  72. package/server/vercel.json +15 -0
  73. package/server/verify_dashboard.ts +126 -0
  74. package/src/ai/engine.ts +103 -0
  75. package/src/ai/prompts.ts +123 -0
  76. package/src/cli/index.ts +552 -0
  77. package/src/formatter/index.ts +110 -0
  78. package/src/index.ts +11 -0
  79. package/src/parser/extractor.ts +211 -0
  80. package/src/scanner/index.ts +49 -0
  81. package/tsconfig.json +43 -0
package/.env.example ADDED
@@ -0,0 +1 @@
1
+ GEMINI_API_KEY=AIzaSyCRnvcYlB3rnQXLHtGp6DLqhOAlq4NQnX0
@@ -0,0 +1,70 @@
1
+ 1. Project Overview
2
+ Docit is a CLI-first, npm-distributed tool that generates and automatically updates technical documentation for software projects. It is designed to be a high-performance, affordable alternative to Mintlify. It utilizes local parsing (AST) combined with cost-effective LLMs (Gemini 2.5 Flash-Lite) to keep token costs minimal.
3
+
4
+ 2. Core Architecture
5
+ The IDE should assist in building these four modules:
6
+
7
+ The Scanner: Uses simple-git to identify files modified in the last commit.
8
+
9
+ The Parser: Uses tree-sitter to extract "Code Skeletons" (function names, parameters, return types, and comments) to reduce token usage.
10
+
11
+ The Engine: Orchestrates calls to the LLM (Default: Gemini 2.5 Flash-Lite).
12
+
13
+ The Formatter: Generates three distinct views of the documentation based on the target audience.
14
+
15
+ 3. Persona-Based Formatting Rules
16
+ The IDE must implement a "View Controller" that formats the AI output into three distinct sections within the generated documentation:
17
+
18
+ A. The "Strategic View" (For Project Managers)
19
+ Focus: Business value and status.
20
+
21
+ Format: High-level summaries, "What this feature enables," and a "Completeness Score" (0-100%).
22
+
23
+ Style: No code snippets. Use bullet points and bold text for key deliverables.
24
+
25
+ B. The "Technical View" (For Developers/Newbies)
26
+ Focus: Architecture and integration.
27
+
28
+ Format: Detailed function signatures, dependency maps, and "How to use" code examples.
29
+
30
+ Style: Strict Markdown with syntax highlighting. Includes "Internal Logic" explanations.
31
+
32
+ C. The "Personal View" (For Individuals/Solo Devs)
33
+ Focus: Productivity and reminders.
34
+
35
+ Format: A "To-Do" list generated from TODO comments in code and a "Technical Debt" summary.
36
+
37
+ Style: Concise, checklist-style formatting.
38
+
39
+ 4. Technical Constraints for IDE Implementation
40
+ Language: TypeScript (Strict Mode).
41
+
42
+ Parsing: Use @tree-sitter/tree-sitter with language-specific grammars.
43
+
44
+ AI Strategy: * Context Window Management: Do not send the whole file. Send only the AST "Skeleton."
45
+
46
+ Caching: Check docit.lock (a JSON file) for file hashes. If the hash matches, skip the AI call.
47
+
48
+ CLI: Use commander for the interface. Main command: docit sync.
49
+
50
+ 5. Immediate Tasks for the IDE
51
+ Environment Sync: Create package.json with dependencies: simple-git, tree-sitter, tree-sitter-typescript, @google/genai, commander, dotenv.
52
+
53
+ Parser Module: Implement src/parser/extractor.ts to find all ExportNamedDeclaration nodes in a TypeScript file.
54
+
55
+ AI Module: Implement src/ai/prompts.ts containing the three system prompts for the PM, Dev, and Individual views.
56
+
57
+ CLI Module: Create the docit sync command that ties these together.
58
+
59
+ 6. Target Documentation File Structure
60
+ Docit should output to a file named DOCIT.md (or a /docs folder) with the following hierarchy:
61
+
62
+ Project Overview
63
+
64
+ PM Dashboard (Strategic View)
65
+
66
+ Developer Reference (Technical View)
67
+
68
+ Personal Roadmap (Individual View)
69
+
70
+ Changelog (Auto-generated from Git history)
@@ -0,0 +1,24 @@
1
+ import { type ViewType } from "./prompts.js";
2
+ /**
3
+ * AI Engine Module
4
+ * Orchestrates calls to the Gemini LLM.
5
+ */
6
+ export interface DocumentationResult {
7
+ view: ViewType;
8
+ content: string;
9
+ }
10
+ export interface EngineConfig {
11
+ apiKey: string;
12
+ model?: string | undefined;
13
+ maxRetries?: number | undefined;
14
+ }
15
+ export declare class DocitEngine {
16
+ private ai;
17
+ private model;
18
+ private maxRetries;
19
+ constructor(config: EngineConfig);
20
+ generateDocumentation(codeSkeleton: string, view: ViewType): Promise<DocumentationResult>;
21
+ generateAllViews(codeSkeleton: string): Promise<DocumentationResult[]>;
22
+ }
23
+ export declare function createEngine(apiKey: string): DocitEngine;
24
+ //# sourceMappingURL=engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/ai/engine.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE/D;;;GAGG;AAEH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAMD,qBAAa,WAAW;IACtB,OAAO,CAAC,EAAE,CAAc;IACxB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,UAAU,CAAS;gBAEf,MAAM,EAAE,YAAY;IAM1B,qBAAqB,CACzB,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,QAAQ,GACb,OAAO,CAAC,mBAAmB,CAAC;IAiDzB,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC;CAY7E;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAExD"}
@@ -0,0 +1,69 @@
1
+ import { GoogleGenAI } from "@google/genai";
2
+ import { getPromptForView } from "./prompts.js";
3
+ async function sleep(ms) {
4
+ return new Promise((resolve) => setTimeout(resolve, ms));
5
+ }
6
+ export class DocitEngine {
7
+ ai;
8
+ model;
9
+ maxRetries;
10
+ constructor(config) {
11
+ this.ai = new GoogleGenAI({ apiKey: config.apiKey });
12
+ this.model = config.model ?? "gemini-2.0-flash";
13
+ this.maxRetries = config.maxRetries ?? 5;
14
+ }
15
+ async generateDocumentation(codeSkeleton, view) {
16
+ const systemPrompt = getPromptForView(view);
17
+ let lastError;
18
+ for (let attempt = 0; attempt < this.maxRetries; attempt++) {
19
+ try {
20
+ const response = await this.ai.models.generateContent({
21
+ model: this.model,
22
+ contents: [
23
+ {
24
+ role: "user",
25
+ parts: [
26
+ {
27
+ text: `${systemPrompt}\n\n---\n\nAnalyze the following code skeleton and generate documentation:\n\n${codeSkeleton}`,
28
+ },
29
+ ],
30
+ },
31
+ ],
32
+ });
33
+ const content = response.text ?? "";
34
+ return {
35
+ view,
36
+ content,
37
+ };
38
+ }
39
+ catch (error) {
40
+ lastError = error;
41
+ const status = error.status;
42
+ // Retry on 503 (overloaded) or 429 (rate limit)
43
+ if (status === 503 || status === 429) {
44
+ const waitTime = Math.pow(2, attempt) * 1000; // Exponential backoff
45
+ console.log(` ⏳ Model overloaded, retrying in ${waitTime / 1000}s...`);
46
+ await sleep(waitTime);
47
+ continue;
48
+ }
49
+ // Don't retry other errors
50
+ throw error;
51
+ }
52
+ }
53
+ throw lastError ?? new Error("Max retries exceeded");
54
+ }
55
+ async generateAllViews(codeSkeleton) {
56
+ const views = ["strategic", "technical", "personal"];
57
+ const results = [];
58
+ for (const view of views) {
59
+ console.log(` 📄 Generating ${view} view...`);
60
+ const result = await this.generateDocumentation(codeSkeleton, view);
61
+ results.push(result);
62
+ }
63
+ return results;
64
+ }
65
+ }
66
+ export function createEngine(apiKey) {
67
+ return new DocitEngine({ apiKey });
68
+ }
69
+ //# sourceMappingURL=engine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.js","sourceRoot":"","sources":["../../src/ai/engine.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * AI Prompts Module
3
+ * Contains system prompts for the three persona-based views.
4
+ */
5
+ export declare const STRATEGIC_VIEW_PROMPT = "You are a technical writer creating documentation for Project Managers.\n\nYour task is to analyze code skeletons and produce a \"Strategic View\" summary.\n\nRULES:\n- Focus on business value and project status\n- NO code snippets allowed\n- Use bullet points and bold text for key deliverables\n- Include a \"What this feature enables\" section\n- Provide a \"Completeness Score\" (0-100%) based on:\n - Function implementation status\n - TODO comments remaining\n - Interface completeness\n\nOUTPUT FORMAT:\n## Feature: [Feature Name]\n\n**What This Enables:**\n- [Business capability 1]\n- [Business capability 2]\n\n**Status:**\n- **Completeness Score:** XX%\n- [Key status points]\n\n**Key Deliverables:**\n- [Deliverable 1]\n- [Deliverable 2]\n";
6
+ export declare const TECHNICAL_VIEW_PROMPT = "You are a technical writer creating documentation for Developers.\n\nYour task is to analyze code skeletons and produce a \"Technical View\" reference.\n\nRULES:\n- Focus on architecture and integration details\n- Include detailed function signatures\n- Provide dependency maps where applicable\n- Include \"How to use\" code examples\n- Explain internal logic when relevant\n- Use strict Markdown with syntax highlighting\n\nOUTPUT FORMAT:\n## Module: [Module Name]\n\n### Overview\n[Brief description of the module's purpose]\n\n### Functions\n\n#### `functionName(params): returnType`\n**Description:** [What this function does]\n\n**Parameters:**\n- `param1` (Type): Description\n- `param2` (Type): Description\n\n**Returns:** Type - Description\n\n**Example:**\n```typescript\n// Usage example\n```\n\n### Dependencies\n- [Dependency 1]: [Purpose]\n- [Dependency 2]: [Purpose]\n\n### Internal Logic\n[Explanation of key algorithms or patterns]\n";
7
+ export declare const PERSONAL_VIEW_PROMPT = "You are a technical writer creating documentation for Solo Developers.\n\nYour task is to analyze code skeletons and produce a \"Personal View\" roadmap.\n\nRULES:\n- Focus on productivity and actionable items\n- Generate a To-Do list from TODO comments in code\n- Create a \"Technical Debt\" summary\n- Use concise, checklist-style formatting\n- Prioritize items by importance\n\nOUTPUT FORMAT:\n## Personal Roadmap: [File/Module Name]\n\n### Action Items\n- [ ] [High Priority] Task from TODO comment\n- [ ] [Medium Priority] Improvement suggestion\n- [ ] [Low Priority] Nice-to-have enhancement\n\n### Technical Debt\n| Issue | Location | Effort | Impact |\n|-------|----------|--------|--------|\n| [Description] | Line X | Low/Med/High | Low/Med/High |\n\n### Quick Notes\n- [Notable patterns or concerns]\n- [Suggestions for refactoring]\n";
8
+ export declare function getPromptForView(view: "strategic" | "technical" | "personal"): string;
9
+ export declare const VIEWS: readonly ["strategic", "technical", "personal"];
10
+ export type ViewType = (typeof VIEWS)[number];
11
+ //# sourceMappingURL=prompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/ai/prompts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,qBAAqB,uvBA4BjC,CAAC;AAEF,eAAO,MAAM,qBAAqB,27BAwCjC,CAAC;AAEF,eAAO,MAAM,oBAAoB,k1BA2BhC,CAAC;AAEF,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,WAAW,GAAG,WAAW,GAAG,UAAU,GAC3C,MAAM,CAWR;AAED,eAAO,MAAM,KAAK,iDAAkD,CAAC;AACrE,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,116 @@
1
+ /**
2
+ * AI Prompts Module
3
+ * Contains system prompts for the three persona-based views.
4
+ */
5
+ export const STRATEGIC_VIEW_PROMPT = `You are a technical writer creating documentation for Project Managers.
6
+
7
+ Your task is to analyze code skeletons and produce a "Strategic View" summary.
8
+
9
+ RULES:
10
+ - Focus on business value and project status
11
+ - NO code snippets allowed
12
+ - Use bullet points and bold text for key deliverables
13
+ - Include a "What this feature enables" section
14
+ - Provide a "Completeness Score" (0-100%) based on:
15
+ - Function implementation status
16
+ - TODO comments remaining
17
+ - Interface completeness
18
+
19
+ OUTPUT FORMAT:
20
+ ## Feature: [Feature Name]
21
+
22
+ **What This Enables:**
23
+ - [Business capability 1]
24
+ - [Business capability 2]
25
+
26
+ **Status:**
27
+ - **Completeness Score:** XX%
28
+ - [Key status points]
29
+
30
+ **Key Deliverables:**
31
+ - [Deliverable 1]
32
+ - [Deliverable 2]
33
+ `;
34
+ export const TECHNICAL_VIEW_PROMPT = `You are a technical writer creating documentation for Developers.
35
+
36
+ Your task is to analyze code skeletons and produce a "Technical View" reference.
37
+
38
+ RULES:
39
+ - Focus on architecture and integration details
40
+ - Include detailed function signatures
41
+ - Provide dependency maps where applicable
42
+ - Include "How to use" code examples
43
+ - Explain internal logic when relevant
44
+ - Use strict Markdown with syntax highlighting
45
+
46
+ OUTPUT FORMAT:
47
+ ## Module: [Module Name]
48
+
49
+ ### Overview
50
+ [Brief description of the module's purpose]
51
+
52
+ ### Functions
53
+
54
+ #### \`functionName(params): returnType\`
55
+ **Description:** [What this function does]
56
+
57
+ **Parameters:**
58
+ - \`param1\` (Type): Description
59
+ - \`param2\` (Type): Description
60
+
61
+ **Returns:** Type - Description
62
+
63
+ **Example:**
64
+ \`\`\`typescript
65
+ // Usage example
66
+ \`\`\`
67
+
68
+ ### Dependencies
69
+ - [Dependency 1]: [Purpose]
70
+ - [Dependency 2]: [Purpose]
71
+
72
+ ### Internal Logic
73
+ [Explanation of key algorithms or patterns]
74
+ `;
75
+ export const PERSONAL_VIEW_PROMPT = `You are a technical writer creating documentation for Solo Developers.
76
+
77
+ Your task is to analyze code skeletons and produce a "Personal View" roadmap.
78
+
79
+ RULES:
80
+ - Focus on productivity and actionable items
81
+ - Generate a To-Do list from TODO comments in code
82
+ - Create a "Technical Debt" summary
83
+ - Use concise, checklist-style formatting
84
+ - Prioritize items by importance
85
+
86
+ OUTPUT FORMAT:
87
+ ## Personal Roadmap: [File/Module Name]
88
+
89
+ ### Action Items
90
+ - [ ] [High Priority] Task from TODO comment
91
+ - [ ] [Medium Priority] Improvement suggestion
92
+ - [ ] [Low Priority] Nice-to-have enhancement
93
+
94
+ ### Technical Debt
95
+ | Issue | Location | Effort | Impact |
96
+ |-------|----------|--------|--------|
97
+ | [Description] | Line X | Low/Med/High | Low/Med/High |
98
+
99
+ ### Quick Notes
100
+ - [Notable patterns or concerns]
101
+ - [Suggestions for refactoring]
102
+ `;
103
+ export function getPromptForView(view) {
104
+ switch (view) {
105
+ case "strategic":
106
+ return STRATEGIC_VIEW_PROMPT;
107
+ case "technical":
108
+ return TECHNICAL_VIEW_PROMPT;
109
+ case "personal":
110
+ return PERSONAL_VIEW_PROMPT;
111
+ default:
112
+ throw new Error(`Unknown view type: ${view}`);
113
+ }
114
+ }
115
+ export const VIEWS = ["strategic", "technical", "personal"];
116
+ //# sourceMappingURL=prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/ai/prompts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BpC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCpC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BnC,CAAC;AAEF,MAAM,UAAU,gBAAgB,CAC9B,IAA4C;IAE5C,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,WAAW;YACd,OAAO,qBAAqB,CAAC;QAC/B,KAAK,WAAW;YACd,OAAO,qBAAqB,CAAC;QAC/B,KAAK,UAAU;YACb,OAAO,oBAAoB,CAAC;QAC9B;YACE,MAAM,IAAI,KAAK,CAAC,sBAAsB,IAAI,EAAE,CAAC,CAAC;IAClD,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,UAAU,CAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare function createCli(): Command;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyKpC,wBAAgB,SAAS,IAAI,OAAO,CA8XnC"}