Enhance Next.js configuration and dependencies for improved functionality and localization support. Added support for internationalization with next-intl, updated global styles, and integrated new fonts. Removed default home page and updated README with project details and setup instructions.

This commit is contained in:
smhk1376 committed 2026-09-24 14:53:01 +03:30
1 parent 2911dea00b
commit 44f4fa98e2
320 files changed
+31666 -220

No files matched your search

+57 -21
View File
@@ -1,36 +1,72 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
# آموزش آزاد دانشگاه صنعتی امیرکبیر
## Getting Started
سایت معرفی دوره‌ها و برنامه‌های آموزش آزاد — Next.js App Router، Atomic Design، SEO-ready، فارسی RTL، محتوا از PostgreSQL با پنل ادمین.
First, run the development server:
## پیش‌نیاز
- Node.js 20+
- PostgreSQL با `DATABASE_URL` برای اتصال.
## راه‌اندازی
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
npm install
cp .env.example .env.local # اگر موجود نیست؛ DATABASE_URL را بگذار
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
## پایگاه داده
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
```bash
node db/migrate.mjs # اعمال migration‌ها (نسبت به قبل)
node db/seed.mjs # seed محتوای mock به DB (قابل تکرار، upsert)
node scripts/seed-admin.mjs # کاربر ادمین اولیه → admin@aut.ac.ir / admin123
node scripts/test-db-connection.mjs # تست اتصال → CONNECTION_OK
```
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
> محیط تست: credential در `docs/03-database.md`.
## Learn More
## اجرا
To learn more about Next.js, take a look at the following resources:
```bash
npm run dev # http://localhost:3000
npm run build && npm start
```
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
- سایت عمومی: http://localhost:3000
- پنل ادمین: http://localhost:3000/admin (لاگین با کاربر seed شده)
- لندینگ حرفه‌ای: http://localhost:3000/professional
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
## اسکریپت smoke (پس از `npm start`)
## Deploy on Vercel
```bash
SMOKE_ADMIN_EMAIL=admin@aut.ac.ir SMOKE_ADMIN_PASSWORD=admin123 node scripts/smoke.mjs
# خروجی SMOKE_OK
```
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
## API عمومی (قرارداد `{ data }`)
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
- `GET /api/courses` · `GET /api/courses/[id]`
- `GET /api/programs`
- `GET /api/events`
- `GET /api/articles`
- `POST /api/registrations` — ثبت علاقه (public)
## ساختار
- داده: `src/lib/data/*` (فقط DB) · مپرها: `src/lib/db/mappers.ts` · هویت استاتیک: `src/lib/site-config.ts`
- ادمین: registry در `src/lib/admin/entities.ts`؛ صفحات در `src/app/admin/(guard)/**`
- mock: فقط برای seed در `src/lib/mock/*` — runtime از آن import نمی‌کند
## مستندات ایجنت
شروع از `AGENTS.md` → `PLAYBOOK.md` → `docs/*`
- پلن و وضعیت: `docs/04-development-plan.md` · پیشرفت: `docs/state/progress.md`
- تصمیم‌ها: `docs/log/decisions.md` · دیتابیس: `docs/03-database.md`
## چک
```bash
npx tsc --noEmit
npm run lint
npm run build
```