Smart Docs is an enterprise-grade, documentation generator for React/TypeScript projects. It analyzes your codebase, extracts components, hooks, dependencies, and generates beautiful, customizable documentation with a modern UI.
π¦ | Feature | Description |
---|---|---|
β‘ | Automatic Code Analysis | Deep AST parsing for React/TS projects |
π§© | Component & Hook Extraction | Detects all components, hooks, and dependencies |
ποΈ | Architecture Mapping | Visualizes relationships and patterns |
π | Customizable Templates | Create, edit, and manage doc templates |
π | Authentication & Authorization | Secure user/project management |
π | Export Options | PDF, Markdown, HTML export |
π οΈ | Modern UI | Built with React, Vite, and Tailwind |
π | API-First | RESTful API for integration |
π§ͺ | Comprehensive Testing | Backend & frontend test suites |
flowchart TD
A["User Interface (React + Vite + Tailwind)"] -->|"REST API"| B["Backend API (Express + TypeScript)"]
B -->|"Prisma ORM"| C["Database"]
B --> D["AST Parser & Code Analyzer"]
D --> E["Component/Hook/Dependency Extraction"]
B --> F["Documentation Generator"]
F --> G["PDF/Markdown/HTML Export"]
B --> H["Authentication & Authorization"]
B --> I["File Upload & Analysis Cache"]
git clone https://github.com/your-username/smart-docs.git
cd smart-docs
cd smart-docs-backend
cp env.example .env # Edit as needed
npm install
npm run db:generate
npm run db:push
npm run db:seed # Seed categories
npm run dev
cd ../smart-docs-frontend
cp env.example .env # Edit as needed
npm install
npm run local-server
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/smartdocs"
# JWT
JWT_SECRET="your-super-secret-jwt-key-here"
JWT_EXPIRES_IN="7d"
JWT_REFRESH_SECRET="your-refresh-token-secret-here"
JWT_REFRESH_EXPIRES_IN="30d"
# Server
NODE_ENV="development"
PORT=3001
FRONTEND_URL="http://localhost:3000"
# File Upload
MAX_FILE_SIZE="10mb"
UPLOAD_DIR="uploads"
# Rate Limiting
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100
# Cache
CACHE_TTL=3600
VITE_API_URL=http://localhost:3001/api/v1
VITE_BACKEND_URL=http://localhost:3001
VITE_NODE_ENV=development
VITE_ENABLE_ANALYTICS=false
VITE_ENABLE_ERROR_REPORTING=false
- Register/Login to your Smart Docs account.
- Create a Project and connect your repository (optional).
- Upload your codebase (React/TypeScript).
- Analyze: The backend parses your code, extracts components, hooks, dependencies, and architecture.
- Generate Documentation: Use customizable templates to generate docs.
- Export: Download documentation as PDF, Markdown, or HTML.
- Manage: Edit templates, manage projects, and collaborate securely.
Method | Endpoint | Description |
---|---|---|
POST | /api/v1/auth/register |
Register new user |
POST | /api/v1/auth/login |
Login user |
GET | /api/v1/projects |
List projects |
POST | /api/v1/projects |
Create project |
GET | /api/v1/templates |
List templates |
POST | /api/v1/templates |
Create template |
GET | /api/v1/templates/categories |
List template categories |
POST | /api/v1/analysis/upload |
Upload files for analysis |
GET | /api/v1/analysis/:projectId |
Get analysis results |
GET | /api/v1/documentation/:projectId |
Get generated documentation |
- Fork the repo and create your branch:
git checkout -b feature/your-feature
- Commit your changes:
git commit -am 'Add new feature'
- Push to the branch:
git push origin feature/your-feature
- Open a Pull Request
This project is licensed under the MIT License. See LICENSE for details.
- Hikmet Bozkurt AydoΔan