AI-powered document intelligence platform for automated summarization and analysis
Artemis Insight transforms lengthy technical documents into structured, actionable summaries using AI. Upload PDFs, select a template, and receive comprehensive summaries organized by your specifications.
- PDF Upload & Analysis - Upload and process PDF documents up to 50MB
- Intelligent Text Extraction - Extract text with metadata preservation
- Vector Embeddings - Create searchable embeddings for semantic analysis
- Multi-pass Processing - Configurable chunk sizes and overlap for optimal results
- Custom Templates - Define section structures with guidance prompts
- Section Ordering - Control the flow and organization of summaries
- Required Fields - Mark critical sections for mandatory completion
- Reusable Templates - Create once, use for multiple documents
- Status Tracking - Monitor processing, completed, and failed summaries
- Section Breakdown - View detailed content by section with page references
- Export Options - Download summaries as PDF or Word documents
- Markdown Support - Rich text formatting with headers, bold, and lists
- Dark Mode - Comfortable viewing in any lighting condition
- Responsive Design - Works seamlessly on desktop and tablet
- Real-time Updates - Live status monitoring during processing
- Modal Dialogs - Professional confirmations and error messages
- Docker & Docker Compose
- OpenAI API Key
- 8GB RAM minimum
- 10GB free disk space
-
Clone the repository
git clone https://github.com/Poolchaos/artemis-insight.git cd artemis-insight -
Configure environment variables
cp .env.example .env
Edit
.envand set your OpenAI API key:OPENAI_API_KEY=sk-your-api-key-here
-
Start the services
docker-compose up -d
-
Access the application
- Frontend: http://localhost:5173
- Backend API: http://localhost:8001
- API Docs: http://localhost:8001/docs
-
Create a Template
- Navigate to Templates β Create New Template
- Define sections with guidance prompts
- Set section order and required fields
-
Upload a Document
- Go to Documents β Upload
- Select a PDF file
- Wait for processing to complete
-
Generate a Summary
- Click "Process" on a document
- Select your template
- Monitor progress in Summaries
-
Export Results
- Open the completed summary
- Click Export β Choose PDF or DOCX
- Download and share
Frontend
- React 18 with TypeScript
- TailwindCSS for styling
- Zustand for state management
- React Router for navigation
- Heroicons for icons
Backend
- FastAPI (Python 3.11)
- MongoDB for data storage
- Redis for caching
- Celery for async tasks
- MinIO for file storage
AI/ML
- OpenAI GPT-4o-mini for summarization
- OpenAI text-embedding-3-small for embeddings
- PDFPlumber for text extraction
- ReportLab for PDF generation
- python-docx for Word exports
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Browser ββββββΆβ Nginx ββββββΆβ FastAPI β
β (React) β β (Frontend) β β (Backend) β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β
ββββββββββββββββββββββββββββΌβββββββββββββββ
β β β
βββββββΌββββββ ββββββββΌβββββββ βββββΌβββββ
β MongoDB β β Celery β β MinIO β
β (Database)β β (Workers) β β(Storage)β
βββββββββββββ βββββββββββββββ ββββββββββ
β
ββββββββΌβββββββ
β Redis β
β (Queue) β
βββββββββββββββ
artemis-insight/
βββ backend/
β βββ app/
β β βββ models/ # Pydantic models & MongoDB schemas
β β βββ routes/ # FastAPI route handlers
β β βββ services/ # Business logic
β β βββ middleware/ # Auth & CORS
β β βββ tasks.py # Celery async tasks
β β βββ main.py # FastAPI app initialization
β βββ requirements.txt
β βββ Dockerfile
βββ frontend/
β βββ src/
β β βββ components/ # React components
β β βββ pages/ # Page components
β β βββ services/ # API clients
β β βββ stores/ # Zustand stores
β β βββ types/ # TypeScript types
β βββ package.json
β βββ Dockerfile
βββ docker-compose.yml
βββ README.md
Required:
OPENAI_API_KEY=sk-... # Your OpenAI API keyDatabase:
MONGO_ROOT_USERNAME=admin
MONGO_ROOT_PASSWORD=secure_password
MONGO_DATABASE=artemis_insightStorage:
MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=secure_password
MINIO_BUCKET=artemis-insightAuthentication:
JWT_SECRET_KEY=your-secret-key # Generate with: openssl rand -hex 32
JWT_ALGORITHM=HS256
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=15
JWT_REFRESH_TOKEN_EXPIRE_DAYS=7Adjust template processing strategies in the template configuration:
{
"processing_strategy": {
"approach": "multi-pass",
"chunk_size": 600,
"overlap": 75,
"embedding_model": "text-embedding-3-small",
"summarization_model": "gpt-4o-mini"
}
}Example template for a feasibility study:
{
"name": "Feasibility Study Summary",
"description": "Technical summary for engineering review",
"sections": [
{
"title": "Executive Summary",
"order": 1,
"required": true,
"guidance_prompt": "Synthesize key findings, proposed solution, and recommendations"
},
{
"title": "Technical Aspects",
"order": 2,
"required": true,
"guidance_prompt": "Describe components, sizing, operations, and implementation"
},
{
"title": "Cost Analysis",
"order": 3,
"required": true,
"guidance_prompt": "Extract capital costs, operating costs, and unit reference values"
}
]
}Upload a document:
curl -X POST http://localhost:8001/api/documents/upload \
-H "Authorization: Bearer $TOKEN" \
-F "file=@document.pdf"Create a summary:
curl -X POST "http://localhost:8001/api/summaries?document_id=xxx&template_id=yyy" \
-H "Authorization: Bearer $TOKEN"Export as PDF:
curl -X GET "http://localhost:8001/api/summaries/{summary_id}/export/pdf" \
-H "Authorization: Bearer $TOKEN" \
-o summary.pdfBackend:
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8001Frontend:
cd frontend
npm install
npm run devWorker:
cd backend
celery -A app.celery_app worker --loglevel=info# Backend tests
cd backend
pytest
# Frontend tests
cd frontend
npm test
# E2E tests
npm run test:e2e# Backend linting
cd backend
flake8 app/
black app/
isort app/
# Frontend linting
cd frontend
npm run lint
npm run format"Failed to connect to MongoDB"
- Ensure MongoDB container is running:
docker ps - Check credentials in
.envmatchdocker-compose.yml - Verify port 27017 is not in use
"OpenAI API rate limit"
- Check your OpenAI account has sufficient credits
- Reduce concurrent processing in template strategy
- Consider using GPT-3.5-turbo for faster processing
"PDF upload fails"
- Check file size is under 50MB
- Ensure MinIO container is healthy
- Verify MINIO_BUCKET exists
"Summary shows 0 sections"
- Confirm template has sections defined (not legacy fields)
- Check template was saved correctly in MongoDB
- Refresh browser cache
# View all logs
docker-compose logs -f
# Specific service logs
docker logs artemis-insight-backend --tail 100
docker logs artemis-insight-celery-worker --tail 100
docker logs artemis-insight-frontend --tail 100
# Database logs
docker logs artemis-insight-mongodb --tail 50Added:
- Summary list page with status filtering
- Detailed summary view with section breakdown
- PDF and DOCX export functionality
- ProcessPage for document summarization workflow
- Markdown rendering in summaries
- Modal dialogs for confirmations and errors
- Local 24-hour time format
- Human-readable processing time display
Changed:
- Replaced browser alerts with modal components
- Updated template types for backward compatibility
- Improved error messages and validation
- Enhanced dark mode support
Fixed:
- ObjectId conversion bug in summary endpoints
- PDF markdown parsing with proper regex
- Template edit form not populating sections
- CORS headers for file downloads
- TypeScript compilation errors in templates
Added:
- Initial release
- Document upload and processing
- Template management
- Basic summarization
- User authentication
- Dark mode support
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
We follow Conventional Commits:
feat:- New featurefix:- Bug fixdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for GPT-4 and embeddings
- FastAPI for the amazing web framework
- React for the UI library
- TailwindCSS for styling utilities
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@artemisinnovations.co.za
- Multi-document batch processing
- Custom AI model selection per template
- Collaborative editing and sharing
- Advanced analytics dashboard
- API webhooks for integrations
- Multi-language support
- Mobile app (iOS/Android)
- On-premise deployment option
Built with β€οΈ by Artemis Innovations