TorbatYar/frontend
Mortezakoohjani 065c053c16 Add complete Torbat Food hospitality frontend connected to backend APIs.
Introduces modules/hospitality with 54 routes, BFF proxy, capability-gated nav, CRUD factory, and architecture validation docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-26 20:54:26 +03:30
..
app Add complete Torbat Food hospitality frontend connected to backend APIs. 2026-07-26 20:54:26 +03:30
components Auto-create default purchase posting profile and complete prepayment treasury fields. 2026-07-26 20:03:39 +03:30
docs Add complete Torbat Food hospitality frontend connected to backend APIs. 2026-07-26 20:54:26 +03:30
hooks Avoid tenant loading flash when me session is already cached. 2026-07-26 18:31:47 +03:30
lib Auto-create default purchase posting profile and complete prepayment treasury fields. 2026-07-26 20:03:39 +03:30
modules Add complete Torbat Food hospitality frontend connected to backend APIs. 2026-07-26 20:54:26 +03:30
public Deploy TorbatYar for torbatyar.ir with nginx multi-tenant routing. 2026-07-21 21:43:33 +03:30
scripts Add complete Torbat Food hospitality frontend connected to backend APIs. 2026-07-26 20:54:26 +03:30
styles Add complete Torbat Food hospitality frontend connected to backend APIs. 2026-07-26 20:54:26 +03:30
.dockerignore Deploy TorbatYar for torbatyar.ir with nginx multi-tenant routing. 2026-07-21 21:43:33 +03:30
Dockerfile.dev Deploy TorbatYar for torbatyar.ir with nginx multi-tenant routing. 2026-07-21 21:43:33 +03:30
next-env.d.ts Deploy TorbatYar for torbatyar.ir with nginx multi-tenant routing. 2026-07-21 21:43:33 +03:30
next.config.mjs Ship enterprise Accounting FE/API with CRUD parity and production wiring. 2026-07-24 15:26:43 +03:30
package-lock.json Ship enterprise Accounting FE/API with CRUD parity and production wiring. 2026-07-24 15:26:43 +03:30
package.json Add complete Torbat Food hospitality frontend connected to backend APIs. 2026-07-26 20:54:26 +03:30
postcss.config.mjs Deploy TorbatYar for torbatyar.ir with nginx multi-tenant routing. 2026-07-21 21:43:33 +03:30
README.md Ship enterprise Accounting FE/API with CRUD parity and production wiring. 2026-07-24 15:26:43 +03:30
tailwind.config.ts Ship enterprise Accounting FE/API with CRUD parity and production wiring. 2026-07-24 15:26:43 +03:30
tsconfig.json Deploy TorbatYar for torbatyar.ir with nginx multi-tenant routing. 2026-07-21 21:43:33 +03:30
tsconfig.tsbuildinfo Deploy TorbatYar for torbatyar.ir with nginx multi-tenant routing. 2026-07-21 21:43:33 +03:30

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):

# from repo root
docker compose up -d --build

UI-only debug:

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/