TorbatYar/frontend
Mortezakoohjani e140908034 Ship enterprise CRM frontend with real API wiring and thin app routes.
Connect all CRM pages to the BFF and CRM service, add module docs, and mark CRM available in the SuperApp catalog.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-26 20:58:17 +03:30
..
app Ship enterprise CRM frontend with real API wiring and thin app routes. 2026-07-26 20:58:17 +03:30
components Auto-create default purchase posting profile and complete prepayment treasury fields. 2026-07-26 20:03:39 +03:30
docs Ship enterprise CRM frontend with real API wiring and thin app routes. 2026-07-26 20:58:17 +03:30
hooks Avoid tenant loading flash when me session is already cached. 2026-07-26 18:31:47 +03:30
lib Ship enterprise CRM frontend with real API wiring and thin app routes. 2026-07-26 20:58:17 +03:30
modules Ship enterprise CRM frontend with real API wiring and thin app routes. 2026-07-26 20:58:17 +03:30
public Deploy TorbatYar for torbatyar.ir with nginx multi-tenant routing. 2026-07-21 21:43:33 +03:30
scripts Ship enterprise CRM frontend with real API wiring and thin app routes. 2026-07-26 20:58:17 +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
.eslintrc.json Ship enterprise CRM frontend with real API wiring and thin app routes. 2026-07-26 20:58:17 +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/