This revision consolidates backend and frontend into one deployable app folder (bi_app/) with FastAPI APIs + Jinja frontend templates.
.
├── bi_app/
│ ├── app/
│ │ ├── core/ # settings + security helpers
│ │ ├── db/ # engine/session/base
│ │ ├── routers/ # auth, data, analysis, pages
│ │ ├── services/ # file extraction, pattern engine, AI layer
│ │ ├── static/ # CSS/JS assets for Jinja frontend
│ │ ├── templates/ # Jinja UI pages
│ │ ├── deps.py
│ │ ├── models.py
│ │ ├── schemas.py
│ │ └── main.py
│ ├── tests/
│ ├── Dockerfile
│ └── requirements.txt
├── docker-compose.yml
└── README.md
- Use Jinja as requested for the frontend layer.
- Keep frontend + backend in a single folder for simpler deployment and ownership.
- Keep API contracts required by the original BI workflow.
docker-compose up --build- App: http://localhost:8000
- Health: http://localhost:8000/health
- API docs: http://localhost:8000/docs
POST /api/v1/auth/signupPOST /api/v1/auth/loginGET /api/v1/me
POST /api/v1/uploadGET /api/v1/uploadsGET /api/v1/company/{id}GET /api/v1/summary/{id}
POST /api/v1/analyzeGET /api/v1/relationship/{id}
- Sign up / Login from Jinja page (
/) - Upload Company A and Target Company (
/app) - Parsing + extraction + metadata storage
- Pattern signature check
- Known: rule normalization
- Unknown/conflict: AI normalization + persist new pattern/rule
- Save normalized companies + summaries
- Run relationship analysis
- View output in dashboard panel / history endpoint
- AI service is pluggable; mock mode is used without provider key.
- Upload supports DOC/DOCX/PDF/Excel/JSON/TXT + copy-paste text.
- Max upload size is 25MB.