Wire production domain, CORS for tenant subdomains, celery volume mounts, and nginx reverse proxy configs for apex, API, identity, auth, and wildcard tenants. Co-authored-by: Cursor <cursoragent@cursor.com>
1.3 KiB
1.3 KiB
Frontend (Next.js)
اپلیکیشن frontend کاملاً جدا از backend است.
مسئولیتها
- UI، Dashboard، Forms، Pages، Components
- State Management، API Client، Theme (White-label)
قوانین
- هیچ کد FastAPI، SQLAlchemy، Alembic یا Business Logic در این پوشه نیست.
- ارتباط با backend فقط از طریق REST API (
lib/api-client.ts). - برند از
public/theme.config.jsonیا API خوانده میشود (بدون hardcode).
راهاندازی
پیشنهادی (همراه کل پلتفرم):
# از ریشه پروژه
docker compose up -d --build
اجرای مستقیم (دیباگ UI):
cd frontend
npm install
npm run dev
Frontend: http://localhost:3000
تکنولوژی
- Next.js 15.5.18 (پچ امنیتی — نسخه 14 دیگر پشتیبانی CVE ندارد)
- React 19، TypeScript، TailwindCSS
ساختار
frontend/
├── app/ # صفحات و layout (Next.js App Router)
├── components/ # کامپوننتهای UI
├── hooks/ # React hooks
├── lib/ # API client، theme، utilities
├── styles/ # CSS global و Tailwind
└── public/ # فایلهای استاتیک و theme.config.json