TorbatYar/frontend
Mortezakoohjani 97a363fc53 Wire purchase returns, inventory issues, and GL transfers with auto vouchers.
Goods receipts and warehouse receipts now capture party vs warehouse separately; purchase returns link to invoices and reduce AP.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-26 19:51:32 +03:30
..
app Wire purchase returns, inventory issues, and GL transfers with auto vouchers. 2026-07-26 19:51:32 +03:30
components Wire purchase returns, inventory issues, and GL transfers with auto vouchers. 2026-07-26 19:51:32 +03:30
hooks Avoid tenant loading flash when me session is already cached. 2026-07-26 18:31:47 +03:30
lib Wire purchase returns, inventory issues, and GL transfers with auto vouchers. 2026-07-26 19:51:32 +03:30
public Deploy TorbatYar for torbatyar.ir with nginx multi-tenant routing. 2026-07-21 21:43:33 +03:30
styles Speed up accounting sidebar navigation with shared session cache and prefetch. 2026-07-26 18:31:24 +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 Ship enterprise Accounting FE/API with CRUD parity and production wiring. 2026-07-24 15:26:43 +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/