Create professional documents and presentations with AI-powered section-by-section generation
Features โข Installation โข Usage โข Deployment
DocForge AI is a cutting-edge document generation platform that revolutionizes how you create professional Word documents and PowerPoint presentations. Using Meta Llama 3.3 70B Instruct via OpenRouter, it provides intelligent, section-by-section content generation with advanced editing capabilities.
- โจ AI-Powered Generation - Leverages state-of-the-art Llama 3.3 70B model
- ๐ Section-by-Section Control - Generate and refine individual sections independently
- ๐จ Professional Formatting - Export polished Word docs and PowerPoint slides
- ๐ Iterative Refinement - Improve content with natural language instructions
- ๐ฌ Collaboration Features - Comments, feedback, and revision tracking
- ๐ฏ AI Template Suggestions - Let AI suggest document structure based on your topic
- ๐ Secure & Private - Firebase authentication with Google Sign-In support
- Word Documents (.docx) - Professional reports, articles, and documentation
- PowerPoint Presentations (.pptx) - Engaging slides with structured content
- AI-Suggested Outlines - One-click template generation from your topic
- Manual Structure Control - Define sections/slides before generation
- AI Refinement - Improve sections with prompts like:
- "Make this more formal and professional"
- "Convert to bullet points"
- "Add specific examples and statistics"
- "Shorten to 150 words"
- Feedback System - Like/dislike tracking for quality control
- Comments - Add notes and feedback on individual sections
- Database Persistence - All changes stored in Firestore
- Word Documents - Proper heading styles, bullet points, bold/italic formatting
- PowerPoint Slides - Title slides, section dividers, professional layouts
- Markdown Support - Full markdown parsing in exports
- Quality Output - Publication-ready documents
- Dashboard - View all your projects at a glance
- History - Access previous projects with all edits preserved
- Resume Editing - Continue where you left off
- Multi-User Support - Secure user authentication
- React 18, Vite, TailwindCSS
- Firebase SDK, Axios, React Router
- Lucide Icons
- FastAPI (Python), Firebase Admin SDK
- Google Firestore (NoSQL Database)
- OpenRouter API (Llama 3.3 70B)
- python-docx, python-pptx
- Node.js 18+ and npm
- Python 3.9+
- Firebase Project (Firestore + Authentication)
- OpenRouter API Key
- Git
git clone https://github.com/yourusername/docforge-ai.git
cd docforge-aicd backend
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # macOS/Linux
pip install -r requirements.txtCreate backend/.env:
OPENROUTER_API_KEY=your_openrouter_api_key
FIREBASE_SERVICE_ACCOUNT_JSON=path/to/serviceAccount.json
FIRESTORE_PROJECT_ID=your-firebase-project-id
FRONTEND_URL=http://localhost:5173- Create Firebase project at console.firebase.google.com
- Enable Firestore Database
- Enable Authentication (Email/Password + Google)
- Generate service account key โ Save as
backend/serviceAccount.json
cd frontend
npm installCreate frontend/.env:
VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your-project-id
VITE_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id
VITE_API_BASE_URL=http://localhost:8000- Visit openrouter.ai
- Sign up and add credits
- Generate API key
- Add to
backend/.env
Terminal 1 - Backend:
cd backend
venv\Scripts\activate
uvicorn main:app --reloadTerminal 2 - Frontend:
cd frontend
npm run dev- Sign Up / Login
- Dashboard โ "Generate New Document"
- Enter Topic (e.g., "Market Analysis of Electric Vehicles")
- Select Format (Document or Presentation)
- Click "โจ AI-Suggest Outline" (or manually define structure)
- Generate - AI creates content section-by-section
- Refine - Improve sections with AI assistance
- Export - Download professional document
DocForge/
โโโ backend/
โ โโโ main.py # FastAPI routes
โ โโโ models.py # Pydantic models
โ โโโ ai_client.py # Llama integration
โ โโโ firestore_client.py # Database operations
โ โโโ exporter.py # Document export
โ โโโ config.py # Configuration
โ โโโ requirements.txt # Dependencies
โ โโโ .env # Environment variables
โโโ frontend/
โ โโโ src/
โ โ โโโ pages/
โ โ โ โโโ Dashboard.jsx
โ โ โ โโโ Generate.jsx
โ โ โ โโโ Editor.jsx
โ โ โ โโโ Login.jsx
โ โ โโโ context/
โ โ โ โโโ AuthContext.jsx
โ โ โโโ config/
โ โ โ โโโ api.js
โ โ โ โโโ firebase.js
โ โ โโโ App.jsx
โ โโโ package.json
โ โโโ .env
โโโ .gitignore
โโโ README.md
-
Set environment variables:
OPENROUTER_API_KEY=... FIREBASE_SERVICE_ACCOUNT_JSON=... FIRESTORE_PROJECT_ID=... FRONTEND_URL=https://your-domain.com -
Start command:
uvicorn main:app --host 0.0.0.0 --port $PORT -
Update CORS in
main.pywith production URL
-
Build:
npm run build
-
Set environment variables (all VITE_* vars)
-
Deploy
distfolder
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /projects/{projectId} {
allow read, write: if request.auth != null &&
resource.data.user_id == request.auth.uid;
match /sections/{sectionId} {
allow read, write: if request.auth != null;
}
}
}
}POST /auth/verify- Verify token
GET /projects- List projectsPOST /projects- Create projectGET /projects/{id}- Get projectGET /projects/{id}/content- Get sections
POST /generate-structured-document- Generate with structurePOST /projects/generate-outline- AI-suggest outline
POST /projects/{id}/sections/{sid}/refine- Refine sectionPOST /projects/{id}/sections/{sid}/feedback- Like/dislikePOST /projects/{id}/sections/{sid}/comment- Add comment
GET /projects/{id}/export/{type}- Export document
- Firebase Auth with JWT tokens
- User-based access control
- Environment variables for secrets
- CORS configuration
- Pydantic input validation
- Firestore security rules
- Fork the repository
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open Pull Request
MIT License - see LICENSE file for details
- Meta AI - Llama 3.3 70B
- OpenRouter - AI model access
- Firebase - Auth & database
- FastAPI, React, TailwindCSS
- PDF export
- Real-time collaboration
- Image upload
- Custom templates
- Mobile app
- Multi-language support
- Voice input
Built with โค๏ธ for modern document creation