Skip to content

hikmetbozkurt/SmartDoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Smart Docs - Modern Documentation Generator

MIT License TypeScript React Node.js

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.


πŸ“š Table of Contents


✨ Features

🚦 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

πŸ›οΈ Architecture

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"]
Loading

πŸ› οΈ Tech Stack

  • Frontend: React Vite TailwindCSS TypeScript
  • Backend: Node.js Express Prisma TypeScript
  • Database: PostgreSQL
  • Other: Jest Vitest

⚑ Quickstart

1. Clone the Repository

git clone https://github.com/your-username/smart-docs.git
cd smart-docs

2. Backend Setup

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

3. Frontend Setup

cd ../smart-docs-frontend
cp env.example .env # Edit as needed
npm install
npm run local-server

βš™οΈ Environment Setup

Backend .env Example

# 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

Frontend .env Example

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

🚦 Usage

  1. Register/Login to your Smart Docs account.
  2. Create a Project and connect your repository (optional).
  3. Upload your codebase (React/TypeScript).
  4. Analyze: The backend parses your code, extracts components, hooks, dependencies, and architecture.
  5. Generate Documentation: Use customizable templates to generate docs.
  6. Export: Download documentation as PDF, Markdown, or HTML.
  7. Manage: Edit templates, manage projects, and collaborate securely.

πŸ“‘ API Overview

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

🀝 Contributing

  1. Fork the repo and create your branch: git checkout -b feature/your-feature
  2. Commit your changes: git commit -am 'Add new feature'
  3. Push to the branch: git push origin feature/your-feature
  4. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License. See LICENSE for details.


πŸ™ Credits

  • Hikmet Bozkurt Aydoğan

About

Smart Documentation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published