docs: add repo layout structure map
Some checks failed
CI / Backend (lint + tests + compose) (push) Has been cancelled
CI / Frontend (lint + type-check + build) (push) Has been cancelled

This commit is contained in:
Vadim Malanov
2026-07-06 19:12:43 +03:00
parent 4fcec8039b
commit d100608df4
2 changed files with 63 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ documents:
- `docs/submodules/08_DECISIONS.md` - `docs/submodules/08_DECISIONS.md`
- `docs/submodules/09_ROLLOUT_AND_SSO.md` - `docs/submodules/09_ROLLOUT_AND_SSO.md`
- `docs/submodules/10_ASSET_AND_DOCUMENT_STANDARD.md` - `docs/submodules/10_ASSET_AND_DOCUMENT_STANDARD.md`
- `docs/submodules/18_REPO_LAYOUT_STANDARD.md`
- `docs/submodules/plans/LegacyHUB.md` - `docs/submodules/plans/LegacyHUB.md`
If local code, README, or runbook content conflicts with those platform If local code, README, or runbook content conflicts with those platform
@@ -51,6 +52,9 @@ Immediate platform implications for this repo:
API-key checks as service/defense-in-depth auth. API-key checks as service/defense-in-depth auth.
- OCR/Markdown/Search reuse should converge on a stateless shared core rather - OCR/Markdown/Search reuse should converge on a stateless shared core rather
than duplicating or hard-coding LegacyHUB-specific names into other modules. than duplicating or hard-coding LegacyHUB-specific names into other modules.
- File-structure work follows `docs/structure-map.md`: current `app/`,
`ingestion/`, `indexing` and `storage` layers are mature compatibility shapes
and should not be renamed without a scoped migration and focused checks.
## Stack (canonical) ## Stack (canonical)

59
docs/structure-map.md Normal file
View File

@@ -0,0 +1,59 @@
# LegacyHUB structure map
Status: current mapping · 2026-07-06.
Canonical target: `C:\Users\manag\TeamHUB\TeamHUB-Platform\docs\submodules\18_REPO_LAYOUT_STANDARD.md`.
## Current layout
```text
legacy-knowledge-indexer/
AGENTS.md
README.md
RUNBOOK.md
app/
main.py
config.py
api/
common/
db/
indexing/
ingestion/
integrations/
storage/
utils/
workers/
frontend/src/
scripts/
tests/
docker/
docs/
```
## Target mapping
| Current path | Target layer | Notes |
|---|---|---|
| `app/main.py` | backend composition shell | Current mature runtime shell. |
| `app/api/` | `backend/app/api/` | Route and schema layer. |
| `app/db/` | `backend/app/models` + `repositories` | Current DB/session/models/migrations boundary. |
| `app/ingestion/` | services/use cases | OCR/extract/chunk pipeline; do not rename without extraction plan. |
| `app/indexing/` | services/integrations | Search/vector/rerank runtime; shared parts move through Engines. |
| `app/storage/` | integrations/storage + repositories | MinIO and artifact persistence. |
| `app/integrations/` | integrations | Identity/dispatch/reference adapters should live here. |
| `app/workers/` | workers | Celery tasks. |
| `frontend/src/` | frontend target | React/Vite/Tailwind app. |
## Compatibility surfaces
- Root `app/` is accepted current backend root.
- `ingestion`, `indexing` and `storage` are mature domain layers; do not flatten
or rename only for symmetry.
- Shared OCR/document-recognition logic should move through `Engines`, leaving
thin app adapters.
## Next safe steps
1. Add new platform adapters in `app/integrations`.
2. Document current layer mapping instead of moving ingestion/search.
3. Use focused pytest/compileall and frontend build checks for touched runtime.