5dfc2cbd85f5ad58d47190e162824b2d69cc56b6
DMS
DMS is a single-user document management system with:
- drag-and-drop upload anywhere in the UI
- file and folder upload
- document processing and indexing (PDF, text, OpenAI handwriting/image transcription, DOCX, XLSX, ZIP extraction)
- fallback handling for unsupported formats
- original file preservation and download
- metadata-based and full-text search
- learning-based routing suggestions
Requirements
- Docker Engine with Docker Compose plugin
- Internet access for the first image build
Install And Run With Docker Compose
- Open a terminal in this repository root.
- Start the full stack:
docker compose up --build -d
- Open the applications:
- Frontend:
http://localhost:5173 - Backend API docs:
http://localhost:8000/docs - Health check:
http://localhost:8000/api/v1/health
Setup
- Open the frontend and upload files or folders.
- Set default destination path and tags before upload if needed.
- Configure handwriting transcription settings in the UI:
- OpenAI compatible base URL
- model (default:
gpt-4.1-mini) - API key and timeout
- Open a document in the details panel, adjust destination and tags, then save.
- Keep
Learn from this routing decisionenabled to train future routing suggestions.
Data Persistence On Host
All runtime data is stored on the host using bind mounts.
Default host location:
./data/postgres./data/redis./data/storage
To persist under another host directory, set DCM_DATA_DIR:
DCM_DATA_DIR=/data docker compose up --build -d
This will place runtime data under /data on the host.
Common Commands
Start:
docker compose up --build -d
Stop:
docker compose down
View logs:
docker compose logs -f
Rebuild a clean stack while keeping persisted data:
docker compose down
docker compose up --build -d
Reset all persisted runtime data:
docker compose down
rm -rf ./data
Handwriting Transcription Notes
- Handwriting and image transcription uses an OpenAI compatible vision endpoint.
- Before transcription, images are normalized:
- EXIF rotation is corrected
- long side is resized to a maximum of 2000px
- image is sent as a base64 data URL payload
- Handwriting provider settings are persisted in host storage and survive container restarts.
API Overview
GET endpoints:
GET /api/v1/healthGET /api/v1/documentsGET /api/v1/documents/{document_id}GET /api/v1/documents/{document_id}/previewGET /api/v1/documents/{document_id}/downloadGET /api/v1/documents/tagsGET /api/v1/search?query=...GET /api/v1/settings
Additional endpoints used by the UI:
POST /api/v1/documents/uploadPATCH /api/v1/documents/{document_id}POST /api/v1/documents/{document_id}/reprocessPATCH /api/v1/settings/handwriting
Description
Languages
Python
67.2%
TypeScript
27.8%
CSS
4.7%
Dockerfile
0.3%