TorbatYar/frontend/README.md
Mortezakoohjani 12c8615615 Ship enterprise Accounting FE/API with CRUD parity and production wiring.
Adds accounting-service PATCH/archive, fiscal helpers, COA templates and setup status, plus SuperApp Accounting UI (DS, scoreboard, masters, vouchers, ledger, ops modules) with session refresh and HTTPS public API URLs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 15:26:43 +03:30

59 lines
1.3 KiB
Markdown

# Frontend (Next.js)
اپلیکیشن frontend کاملاً جدا از backend است.
## Responsibilities
- UI, Dashboard, Forms, Pages, Components
- State management, API clients, Theme (white-label)
## Rules
- **No** FastAPI, SQLAlchemy, Alembic, or business logic in this folder.
- Talk to backend **only** through REST APIs.
- Primary typed client: `lib/api.ts`. Helper client may also exist as `lib/api-client.ts`.
- Brand from `public/theme.config.json` and/or public tenant theme APIs — never hardcode.
## Run
**Preferred (full stack):**
```bash
# from repo root
docker compose up -d --build
```
**UI-only debug:**
```bash
cd frontend
npm install
npm run dev
```
Frontend: http://localhost:3000
## Stack
- Next.js **15.5.18**
- React 19, TypeScript, TailwindCSS
## Structure
```
frontend/
├── app/ # Next.js App Router
├── components/
├── hooks/
├── lib/ # api.ts, auth, theme, tenant-host
├── styles/
└── public/
```
## Related Documents
- [Architecture — FE/BE separation](../docs/architecture/architecture.md)
- [Multi-tenant / white-label](../docs/architecture/multi-tenant-architecture.md)
- [Next Steps](../docs/next-steps.md)
- [Developer Guide](../docs/development/developer-guide.md)