Text Extraction Done, UI Fixes Done, Extracted Template Layout Saved in DB

This commit is contained in:
2026-07-12 14:24:17 +05:30
parent 3163bb213e
commit 3d6614f408
79 changed files with 3139 additions and 81 deletions

View File

@@ -13,7 +13,7 @@ A production-ready system for scanning documents, detecting layouts, extracting
▼ ▼
┌───────────────────────────────────────┐
│ PostgreSQL (Schema: admin) │
│ 192.168.0.111:7925
│ 192.168.0.111:5432
└───────────────────────────────────────┘
```
@@ -92,7 +92,7 @@ docengine/
### Prerequisites
- Python 3.12+
- PostgreSQL 16 (running at `192.168.0.111:7925`)
- PostgreSQL 16 (running at `192.168.0.111:5432`)
- Redis (for Celery)
- `poppler-utils` and `ghostscript` (for pdf2image/camelot)
@@ -116,8 +116,8 @@ mkdir -p storage/{documents,templates,images,temp,rendered}
alembic upgrade head
# (Optional) Seed default data
psql -h 192.168.0.111 -p 7925 -U postgres -d document_engine -f sql/003_seed_data.sql
psql -h 192.168.0.111 -p 7925 -U postgres -d document_engine -f sql/004_indexes.sql
psql -h 192.168.0.111 -p 5432 -U postgres -d ocr -f sql/003_seed_data.sql
psql -h 192.168.0.111 -p 5432 -U postgres -d ocr -f sql/004_indexes.sql
# Start the application
python -m app.main
@@ -142,7 +142,7 @@ docker compose up --build -d
docker compose exec app alembic upgrade head
# Seed data
docker compose exec app bash -c "psql -h db -U postgres -d document_engine -f sql/003_seed_data.sql"
docker compose exec app bash -c "psql -h db -U postgres -d ocr -f sql/003_seed_data.sql"
```
---
@@ -403,7 +403,7 @@ When a document is uploaded, the following Celery task pipeline executes asynchr
## Database
**Connection**: `postgresql://postgres:***@192.168.0.111:7925/document_engine`
**Connection**: `postgresql://postgres:***@192.168.0.111:5432/ocr`
**Schema**: `admin`
### Migrations
@@ -474,11 +474,11 @@ All configuration is via environment variables (`.env` file). Key settings:
|------------------------------------|------------------------|---------------------------------|
| `APP_PORT` | `7989` | Application port |
| `DB_HOST` | `192.168.0.111` | PostgreSQL host |
| `DB_PORT` | `7925` | PostgreSQL port |
| `DB_NAME` | `document_engine` | Database name |
| `DB_PORT` | `5432` | PostgreSQL port |
| `DB_NAME` | `ocr` | Database name |
| `DB_SCHEMA` | `admin` | PostgreSQL schema |
| `REDIS_HOST` | `localhost` | Redis host |
| `CELERY_BROKER_URL` | `redis://localhost:6379/0` | Celery broker |
| `REDIS_HOST` | `192.168.0.111` | Redis host |
| `CELERY_BROKER_URL` | `redis://:***@192.168.0.111:7901/0` | Celery broker |
| `JWT_SECRET_KEY` | *(see .env)* | JWT signing key |
| `JWT_ACCESS_TOKEN_EXPIRE_MINUTES` | `30` | Access token TTL |
| `STORAGE_LOCAL_PATH` | `./storage` | Local file storage path |