All checks were successful
- Create apps/docs/ with Docusaurus 3.7.0 - Add documentation: architecture, backend, frontend, infrastructure, development, ADR - Include 5 Mermaid diagrams (system architecture, request flow, modules, caching, deployment) - Configure as npm workspace with dev:docs/build:docs scripts - Copy existing ADR documents from docs/architecture/adr/
48 lines
2.0 KiB
Markdown
48 lines
2.0 KiB
Markdown
# Docusaurus Documentation — Design Spec
|
||
|
||
**Date:** 2026-06-13
|
||
|
||
## Purpose
|
||
|
||
Создать Docusaurus-сайт для onboard'инга новых разработчиков за 15 минут и документирования архитектуры MoexVibe.
|
||
|
||
## Location
|
||
|
||
`apps/docs/` — npm workspace в монорепозитории (по аналогии с `apps/backend`, `apps/frontend`).
|
||
|
||
## Content Sources (только из кода, без вымысла)
|
||
|
||
- `package.json` корневой + воркспейсов → scripts, deps
|
||
- `AGENTS.md` → env vars, architecture description, commands table
|
||
- `apps/backend/src/**` → модули, контроллеры, сервисы, DTO, конфиг
|
||
- `apps/frontend/src/**` → компоненты, хуки, клиент, типы
|
||
- `docker/Dockerfile.*`, `docker/nginx.conf` → инфраструктура
|
||
- `docker-compose.yml` → сервисы, порты
|
||
- `.gitea/workflows/ci.yml` → CI pipeline
|
||
- `docs/architecture/adr/*` → копия существующих ADR
|
||
- `.prettierrc`, `tsconfig.base.json` → конфиги
|
||
|
||
## Pages
|
||
|
||
| Раздел | Страницы |
|
||
|---|---|
|
||
| Overview | intro, getting-started, architecture |
|
||
| Backend | overview, modules, api, configuration, caching, moex-client |
|
||
| Frontend | overview, routes, components, hooks, api-client, styling |
|
||
| Infrastructure | docker, ci |
|
||
| Development | commands, testing, codegen, conventions |
|
||
| ADR | index + 7 ADR-документов (копия) |
|
||
|
||
## Mermaid Diagrams
|
||
|
||
1. **architecture** — `graph TD` (Browser → SPA → Backend → Cache → MOEX)
|
||
2. **architecture** — `sequenceDiagram` (cache hit/miss flow)
|
||
3. **backend/modules** — `graph TD` (module dependency graph)
|
||
4. **backend/caching** — `flowchart LR` (getOrFetch lifecycle)
|
||
5. **infrastructure/docker** — `graph TD` (deployment)
|
||
|
||
## Root Changes
|
||
|
||
- Добавить `apps/docs` в `workspaces[]` корневого `package.json`
|
||
- Добавить скрипты `dev:docs` и `build:docs`
|