Transform your documents into intelligent conversations
β¨ Features β’ π Quick Start β’ π Documentation β’ π€ Contributing
DocuGenius AI is a cutting-edge document processing platform that leverages the power of AI to help you extract, summarize, and interact with your documents in natural language. Built with modern web technologies and powered by Ollama's local AI models.
- π Privacy First - All processing happens locally, your data never leaves your machine
- β‘ Lightning Fast - Optimized for speed with efficient AI processing
- π¨ Beautiful UI - Modern, intuitive interface built with Tailwind CSS v4
- π Multi-Format - Support for PDF, DOCX, and TXT files
- π¬ Interactive - Chat naturally with your documents
- π Completely Free - No subscriptions, no API keys, no hidden costs
|
|
|
|
Before you begin, ensure you have:
# 1οΈβ£ Clone the repository
git clone https://github.com/khoale-dev-code/Docugenius-Project.git
cd Docugenius-Project
# 2οΈβ£ Install dependencies
npm install
# 3οΈβ£ Set up Ollama AI
ollama pull phi3:mini
ollama serve
# 4οΈβ£ Configure environment
cp .env.example .env.local
# 5οΈβ£ Start development server
npm run devπ That's it! Open http://localhost:3000 in your browser.
docugenius-project/
βββ π src/
β βββ π app/ # Next.js App Router
β β βββ π api/ # API Routes
β β β βββ chat/ # Chat endpoint
β β β βββ summarize/ # Summarization
β β β βββ upload-and-process/ # File processing
β β β βββ health/ # Health check
β β βββ globals.css # Global styles
β β βββ page.tsx # Home page
β βββ π components/ # React Components
β β βββ FileUploader.tsx # Main upload component
β β βββ π ui/ # UI Components
β β βββ Button.tsx # Button component
β βββ π lib/ # Utilities
β β βββ services/
β β βββ ollamaService.ts # Ollama integration
β βββ π types/ # TypeScript types
βββ π public/ # Static assets
βββ π package.json
βββ π tsconfig.json
βββ π tailwind.config.ts
POST /api/upload-and-process - Upload and process document
Request:
FormData {
file: File
}Response:
{
success: boolean
data: string // Extracted content
fileName: string
fileSize: number
metadata?: {
pages?: number
}
}Example:
const formData = new FormData()
formData.append('file', file)
const response = await fetch('/api/upload-and-process', {
method: 'POST',
body: formData
})POST /api/summarize - Generate AI summary
Request:
{
content: string
filename: string
}Response:
{
success: boolean
summary: string
chunksCount: number
message: string
}POST /api/chat - Chat with document
Request:
{
question: string
documentContent: string
}Response:
{
success: boolean
answer: string
message: string
}GET /api/health - Check system health
Response:
{
status: 'healthy' | 'unhealthy'
responseTime: string
performance: 'good' | 'slow' | 'very_slow'
model: string
}| Category | Technologies |
|---|---|
| Frontend | Next.js 15, React 18, TypeScript 5.0, Tailwind CSS v4 |
| AI Engine | Ollama (phi3:mini, llama2, mistral) |
| File Processing | pdf-parse, mammoth, Buffer API |
| UI Components | Lucide React, Custom Components |
| Development | ESLint, Prettier, Hot Reload |
| Deployment | Vercel, Netlify, Docker |
|
Drag & Drop
|
Click to Browse
|
The system automatically:
- β Extracts text content
- β Analyzes document structure
- β Generates intelligent summary
- β Prepares for Q&A
- π‘ Ask questions about the content
- π― Get context-aware answers
- β‘ Use sample questions for quick start
- π View conversation history
For Best Results:
- Keep questions concise (under 10 words)
- Ask specific questions instead of general ones
- Wait 5-10 seconds between questions
- Use the suggested question buttons
npm install -g vercel
vercelnpm run build
# Upload the 'out' directory to NetlifyFROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]docker build -t docugenius .
docker run -p 3000:3000 docugeniusπ΄ Ollama Connection Error
Problem: Cannot connect to Ollama service
Solution:
# Check if Ollama is running
ollama serve
# Verify models are installed
ollama list
# Pull required model
ollama pull phi3:mini
# Test connection
curl http://localhost:11434/api/tagsβ οΈ Timeout Errors
Problem: Requests timing out
Solutions:
- Reduce file size (keep under 5MB)
- Use shorter questions
- Check internet connection
- Restart Ollama service
- Try a smaller AI model
π§ Build Errors
Problem: Build fails
Solution:
# Clear cache and reinstall
rm -rf node_modules package-lock.json .next
npm install
# Check TypeScript errors
npm run type-check
# Verify Node.js version
node --version # Should be 18.0+We love contributions! Here's how you can help:
- π Report bugs - Open an issue
- π‘ Suggest features - Share your ideas
- π Improve docs - Help others learn
- π§ Submit PRs - Add new features
- β Star the repo - Show your support
# 1. Fork the repository
# 2. Create your feature branch
git checkout -b feature/AmazingFeature
# 3. Commit your changes
git commit -m 'Add some AmazingFeature'
# 4. Push to the branch
git push origin feature/AmazingFeature
# 5. Open a Pull Request- Follow the existing code style
- Write clear commit messages
- Add tests for new features
- Update documentation
- Ensure all tests pass
| Metric | Value |
|---|---|
| First Load | < 2s |
| Time to Interactive | < 3s |
| Lighthouse Score | 95+ |
| Bundle Size | < 500KB |
| API Response | < 1s |
- Basic document upload
- AI summarization
- Chat interface
- Health monitoring
- Multi-language support
- Dark mode
- Voice input
- Export conversations
- Batch processing
- Cloud storage integration
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License - Free to use, modify, and distribute
Special thanks to:
- Ollama - For the amazing local AI engine
- Next.js - For the powerful React framework
- Tailwind CSS - For the beautiful styling
- Lucide - For the elegant icons
- Vercel - For seamless deployment
- Open Source Community - For inspiration and support
If you find this project helpful, please consider:
β Starring the repository π Reporting bugs π‘ Suggesting features π Sharing with others
Built with β€οΈ by developers, for developers
"Transform documents into conversations, powered by AI"