Production-style FastAPI backend for intelligent document intake, review workflows, approvals, audit logs, and AI-ready classification.
DocuFlow API is a backend system built for document-driven business workflows. It allows teams to register users, upload document records, classify documents, add review notes, update approval statuses, and track audit history across the full review lifecycle.
This project was designed as a portfolio-ready Python backend system that reflects real company problems around document handling, slow approvals, and poor workflow visibility.
Many organizations still struggle with:
- manual document review
- approval bottlenecks
- poor workflow visibility
- repeated human data entry
- missing audit trails
- weak internal coordination
DocuFlow API solves those problems by providing a structured backend for:
- document registration and classification
- review collaboration
- approval workflows
- audit tracking
- analytics for workflow visibility
- User registration
- User login with JWT authentication
- Protected API routes
- Role-based access control
- Admin-only status update actions
- Create document records
- List documents
- Retrieve single document
- Update document status
- Filter documents by status and type
- Search by title, file name, or file type
- Add review notes
- List review notes per document
- Approval and rejection status flow
- Audit log tracking for workflow events
- Total documents count
- Uploaded documents count
- Under-review documents count
- Approved documents count
- Rejected documents count
- Mock classification layer for document type detection
- Mock extracted field generation
- Mock document summary generation
- Service-layer design ready for future Gemini, Grok, or OpenAI integration
- PostgreSQL database
- SQLAlchemy ORM
- Alembic migrations
- Clean modular project structure
- Workflow audit logging
- Python
- FastAPI
- PostgreSQL
- SQLAlchemy
- Alembic
- Pydantic
- JWT Authentication
- Passlib / bcrypt
- dotenv
docuflow-api/
│
├── alembic/
├── app/
│ ├── api/
│ │ ├── deps.py
│ │ └── v1/
│ │ ├── analytics.py
│ │ ├── audit_logs.py
│ │ ├── auth.py
│ │ ├── documents.py
│ │ └── notes.py
│ │
│ ├── core/
│ │ ├── config.py
│ │ ├── database.py
│ │ └── security.py
│ │
│ ├── models/
│ │ ├── audit_log.py
│ │ ├── document.py
│ │ ├── review_note.py
│ │ └── user.py
│ │
│ ├── schemas/
│ │ ├── analytics.py
│ │ ├── audit_log.py
│ │ ├── auth.py
│ │ ├── document.py
│ │ ├── review_note.py
│ │ └── user.py
│ │
│ ├── services/
│ │ └── document_ai_service.py
│ │
│ └── main.py
│
├── .env.example
├── alembic.ini
├── requirements.txt
└── README.md
Build by Ifeanyi Nwadike