Transform Your Manual Bookkeeping into Smart Digital Records
DULO is an intelligent document digitization platform designed to help local businesses convert their manual bookkeeping records, receipts, and handwritten notes into structured digital formats (Excel/PDF) with AI-powered insights.
Manual bookkeeping is still prevalent among small and local businesses. DULO solves this problem by:
- Digitizing handwritten ledgers, receipts, and notes through OCR technology
- Converting captured data into organized Excel spreadsheets or PDF documents
- Providing AI-powered consultation to help business owners understand and analyze their financial data
- Capture photos of handwritten bookkeeping records, receipts, and business notes
- Advanced OCR (Optical Character Recognition) powered by PaddleOCR
- Support for various document types and handwriting styles
- Convert captured data into structured Excel spreadsheets
- Export clean, formatted PDF documents
- Maintain data integrity and accuracy
- Ask questions about your financial data directly to AI
- Get insights, summaries, and analysis of your bookkeeping records
- Understand trends, patterns, and potential issues in your business finances
- User authentication with JWT tokens
- Email verification system
- Secure data storage and processing
- React - UI library
- Vite - Fast build tool and dev server
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- Framer Motion - Animation library
- React Router - Client-side routing
- Radix UI - Accessible component primitives
- Python 3.11 - Programming language
- Flask - Lightweight web framework
- PaddleOCR - OCR engine for text recognition
- JWT - Authentication & authorization
- SQLite/PostgreSQL - Database options
- APScheduler - Background task scheduling
- XlsxWriter - Excel file generation
- ReportLab - PDF generation
- Docker - Containerization
- Docker Compose - Multi-container orchestration
- Nginx - Reverse proxy and static file serving
- Gunicorn - WSGI HTTP server
Make sure you have the following installed:
- Docker (20.10 or higher)
- Docker Compose (v2.0 or higher)
- username: admin
- email: admin@example.com
- password: Admin123!
-
Clone the repository
git clone <repository-url> cd dulo
-
Configure environment variables
Copy the example environment file in the backend directory:
cp backend/.env.example backend/.env
Edit
backend/.envand configure your settings:# Database DATABASE_TYPE=sqlite DATABASE_PATH=database/database.db # Database Configuration for PostgreSQL POSTGRES_HOST=localhost POSTGRES_PORT=5432 POSTGRES_USER=postgre POSTGRES_PASSWORD= POSTGRES_DB=ocr_db POSTGRES_SSLMODE=require # JWT Secret (change this in production!) JWT_SECRET_KEY=your-super-secret-key-change-in-production # Email Configuration (optional) RESEND_API_KEY=your-resend-api-key EMAIL_FROM=noreply@yourdomain.com FRONTEND_URL=http://localhost:5173 # AI Configuration (optional) KOLOSAL_API_KEY=your-kolosal-api-key KOLOSAL_OCR_API_KEY=your-kolosal-api-key KOLOSAL_MAX_TOKENS=1000 # Download Directory (for Docker volume) DOWNLOAD_DIR=download # CORS-allowed URLs (comma-separated) ORIGIN_URL=http://localhost:3000,http://localhost:5173
-
Build and run with Docker Compose
docker-compose up --build
Or run in detached mode:
docker-compose up -d --build
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- Health Check: http://localhost:8000/health
-
Stop the application
docker-compose down
-
Navigate to backend directory
cd backend -
Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Configure environment
cp .env.example .env # Edit .env with your configuration -
Initialize database
python create_tables.py python seeders.py
-
Run the backend server
python app.py
Backend will be available at http://localhost:8000
-
Navigate to frontend directory
cd frontend -
Install dependencies
npm install
-
Run development server
npm run dev
Frontend will be available at http://localhost:5173 (Vite default port)
-
Build for production
npm run build
dulo/
βββ backend/ # Python Flask backend
β βββ app.py # Main application entry point
β βββ config.py # Configuration settings
β βββ models.py # Database models
β βββ requirements.txt # Python dependencies
β βββ Dockerfile # Backend Docker configuration
β βββ core/ # Core business logic
β βββ database/ # Database files (SQLite)
β βββ download/ # Generated files storage
β βββ middleware/ # Custom middleware
β βββ ml/ # Machine learning (OCR) modules
β
βββ frontend/ # React Vite TypeScript frontend
β βββ src/ # Source code
β βββ public/ # Static assets
β βββ package.json # Node dependencies
β βββ vite.config.ts # Vite configuration
β βββ tailwind.config.js # Tailwind CSS configuration
β βββ Dockerfile # Frontend Docker configuration
β βββ nginx.conf # Nginx configuration for production
β
βββ data/ # Persistent data (created by Docker)
β βββ database/ # Database files
β βββ download/ # Generated documents
β
βββ docker-compose.yml # Docker Compose orchestration
βββ README.md # This file
POST /auth/register- Register new userPOST /auth/login- Login and get JWT tokenPOST /auth/refresh- Refresh JWT access tokenPOST /auth/logout- Logout and delete cookiesGET /auth/verif-email- Verify email addressPOST /auth/resend-verification- Resend verification emailPUT /auth/update-profile- Update fullname user (Protected - Requires JWT)
POST /ocr- Single image OCR with queuePOST /ocr/batch- Batch image OCR with queueGET /take/<job_id>- Get queue status and download linkGET /download/<filename>- Download file by filenamePOST /ocr/direct- Direct OCR (no queue)
POST /chat- Chat with an AI that knows the context of the data in the photoGET /chat/history- Get all chats for current userGET /chat/<chat_id>- Get chat details and messages
GET /health- Health checkGET /stats- Server statistics
The API uses JWT (JSON Web Tokens) for authentication. Include the token in the Authorization header:
Authorization: Bearer <your-jwt-token>
| Variable | Description | Default |
|---|---|---|
HOST |
Server host | 0.0.0.0 |
PORT |
Server port | 8000 |
DEBUG |
Debug mode | false |
DATABASE_TYPE |
Database type (sqlite/postgresql) | sqlite |
DATABASE_PATH |
SQLite database path | database/database.db |
JWT_SECRET_KEY |
Secret key for JWT tokens | Required |
RESEND_API_KEY |
Resend API key for emails | Optional |
EMAIL_FROM |
Sender email address | Optional |
KOLOSAL_API_KEY |
Kolosal AI API key | Optional |
KOLOSAL_OCR_API_KEY |
Kolosal AI OCR API key | Optional |
KOLOSAL_MAX_TOKENS |
Kolosal AI max tokens | Optional |
FRONTEND_URL |
Frontend URL for email links | http://localhost:3000 |
DOWNLOAD_DIR |
Download file directory | download |
ORIGIN_URL |
CORS-allowed URLs (comma-separated) | http://localhost:3000,http://localhost:5173 |
- backend: Flask API server (port 8000)
- frontend: React app served by Nginx (port 3000)
./data/database: Persistent database storage./data/download: Generated Excel/PDF files
All services communicate through the dulo-network bridge network.
# Backend tests (if available)
cd backend
pytest
# Frontend tests
cd frontend
npm run test# Frontend linting
cd frontend
npm run lint
# Backend linting (if configured)
cd backend
flake8 .cd frontend
npm run buildContributions 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 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
For support, please open an issue in the GitHub repository or contact the maintainers.
- [β] Multi-language OCR support
- [β] Receipt scanning from mobile camera
- Add another support tools
- Add object storage and file management
- Advanced AI analytics dashboard
Made with β€οΈ for Local Businesses







