Compare commits

...
31 Commits
Author SHA1 Message Date
smhk1376 a60718aaf9 Merge branch 'master' of https://git.mstaut.ir/smhk1376/Aut.ManagementFaculty
Deploy edu.mstaut.ir / deploy (push) Successful in 22m37s
2026-10-28 14:04:33 +03:30
smhk1376 2858b9c746 Remove unused redirects from the Next.js configuration and update package dependencies to include new Tiptap extensions for enhanced text editing capabilities. Clean up the database seeding script by removing commented-out code and ensuring proper deletion of obsolete entries. Update various pages to handle not found scenarios gracefully, improving user experience across the application. 2026-10-28 14:04:17 +03:30
smhk1376 8cf4490f21 Update docker-compose.yml
Deploy edu.mstaut.ir / deploy (push) Successful in 13m59s
2026-10-22 10:11:30 +00:00
smhk1376 4b84409ed7 Enhance course management by adding 'featured' and 'sort_order' fields to the database schema and related components. Update course filtering and display logic to prioritize featured courses in the catalog. Modify admin interfaces for course creation and editing to include new fields, ensuring proper handling in both the frontend and backend. Update documentation to reflect these changes. 2026-10-22 13:23:43 +03:30
smhk1376 1641edfd01 Refactor image upload handling by moving upload directory outside of public folder for better compatibility with Next.js. Update related Docker configurations and scripts to reflect new upload paths. Replace instances of Next.js Image component with CmsImage for consistent image handling across the application. 2026-10-22 12:51:18 +03:30
smhk1376 0a57ef2b80 Update deployment workflow to enhance VPS build process by removing unsupported Docker cache mount. Improved clarity in deployment documentation.
Deploy edu.mstaut.ir / deploy (push) Successful in 16m57s
2026-10-20 01:22:57 +03:30
smhk1376andCursor 7d7b55f060 Fix VPS build: drop Docker cache mount unsupported on host daemon.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-20 01:22:27 +03:30
smhk1376 fe3d153ef1 Add local database dump directory to .gitignore to prevent accidental commits of backups.
Deploy edu.mstaut.ir / deploy (push) Failing after 34s
2026-10-20 01:21:16 +03:30
smhk1376andCursor 29b71c228e Fix Gitea deploy: restore VPS shell workflow without GitHub Actions.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-20 01:20:36 +03:30
smhk1376 e1b5286946 Refactor deployment workflow to utilize GitHub Actions for improved efficiency. Updated deploy.yml to include actions for checkout and Node.js setup, streamlined build process for Next.js with prebuilt assets, and revised deployment script to eliminate unnecessary steps. Enhanced documentation for clarity on automated deployment process. 2026-10-20 01:17:13 +03:30
smhk1376andCursor bd2cfa5a26 Add rich HTML course lead/body and refresh AI course media from delivery v2.
Deploy edu.mstaut.ir / deploy (push) Has been cancelled
Course detail pages can show sanitized HTML ad copy under the hero and a structured body; posters and brochures are updated for both AI workshops.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-20 00:54:30 +03:30
smhk1376 afd2b3333c Update docs/deployment.md
Deploy edu.mstaut.ir / deploy (push) Successful in 11m1s
2026-10-16 14:17:55 +00:00
smhk1376 05b0a1af72 Update image references to use WebP format for improved performance and remove unused design candidates from the project. Adjusted placeholder image handling in the faculty import script and updated metadata for various pages to reflect the new image paths. 2026-10-16 17:45:55 +03:30
smhk1376 5b0a394216 Refactor BrandLogo component to use native img element for improved loading performance and adjust styling for better responsiveness. Removed fixed width/height attributes to maintain aspect ratio.
Deploy edu.mstaut.ir / deploy (push) Successful in 11m53s
2026-10-16 17:28:12 +03:30
smhk1376andCursor 2709181557 Size horizontal logo to full header height without zoom.
Deploy edu.mstaut.ir / deploy (push) Has been cancelled
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-16 17:22:48 +03:30
smhk1376andCursor 6745fcdc3f Restore large horizontal logo in header slot without changing header height.
Deploy edu.mstaut.ir / deploy (push) Has been cancelled
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-16 17:22:01 +03:30
smhk1376andCursor 2f80b96a95 Keep horizontal header logo; fix oversized stretch scaling.
Replace the 235% zoom hack with header-slot height and object-contain so aspect ratio stays correct.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-16 17:20:48 +03:30
smhk1376andCursor cf29d44ff8 Revert header logo to the agreed seal mark size.
Deploy edu.mstaut.ir / deploy (push) Successful in 12m1s
The temporary horizontal wordmark used 235% height and overpowered the header.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-16 17:06:25 +03:30
smhk1376andCursor c97498a2ae Fix deploy health check for /mstcontroller and cut ready-loop waste.
Deploy edu.mstaut.ir / deploy (push) Successful in 5m56s
Admin login moved off /admin; old path caused 404 spam for up to two minutes. Slim smoke checks, shorter retries, quieter migrate logs, and npm ci without audit in the image build.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-16 16:57:31 +03:30
smhk1376andCursor 69bdaf0113 Clear stale git lock files before production checkout fetch.
Deploy edu.mstaut.ir / deploy (push) Has been cancelled
Interrupted shallow fetches leave shallow.lock and block the next deploy.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-16 16:33:28 +03:30
smhk1376andCursor 8eee3242bf Trigger deploy workflow with a no-op docs probe.
Deploy edu.mstaut.ir / deploy (push) Failing after 12s
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-16 16:32:11 +03:30
smhk1376 4405097f56 Refactor course management features and enhance navigation. Updated course data structure to include new fields for poster and brochure images, improved tag management, and refined admin filters for better usability. Adjusted navigation links to align with the updated course and faculty structure. 2026-10-16 16:27:24 +03:30
smhk1376andCursor 2b0db26a93 Ship site UI checklist, move admin to /mstcontroller, and add safe taxonomy label migration.
Deploy edu.mstaut.ir / deploy (push) Has been cancelled
Production already has migrations through 008; 009 only updates four seed labels by id. Faculty sync remains upsert-by-email/name and does not wipe curated data.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-16 16:26:21 +03:30
smhk1376andCursor 3eea1c35a6 Update course banners, brochures, and archive offerings.
Deploy edu.mstaut.ir / deploy (push) Has been cancelled
Ship delivery webp assets for AI Fluency and organizational AI transformation, keep brochure-only courses without fake card banners, and seed nine past open-education courses for production.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-16 16:12:36 +03:30
smhk1376 6e2c9f1ad7 Remove unused probe-taxonomy script and refactor CategoryCourseExplorer component. Updated navigation logic to streamline category and tag selection, replacing router usage with local state management for improved performance. 2026-10-16 14:08:11 +03:30
smhk1376andCursor de800d27b1 Apply the public site UI checklist.
Align header, footer, brand, homepage course preview, faculty links, and the course catalog with the documented changes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-16 14:05:33 +03:30
smhk1376 8886aa8640 changes 2026-10-15 10:10:30 +03:30
smhk1376andCursor a99af426db Merge origin/master: keep upload volume and secure DATABASE_URL
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-11 21:07:35 +03:30
smhk1376 66a8e8f213 Enhance image upload functionality for admin and improve course navigation. Added support for image uploads in course forms and generic forms, utilizing a new ImageUploadField component. Updated navigation to dynamically include course tags and refined layout components for better user experience. Configured Docker for persistent uploads with a dedicated volume. 2026-10-11 21:05:52 +03:30
bestmahdi2 8233dd8a24 Deploy edu production through same-host Gitea runner
Deploy edu.mstaut.ir / deploy (push) Successful in 4m3s
2026-10-06 11:45:44 +03:30
smhk1376andCursor ef1ccea0ad Security: sanitize database credentials and IP addresses from files and configs
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-02 14:32:24 +03:30
359 changed files with 12233 additions and 3352 deletions

No files matched your search

+3
View File
@@ -18,6 +18,9 @@
.claude
skills
# unused design candidates (not referenced by the app)
/public/CandidatesIMages
# project meta / docs
memory-bank
docs
+39
View File
@@ -0,0 +1,39 @@
name: Deploy edu.mstaut.ir
on:
push:
branches: [master]
workflow_dispatch:
concurrency:
group: edu-production
cancel-in-progress: false
jobs:
deploy:
runs-on: local-host
steps:
- name: Build and deploy on the VPS
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO_ACTOR: ${{ github.actor }}
REPO_NAME: ${{ github.repository }}
DEPLOY_SHA: ${{ github.sha }}
run: |
set -euo pipefail
TARGET=/opt/prod/Aut.ManagementFaculty
mkdir -p "$TARGET"
if [ ! -d "$TARGET/.git" ]; then
git -C "$TARGET" init
git -C "$TARGET" remote add origin "http://127.0.0.1:8301/$REPO_NAME.git"
fi
rm -f \
"$TARGET/.git/shallow.lock" \
"$TARGET/.git/index.lock" \
"$TARGET/.git/HEAD.lock" \
"$TARGET/.git/config.lock"
AUTH=$(printf '%s:%s' "$REPO_ACTOR" "$REPO_TOKEN" | base64 -w0)
git -C "$TARGET" -c "http.extraHeader=Authorization: Basic $AUTH" fetch --depth=1 origin "$DEPLOY_SHA"
unset AUTH REPO_TOKEN
git -C "$TARGET" checkout --detach --force FETCH_HEAD
bash "$TARGET/scripts/vps-autodeploy.sh"
+3 -3
View File
@@ -11,7 +11,7 @@ env:
IMAGE_NAME: aut-management-faculty:latest
CONTAINER_NAME: aut-management-faculty
NETWORK_NAME: shared_web_network
PUBLIC_HOST: aut.insaight.net
PUBLIC_HOST: edu.mstaut.ir
DOCKER_BUILDKIT: "0"
jobs:
@@ -30,7 +30,7 @@ jobs:
env:
DISABLE_REACT_COMPILER: "1"
NEXT_TELEMETRY_DISABLED: "1"
NEXT_PUBLIC_SITE_URL: https://aut.insaight.net
NEXT_PUBLIC_SITE_URL: https://edu.mstaut.ir
run: |
set -euo pipefail
npm ci --no-audit --no-fund
@@ -139,7 +139,7 @@ jobs:
env:
# Same-host Docker: use Postgres container DNS name on shared_web_network.
# Public IP (185.36.145.12) works from outside the server, not from sibling containers.
DATABASE_URL: postgresql://managment_web:hD3H9seTqX1GJMu1mDJBGDYr@insaight-postgres:5432/ManagmentWebSite_Db
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: |
set -euo pipefail
docker rm -f "$CONTAINER_NAME" 2>/dev/null || true
+8
View File
@@ -2,6 +2,7 @@
# dependencies
/node_modules
/.npm-cache
/.pnp
.pnp.*
.yarn/*
@@ -24,6 +25,10 @@
.DS_Store
*.pem
# admin-uploaded images (served by GET /uploads/[...path], not public/)
/uploads/
/public/uploads/
# debug
npm-debug.log*
yarn-debug.log*
@@ -33,6 +38,9 @@ yarn-error.log*
# env files (can opt-in for committing if needed)
.env*
# local database dumps — never commit
/backups/
# vercel
.vercel
+12 -1
View File
@@ -1,12 +1,17 @@
# syntax=docker/dockerfile:1
# ---- Dependencies ----
FROM node:22-alpine AS deps
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
# Skip audit/fund in image builds (saves ~30–60s); keep npm cache across deploys.
RUN --mount=type=cache,target=/root/.npm \
npm ci --no-audit --no-fund
# ---- Builder ----
FROM node:22-alpine AS builder
WORKDIR /app
ARG NEXT_PUBLIC_SITE_URL=https://edu.mstaut.ir
ENV NEXT_PUBLIC_SITE_URL=$NEXT_PUBLIC_SITE_URL
ENV NEXT_TELEMETRY_DISABLED=1
# Skip React Compiler in image builds (big CPU/RAM cost on self-hosted runners)
ENV DISABLE_REACT_COMPILER=1
@@ -31,6 +36,12 @@ COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
# Writable dir for admin image uploads (mount a volume in compose for persistence).
# Keep this outside public/: Next standalone does not serve runtime public files.
RUN rm -rf ./public/uploads \
&& mkdir -p ./uploads \
&& chown -R nextjs:nodejs ./uploads
USER nextjs
EXPOSE 3000
+6
View File
@@ -18,6 +18,12 @@ COPY --chown=nextjs:nodejs . ./
# Next warns/breaks if a legacy root-level ./static exists alongside ./public
RUN rm -rf ./static
# Writable dir for admin image uploads (mount a volume in compose for persistence).
# Keep this outside public/: Next standalone does not serve runtime public files.
RUN rm -rf ./public/uploads \
&& mkdir -p ./uploads \
&& chown -R nextjs:nodejs ./uploads
USER nextjs
EXPOSE 3000
CMD ["node", "server.js"]
+2 -2
View File
@@ -33,7 +33,7 @@ npm run build && npm start
```
- سایت عمومی: http://localhost:3000
- پنل ادمین: http://localhost:3000/admin (لاگین با کاربر seed شده)
- پنل ادمین: http://localhost:3000/mstcontroller (لاگین با کاربر seed شده)
- لندینگ حرفه‌ای: http://localhost:3000/professional
## اسکریپت smoke (پس از `npm start`)
@@ -54,7 +54,7 @@ SMOKE_ADMIN_EMAIL=admin@aut.ac.ir SMOKE_ADMIN_PASSWORD=admin123 node scripts/smo
## ساختار
- داده: `src/lib/data/*` (فقط DB) · مپرها: `src/lib/db/mappers.ts` · هویت استاتیک: `src/lib/site-config.ts`
- ادمین: registry در `src/lib/admin/entities.ts`؛ صفحات در `src/app/admin/(guard)/**`
- ادمین: registry در `src/lib/admin/entities.ts`؛ صفحات در `src/app/mstcontroller/(guard)/**`
- mock: فقط برای seed در `src/lib/mock/*` — runtime از آن import نمی‌کند
## مستندات ایجنت
+5 -5
View File
@@ -74,16 +74,16 @@ async function main() {
}
const tables = await client.query(`
SELECT table_name
SELECT count(*)::int AS n
FROM information_schema.tables
WHERE table_schema = 'public' AND table_type = 'BASE TABLE'
ORDER BY table_name
`);
console.log(`applied_count: ${appliedCount}`);
console.log(`skipped (already applied): ${skipped.length ? skipped.join(", ") : "none"}`);
console.log(`tables_count: ${tables.rows.length}`);
console.log(JSON.stringify(tables.rows.map((r) => r.table_name)));
if (skipped.length) {
console.log(`skipped_count: ${skipped.length}`);
}
console.log(`tables_count: ${tables.rows[0].n}`);
} finally {
await client.end().catch(() => {});
}
+148
View File
@@ -0,0 +1,148 @@
-- Course taxonomy: admin-managed categories (topics) + tags (types), many-to-many.
-- Backfills from legacy courses.category (enum) and courses.tags (text[]), then drops them.
CREATE TABLE IF NOT EXISTS course_categories (
id TEXT PRIMARY KEY,
slug TEXT UNIQUE NOT NULL,
label TEXT NOT NULL,
sort_order INT NOT NULL DEFAULT 0,
show_in_filter BOOLEAN NOT NULL DEFAULT true,
published BOOLEAN NOT NULL DEFAULT true,
created_at TIMESTAMPTZ DEFAULT now(),
updated_at TIMESTAMPTZ DEFAULT now()
);
CREATE TABLE IF NOT EXISTS course_tags (
id TEXT PRIMARY KEY,
slug TEXT UNIQUE NOT NULL,
label TEXT NOT NULL,
sort_order INT NOT NULL DEFAULT 0,
show_in_nav BOOLEAN NOT NULL DEFAULT true,
show_in_filter BOOLEAN NOT NULL DEFAULT true,
published BOOLEAN NOT NULL DEFAULT true,
created_at TIMESTAMPTZ DEFAULT now(),
updated_at TIMESTAMPTZ DEFAULT now()
);
CREATE TABLE IF NOT EXISTS course_category_links (
course_id TEXT NOT NULL REFERENCES courses(id) ON DELETE CASCADE,
category_id TEXT NOT NULL REFERENCES course_categories(id) ON DELETE CASCADE,
PRIMARY KEY (course_id, category_id)
);
CREATE TABLE IF NOT EXISTS course_tag_links (
course_id TEXT NOT NULL REFERENCES courses(id) ON DELETE CASCADE,
tag_id TEXT NOT NULL REFERENCES course_tags(id) ON DELETE CASCADE,
PRIMARY KEY (course_id, tag_id)
);
CREATE INDEX IF NOT EXISTS idx_course_category_links_category
ON course_category_links (category_id);
CREATE INDEX IF NOT EXISTS idx_course_tag_links_tag
ON course_tag_links (tag_id);
-- Seed canonical categories (stable ids = cat-<slug>)
INSERT INTO course_categories (id, slug, label, sort_order, show_in_filter, published)
VALUES
('cat-technology', 'technology', 'هوش مصنوعی و تحول سازمان', 10, true, true),
('cat-digital', 'digital', 'برند و بازاریابی', 20, true, true),
('cat-innovation', 'innovation', 'برندینگ', 30, true, true),
('cat-leadership', 'leadership', 'هم‌اندیشی مدیریتی', 40, true, true),
('cat-energy', 'energy', 'انرژی', 50, true, true),
('cat-design', 'design', 'طراحی', 60, true, true)
ON CONFLICT (id) DO UPDATE SET
slug = EXCLUDED.slug,
label = EXCLUDED.label,
sort_order = EXCLUDED.sort_order;
-- Seed known nav tags
INSERT INTO course_tags (id, slug, label, sort_order, show_in_nav, show_in_filter, published)
VALUES
('tag-workshops', 'workshops', 'کارگاه‌ها', 10, true, true, true),
('tag-corporate', 'corporate', 'دوره‌های سازمانی', 20, true, true, true),
('tag-archive', 'archive', 'گزیده دوره‌های برگزار شده', 30, true, true, true)
ON CONFLICT (id) DO UPDATE SET
slug = EXCLUDED.slug,
label = EXCLUDED.label,
sort_order = EXCLUDED.sort_order;
-- Any extra free-text tags from legacy column → new tag rows (slug derived)
DO $$
DECLARE
r RECORD;
new_id TEXT;
new_slug TEXT;
n INT := 100;
BEGIN
IF EXISTS (
SELECT 1 FROM information_schema.columns
WHERE table_name = 'courses' AND column_name = 'tags'
) THEN
FOR r IN
SELECT DISTINCT trim(t) AS label
FROM courses, UNNEST(tags) AS t
WHERE trim(t) <> ''
AND trim(t) NOT IN (
SELECT label FROM course_tags
)
LOOP
new_slug := 'tag-' || substr(md5(r.label), 1, 12);
new_id := 'tag-auto-' || substr(md5(r.label), 1, 12);
INSERT INTO course_tags (id, slug, label, sort_order, show_in_nav, show_in_filter, published)
VALUES (new_id, new_slug, r.label, n, true, true, true)
ON CONFLICT (slug) DO NOTHING;
n := n + 10;
END LOOP;
END IF;
END;
$$;
-- Link courses → categories from legacy category column
DO $$
BEGIN
IF EXISTS (
SELECT 1 FROM information_schema.columns
WHERE table_name = 'courses' AND column_name = 'category'
) THEN
INSERT INTO course_category_links (course_id, category_id)
SELECT c.id, cat.id
FROM courses c
JOIN course_categories cat ON cat.slug = c.category
ON CONFLICT DO NOTHING;
END IF;
END;
$$;
-- Link courses → tags from legacy tags array (match by label)
DO $$
BEGIN
IF EXISTS (
SELECT 1 FROM information_schema.columns
WHERE table_name = 'courses' AND column_name = 'tags'
) THEN
INSERT INTO course_tag_links (course_id, tag_id)
SELECT DISTINCT c.id, t.id
FROM courses c
CROSS JOIN LATERAL UNNEST(c.tags) AS raw(label)
JOIN course_tags t ON t.label = trim(raw.label)
WHERE trim(raw.label) <> ''
ON CONFLICT DO NOTHING;
END IF;
END;
$$;
-- Drop legacy columns
ALTER TABLE courses DROP CONSTRAINT IF EXISTS courses_category_check;
ALTER TABLE courses DROP COLUMN IF EXISTS category;
ALTER TABLE courses DROP COLUMN IF EXISTS tags;
-- updated_at triggers
DROP TRIGGER IF EXISTS trg_course_categories_set_updated_at ON course_categories;
CREATE TRIGGER trg_course_categories_set_updated_at
BEFORE UPDATE ON course_categories
FOR EACH ROW EXECUTE FUNCTION set_updated_at();
DROP TRIGGER IF EXISTS trg_course_tags_set_updated_at ON course_tags;
CREATE TRIGGER trg_course_tags_set_updated_at
BEFORE UPDATE ON course_tags
FOR EACH ROW EXECUTE FUNCTION set_updated_at();
@@ -0,0 +1,13 @@
-- Faculty profile URL (external MST page) + course↔faculty references
ALTER TABLE faculty_members
ADD COLUMN IF NOT EXISTS profile_url TEXT;
CREATE TABLE IF NOT EXISTS course_faculty_links (
course_id TEXT NOT NULL REFERENCES courses(id) ON DELETE CASCADE,
faculty_id TEXT NOT NULL REFERENCES faculty_members(id) ON DELETE CASCADE,
PRIMARY KEY (course_id, faculty_id)
);
CREATE INDEX IF NOT EXISTS idx_course_faculty_links_faculty
ON course_faculty_links (faculty_id);
@@ -0,0 +1,18 @@
-- Normalize taxonomy labels (remove ZWNJ) without re-running 007.
-- Safe to re-run: updates by stable primary key only.
UPDATE course_categories
SET label = 'هم اندیشی مدیریتی', updated_at = now()
WHERE id = 'cat-leadership';
UPDATE course_tags
SET label = 'کارگاه ها', updated_at = now()
WHERE id = 'tag-workshops';
UPDATE course_tags
SET label = 'دوره های سازمانی', updated_at = now()
WHERE id = 'tag-corporate';
UPDATE course_tags
SET label = 'گزیده دوره های برگزار شده', updated_at = now()
WHERE id = 'tag-archive';
+4
View File
@@ -0,0 +1,4 @@
-- Rich HTML fields for course detail: ad lead under hero title + main body.
ALTER TABLE courses
ADD COLUMN IF NOT EXISTS lead_html TEXT NOT NULL DEFAULT '',
ADD COLUMN IF NOT EXISTS body_html TEXT NOT NULL DEFAULT '';
+5
View File
@@ -0,0 +1,5 @@
-- Catalog pin + manual order for current courses.
-- Archive grouping still uses tag-archive; featured never lifts an archive course.
ALTER TABLE courses
ADD COLUMN IF NOT EXISTS featured BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN IF NOT EXISTS sort_order INT NOT NULL DEFAULT 0;
@@ -0,0 +1,8 @@
-- Public sections other than courses are retired.
-- Drop their rows so they cannot be served or listed again.
DELETE FROM articles;
DELETE FROM events;
DELETE FROM programs;
DELETE FROM intersection_topics;
DELETE FROM alumni_stories;
DELETE FROM testimonials;
+4
View File
@@ -0,0 +1,4 @@
-- Optional schedule for a course: when it starts, and when it is held.
ALTER TABLE courses
ADD COLUMN IF NOT EXISTS start_date DATE,
ADD COLUMN IF NOT EXISTS held_date DATE;
+21
View File
@@ -0,0 +1,21 @@
-- News items shown on /news. Separate from articles (long-form insights).
CREATE TABLE IF NOT EXISTS news_items (
id TEXT PRIMARY KEY,
title TEXT NOT NULL,
banner_image_url TEXT NOT NULL,
body TEXT NOT NULL,
gallery_images JSONB NOT NULL DEFAULT '[]',
published_at DATE NOT NULL,
published BOOLEAN DEFAULT true,
created_at TIMESTAMPTZ DEFAULT now(),
updated_at TIMESTAMPTZ DEFAULT now()
);
CREATE INDEX IF NOT EXISTS idx_news_items_published_at
ON news_items (published, published_at DESC);
DROP TRIGGER IF EXISTS trg_news_items_set_updated_at ON news_items;
CREATE TRIGGER trg_news_items_set_updated_at
BEFORE UPDATE ON news_items
FOR EACH ROW EXECUTE FUNCTION set_updated_at();
+6
View File
@@ -0,0 +1,6 @@
-- One date per course: when it starts being held.
UPDATE courses
SET start_date = held_date
WHERE start_date IS NULL AND held_date IS NOT NULL;
ALTER TABLE courses DROP COLUMN IF EXISTS held_date;
+78 -35
View File
@@ -8,31 +8,23 @@ import { fileURLToPath } from "node:url";
import pg from "pg";
import { courses } from "../src/lib/mock/courses.ts";
import { programs } from "../src/lib/mock/programs.ts";
import { events } from "../src/lib/mock/events.ts";
import { articles } from "../src/lib/mock/articles.ts";
import {
alumniStories,
campaignBanners,
faculty,
intersections,
legalPages,
stats,
testimonials,
} from "../src/lib/mock/site.ts";
import {
SEED_COURSE_CATEGORIES,
SEED_COURSE_TAGS,
} from "../src/lib/taxonomy.ts";
import {
alumniStoryToRow,
articleToRow,
campaignBannerToRow,
courseToRow,
eventToRow,
facultyMemberToRow,
intersectionTopicToRow,
legalPageToRow,
programToRow,
siteStatToRow,
testimonialToRow,
} from "../src/lib/db/mappers.ts";
if (!process.env.DATABASE_URL) {
@@ -81,9 +73,45 @@ async function main() {
results.push([table, n]);
});
await upsert(
"course_categories",
SEED_COURSE_CATEGORIES.map((c) => ({
id: c.id,
slug: c.slug,
label: c.label,
sort_order: c.sortOrder,
show_in_filter: true,
published: true,
})),
["id", "slug", "label", "sort_order", "show_in_filter", "published"],
);
await upsert(
"course_tags",
SEED_COURSE_TAGS.map((t) => ({
id: t.id,
slug: t.slug,
label: t.label,
sort_order: t.sortOrder,
show_in_nav: t.showInNav,
show_in_filter: true,
published: true,
})),
[
"id",
"slug",
"label",
"sort_order",
"show_in_nav",
"show_in_filter",
"published",
],
);
await upsert("courses", courses.map(courseToRow), [
"id", "slug", "title", "summary", "category", "duration_hours", "format", "price",
"registration_url", "poster_image_url", "brochure_image_url", "image_url", "seo_description", "published",
"id", "slug", "title", "summary", "duration_hours", "format", "price",
"registration_url", "poster_image_url", "brochure_image_url", "image_url",
"lead_html", "body_html", "seo_description", "published", "featured",
"sort_order",
]);
const courseIds = courses.map((c) => c.id);
await client.query(
@@ -91,29 +119,47 @@ async function main() {
[courseIds],
);
results.push(["courses_pruned", courseIds.length]);
await upsert("programs", programs.map(programToRow), [
"id", "slug", "title", "blurb", "group_key", "href", "tagline", "audience",
"duration_label", "format_label", "highlights", "body", "published",
]);
await upsert("events", events.map(eventToRow), [
"id", "title", "start_date", "end_date", "location", "href", "summary", "published",
]);
await upsert("articles", articles.map(articleToRow), [
"id", "title", "category", "excerpt", "image_url", "href", "featured",
"body", "published_at", "author", "published",
]);
await client.query(`DELETE FROM intersection_topics`);
await upsert("intersection_topics", intersections.map(intersectionTopicToRow), [
"id", "slug", "title", "description", "href", "image_url", "body", "highlights", "published",
]);
await client.query(`DELETE FROM course_category_links`);
await client.query(`DELETE FROM course_tag_links`);
let catLinks = 0;
let tagLinks = 0;
for (const course of courses) {
for (const cat of course.categories ?? []) {
await client.query(
`INSERT INTO course_category_links (course_id, category_id)
VALUES ($1, $2) ON CONFLICT DO NOTHING`,
[course.id, cat.id],
);
catLinks += 1;
}
for (const tag of course.tags ?? []) {
await client.query(
`INSERT INTO course_tag_links (course_id, tag_id)
VALUES ($1, $2) ON CONFLICT DO NOTHING`,
[course.id, tag.id],
);
tagLinks += 1;
}
}
results.push(["course_category_links", catLinks]);
results.push(["course_tag_links", tagLinks]);
for (const table of [
"programs",
"events",
"articles",
"intersection_topics",
"alumni_stories",
"testimonials",
]) {
const deleted = await client.query(`DELETE FROM ${table}`);
results.push([`${table}_cleared`, deleted.rowCount]);
}
await upsert("faculty_members", faculty.map(facultyMemberToRow), [
"id", "name", "title", "focus", "bio", "image_url",
"email", "office", "phone", "department", "linkedin_url", "scholar_url",
"published",
]);
await upsert("alumni_stories", alumniStories.map(alumniStoryToRow), [
"id", "title", "excerpt", "name", "program", "image_url", "href", "published",
]);
await upsert("campaign_banners", campaignBanners.map(campaignBannerToRow), [
"id", "version", "text", "href", "cta", "published",
]);
@@ -123,9 +169,6 @@ async function main() {
await upsert("site_stats", stats.map(siteStatToRow), [
"id", "value", "label", "published",
]);
await upsert("testimonials", testimonials.map(testimonialToRow), [
"id", "quote", "name", "role", "course_title", "published",
]);
const counts = await client.query(`
SELECT (SELECT count(*) FROM courses) AS courses,
+10 -2
View File
@@ -12,17 +12,25 @@ services:
- PORT=3000
- HOSTNAME=0.0.0.0
- NEXT_PUBLIC_SITE_URL=${NEXT_PUBLIC_SITE_URL:-https://edu.mstaut.ir}
- DATABASE_URL=${DATABASE_URL:-postgresql://managment_web:hD3H9seTqX1GJMu1mDJBGDYr@insaight-postgres:5432/ManagmentWebSite_Db}
- DATABASE_URL=${DATABASE_URL:?Set DATABASE_URL in a protected environment file}
- UPLOAD_DIR=/app/uploads
# Nginx Proxy Manager: edu.mstaut.ir → http://aut-management-faculty:3000
# DB: same Docker network as container `insaight-postgres` (not the public IP).
volumes:
- uploads_data:/app/uploads
expose:
- "3000"
networks:
- shared_web_network
ports:
- "3000:3000"
- "127.0.0.1:3000:3000"
volumes:
uploads_data:
networks:
shared_web_network:
external: true
name: shared_web_network
# TEST
+2 -2
View File
@@ -19,7 +19,7 @@
- i18n با `next-intl`؛ فعلاً فقط فارسی RTL
- داده: PostgreSQL + `src/lib/data/*` (accessor واحد)؛ mock فقط برای seed/مرجع
- پنل ادمین در همان اپ Next.js (auth session ساده؛ شبیه UI ادمین نماید)
- هویت بصری امیرکبیر (سرمه‌ای + سفید + accent آجری) — نه کپی برند MIT
- هویت بصری: سرمه‌ای `#1E3358` + سفید + خاکستری سرد؛ تأکیدی `#0C2461` — پالت در `docs/design-system-rules.md`
## Out of Scope
- پرداخت و اتصال درگاه
@@ -33,4 +33,4 @@
- لندینگ برندینگ سبک Professional (`/professional`) با هیرو، فیلتر دسته، آمار، نظرات (داده از DB)
- API عمومی خواندنی: `courses` / `programs` / `events` / `articles` روی قرارداد `{ data }`
- `POST /api/registrations` — ذخیرهٔ لید در DB + مشاهده/مدیریت در پنل ادمین
- پنل ادمین در `/admin` — CRUD ده موجودیت (courses, programs, events, articles, topics, faculty, alumni, banners, legal, stats, testimonials) + لیست registration leads
- پنل ادمین در `/mstcontroller` — CRUD ده موجودیت (courses, programs, events, articles, topics, faculty, alumni, banners, legal, stats, testimonials) + لیست registration leads
+8 -1
View File
@@ -45,7 +45,10 @@
| فیلد | توضیح |
|---|---|
| `course.category` | یکی از دسته‌های فیلتر لندینگ professional |
| `course.categories` | many-to-many با `course_categories` (موضوع؛ ادمین) |
| `course.tags` | many-to-many با `course_tags` (نوع/منو؛ ادمین) |
| `course.featured` | تیک ویژه؛ چند دورهٔ جاری می‌توانند ویژه باشند (محدودیت تک‌ویژهٔ مقاله اینجا نیست) |
| `course.sortOrder` | عدد ترتیب؛ کوچک‌تر جلوتر (مثل دسته/تگ) |
| `program.group` | `standard` یا `executive` برای selector هوم |
| `event.endDate` | اگر null باشد رویداد تک‌روزه است |
| `article.featured` | حداکثر یک مقاله featured در هوم |
@@ -55,6 +58,10 @@
- لیست برنامه‌های هوم: ابتدا `group=standard` سپس بلوک جدا `executive`.
- آمار لندینگ professional از mock ثابت خوانده می‌شود (تا اتصال analytics/DB).
- هیچ مبلغ/ظرفیت واقعی محاسبه نمی‌شود تا DB وصل شود.
- منوی صفحهٔ اصلی فقط **یک** دراپ‌داون دوره دارد؛ لیبل ریشه = `courseNavParentTag`؛ فرزندان = تگ‌های `show_in_nav`. فیلتر پایدار با **slug**: `/professional?tag=` و `/professional?category=` (مستند: `docs/LINKS.md`).
- دسته و تگ فقط از ادمین تعریف می‌شوند (`/admin/course-categories`، `/admin/course-tags`)؛ هر دوره می‌تواند چند دسته و چند تگ داشته باشد.
- ترتیب لیست عمومی دوره: غیرآرشیو، سپس `featured`، سپس `sort_order` صعودی، سپس عنوان. هوم و جستجو همین ترتیب را می‌گیرند؛ هوم آرشیو را نشان نمی‌دهد.
- تگ `archive` (گزیدهٔ برگزارشده) در کتالوگ بلوک جدا و ظاهر ملایم‌تر است؛ `featured` دورهٔ آرشیو را به بلوک جاری بالا نمی‌آورد.
## Locale / Format Rules
- زبان UI: فارسی؛ `dir="rtl"`؛ اعداد نمایشی می‌توانند فارسی‌سازی شوند در لایهٔ UI.
+18 -10
View File
@@ -1,12 +1,10 @@
# Database (Test)
> محیط تست — امنیت فعلاً اولویت نیست. این فایل شامل credential اتصال است.
# Database
## وضعیت اتصال
| مورد | مقدار |
|---|---|
| وضعیت | متصل و تأییدشده روی `185.36.145.12` (`2026-09-29`) |
| وضعیت | متصل و تأییدشده |
| Engine | PostgreSQL **16.15** |
| Encoding | **UTF8** |
| جداول فعلی | ۱۴ جدول داده + `schema_migrations` (فاز A تا H؛ لیست در بخش Schema) |
@@ -15,11 +13,11 @@
| فیلد | مقدار |
|---|---|
| Host | `185.36.145.12` |
| Host | از متغیر محیطی `DATABASE_URL` یا `PGHOST` استفاده شود |
| Port | `5432` |
| Database | `ManagmentWebSite_Db` |
| Username | `managment_web` |
| Password | `hD3H9seTqX1GJMu1mDJBGDYr` |
| Password | از متغیر محیطی خوانده می‌شود |
| Engine | PostgreSQL 16.15 |
| Encoding | UTF8 |
@@ -28,22 +26,26 @@
از **خارج سرور** (لپ‌تاپ / migrate / seed):
```
postgresql://managment_web:hD3H9seTqX1GJMu1mDJBGDYr@185.36.145.12:5432/ManagmentWebSite_Db
postgresql://<user>:<password>@<host>:5432/ManagmentWebSite_Db
```
از **داخل Docker** روی همان سرور (کانتینر وب → کانتینر `insaight-postgres` روی `shared_web_network`):
```
postgresql://managment_web:hD3H9seTqX1GJMu1mDJBGDYr@insaight-postgres:5432/ManagmentWebSite_Db
postgresql://<user>:<password>@insaight-postgres:5432/ManagmentWebSite_Db
```
برای اپلیکیشن از متغیر محیطی استفاده شود. در `deploy.yml` / `docker-compose.yml` هاست `insaight-postgres` است.
```env
# local (.env.local)
DATABASE_URL=postgresql://managment_web:hD3H9seTqX1GJMu1mDJBGDYr@185.36.145.12:5432/ManagmentWebSite_Db
DATABASE_URL=postgresql://<user>:<password>@<host>:5432/ManagmentWebSite_Db
# optional — default 20000; raise if remote host is slow to accept TCP
# DATABASE_CONNECTION_TIMEOUT_MS=20000
```
Pool در `src/lib/db.ts` با `connectionTimeoutMillis` پیش‌فرض **۲۰ ثانیه** و TCP keepalive ساخته می‌شود (هاست ریموت گاهی بیشتر از ۵ثانیه طول می‌کشد). پس از timeout، pool ریست می‌شود تا درخواست بعدی دوباره تلاش کند.
فایل محلی: `.env.local` (در gitignore است).
Production باید مستقیم به نام کانتینر `insaight-postgres` وصل شود (نه IP عمومی از داخل bridge).
@@ -74,7 +76,7 @@ node scripts/test-db-connection.mjs
| جدول | نکته |
|---|---|
| `courses` | `category`/`format` با CHECK؛ `slug` UNIQUE؛ `price` اختیاری (تومان، NULL = مخفی در UI) |
| `courses` | `format` با CHECK؛ `slug` UNIQUE؛ `price` اختیاری؛ `featured` + `sort_order` (migration 011) |
| `programs` | `group_key` (به‌جای reserve واژهٔ `group`)؛ `highlights` JSONB |
| `events` | `start_date`/`end_date` DATE؛ `end_date` NULL = تک‌روزه |
| `articles` | `featured` + ایندکس جزئی `articles_one_featured` (حداکثر یک مقالهٔ published با `featured=true`) |
@@ -96,6 +98,12 @@ node scripts/test-db-connection.mjs
- `idx_programs_title` / `idx_courses_title` روی `(published, title)`.
- `courses.slug`, `programs.slug`, `intersection_topics.slug` از 001 UNIQUE هستند و ایندکس جزئی `articles_one_featured` از 001 موجود است — تکرار نشده‌اند.
## اولویت کاتالوگ (011)
- Migration: `db/migrations/011_course_priority.sql`.
- `courses.featured BOOLEAN NOT NULL DEFAULT false` و `courses.sort_order INT NOT NULL DEFAULT 0`.
- لیست عمومی: غیرآرشیو (`tag-archive`) سپس ویژه سپس `sort_order` سپس عنوان. آرشیو با تگ جدا می‌شود، نه با ستون جدید.
## Admin (فاز E — 2026-09-22)
- مکانیزم: `admin_users` (رمز با scrypt در `password_hash`، هرگز plaintext) + `admin_sessions` (توکن تصادفی؛ `token_hash` در DB ذخیره می‌شود؛ cookie فقط `admin_session` HttpOnly/SameSite=Lax).
+59
View File
@@ -0,0 +1,59 @@
# لینک‌های عمومی سایت
مسیرهای پایدار برای ناوبری، اشتراک‌گذاری و فیلتر. لیبل ریشهٔ منو از `courseNavParentTag` در [`src/lib/site-config.ts`](../src/lib/site-config.ts)؛ آیتم‌ها و فیلترها از جداول ادمین‌محور `course_tags` / `course_categories` (slug پایدار).
## کاتالوگ دوره‌ها
| توضیح | مسیر |
|---|---|
| همه دوره‌ها (ریشهٔ منو) | `/professional` |
| فیلتر با تگ | `/professional?tag=<slug>` |
| فیلتر با دسته | `/professional?category=<slug>` |
| هر دو فیلتر | `/professional?tag=<slug>&category=<slug>` |
| گزیدهٔ برگزارشده | `/professional?tag=archive` (در لیست کامل، بلوک جدا زیر دوره‌های جاری) |
### تگ پدر (لیبل منو)
- مقدار فعلی: **`دوره‌ها`** (`courseNavParentTag`)
- یک دراپ‌داون در منوی اصلی؛ فرزندان = تگ‌های منتشرشده با `show_in_nav`
- کلیک روی ریشه → `/professional`
### نمونه slugهای seed
| نوع | slug | لیبل |
|---|---|---|
| تگ | `workshops` | کارگاه‌ها |
| تگ | `corporate` | دوره‌های سازمانی |
| تگ | `archive` | گزیده دوره‌های برگزار شده |
| دسته | `technology` | هوش مصنوعی و تحول سازمان |
| دسته | `digital` | برند و بازاریابی |
در کد:
```ts
import { courseCatalogHref, courseTagHref, courseCategoryHref } from "@/lib/course-nav";
courseCatalogHref(); // "/professional"
courseTagHref("workshops"); // "/professional?tag=workshops"
courseCategoryHref("technology"); // "/professional?category=technology"
```
## سایر مسیرهای اصلی
| صفحه | مسیر |
|---|---|
| صفحه اصلی | `/` |
| ارزش‌ها | `/values` |
| درباره ما | `/about` |
| تماس | `/contact` |
| رویدادها | `/events` |
| بینش‌ها | `/insights` |
| ثبت‌نام دوره | `/register/<slug>` |
## ادمین تاکسونومی
| بخش | مسیر |
|---|---|
| دسته‌بندی دوره‌ها | `/mstcontroller/course-categories` |
| تگ‌های دوره | `/mstcontroller/course-tags` |
| دوره‌ها | `/mstcontroller/courses` |
+54
View File
@@ -0,0 +1,54 @@
# تغییرات UI سایت (چک‌لیست)
وضعیت: `[ ]` باز · `[x]` انجام‌شده · `[blocked]` منتظر ورودی کاربر
## هدر و ناوبری
- [x] 1. فاصله بین دکمه‌های هدر بیشتر شود (تعادل اکشن‌های چپ/راست)
- [x] 2. دکمه «تماس با ما» کنار دکمه سرچ
- [x] 4. دکمه دانشگاه از هدر حذف → دسترسی سریع با برچسب «دانشکده» (`https://mst.aut.ac.ir/`)
- [x] 5. «درباره ما» بعد از «دوره‌ها»
- [x] 6. «برنامه‌ها» فعلاً مخفی (بدون لینک در UI)
- [x] 15. «رویدادها» از ناو مخفی؛ در هوم فقط تیزر CTA بدون کارت رویداد قطعی‌نشده
## فوتر
- [x] 16. دسترسی سریع: سایت دانشکده (بدون معرفی اساتید در این سایت)
## هویت بصری
- [x] 3. فونت وزیرمتن (Vazirmatn)
- [x] 7. لوگوی دانشکده (نشان بدون متن کناری؛ favicon از MstAut)
- [x] 10. همه جا «دانشگاه صنعتی امیرکبیر» (نه «امیرکبیر» کوتاه)
- [x] 11. پالت رنگی پیکسلی (سرمه‌ای `#1E3358` + تأکیدی `#0C2461`؛ در `globals.css` + design-system-rules)
## صفحه اصلی
- [x] 24. کارت دوره در هوم مثل کاتالوگ کاملاً کلیک‌پذیر (`pointer-events-none` روی محتوا)
- [x] 8. حذف برد/کارت سکشن «چرا دانشگاه»
- [x] 9. حذف شماره‌های ۱–۲–۳ در «چرا دانشگاه»
- [x] 12. در هوم فقط ۶ دورهٔ آخر (بدون فیلتر/سرچ شلوغ؛ لینک به کاتالوگ)
- [x] 13. متن معرفی سکشن‌ها بزرگ‌تر
- [x] 14. عرض یکسان سکشن‌ها داخل Container (بدون full-bleed)
- [x] 22. بازنویسی پیام هوم (یادگیری برای تصمیم‌گیری و عمل)؛ حذف آمار عددی؛ چیدمان: پیام ← چرا اینجا ← دوره‌ها ← رویکرد ← رویدادها ← تیم‌ها ← پیام پایانی
- [x] 23. معرفی اساتید از سایت عمومی حذف (هوم، ناو، درباره ما، جزئیات دوره، فوتر شبکه اساتید)
## اساتید (فقط ادمین / همگام‌سازی داخلی)
- [x] 17a. فیلد لینک پروفایل دانشکده + اسکیما/ادمین
- [x] 17b. ارتباط اختیاری دوره↔استاد
- [x] 17c. کپی/seed اساتید از شبکه دانشکده + دکمه بروزرسانی ادمین از لینک هدر
## صفحه دوره‌ها
- [x] 18. دسته‌ها بزرگ‌تر؛ تگ‌ها کمی کوچک‌تر
- [x] 19. سرچ آیکونی؛ با انیمیشن جایگزین دسته/تگ (هدر بدون دسته)
- [x] 20. کل کارت دوره قابل کلیک
- [x] 21. لیبل دسته/تگ روی کارت و جزئیات دوره کلیک‌پذیر (فیلتر)
---
## قفل‌کنندهٔ نسخه‌های بعدی (الان نکن)
منبع: لاگ دیپلوی پروداکشن `69bdaf0` (2026-10-16). وضعیت فعلی دیپلوی سالم است؛ این‌ها بدهی/به‌روزرسانی اختیاری‌اند و نباید وسط فیچر جاری باز شوند.
- [ ] **V-LOCK npm audit** — در `npm ci` داخل Docker: ۱۲ vulnerability (۱۱ high + ۱ critical). در نسخهٔ بعدی: `npm audit` / `npm audit fix` (بدون `--force` مگر بعد از تست)، سپس بیلد+دیپلوی استیجینگ.
- [ ] **V-LOCK ESLint EOL** — هشدار `eslint@9.39.5` deprecated / version-support. در نسخهٔ بعدی: ارتقا به خط پشتیبانی‌شدهٔ ESLint و هم‌تراز کردن config/پلاگین‌ها.
- [ ] **V-LOCK npm toolchain** — notice: npm داخل ایمیج `10.9.9` → پیشنهاد `12.x`. در نسخهٔ بعدی: تصمیم pinned (packageManager / image tag) و تست `npm ci` روی همان نسخه.
- [ ] **V-LOCK deploy checkout noise** — git detach روی `/opt/prod/...` هشدار «leaving 1 commit behind» می‌دهد (طبیعی برای shallow+detach). در نسخهٔ بعدی: در ورک‌فلو `fetch --prune` / پاکسازی refهای یتیم یا ساکت‌کردن هشدار غیرضروری تا لاگ تمیزتر شود.
- [ ] **V-LOCK Docker build context size** — transfer context حدود ۵۵MB در بیلد. در نسخهٔ بعدی: بازبینی `.dockerignore` و دارایی‌های سنگین `public/` تا کش deps کمتر invalidate شود و بیلد سبک‌تر شود.
- [ ] **V-LOCK Docker build wall-time** — بیلد پروداکشن ~۱۵–۲۰ دقیقه (npm ci + copy node_modules + Next webpack/TS با ۱ worker). در نسخهٔ بعدی: کش لایه/registry، کاهش دارایی در context، و در صورت امکان افزایش CPU برای workerهای Next.
+47
View File
@@ -0,0 +1,47 @@
# Production deployment
The production site is https://edu.mstaut.ir. Gitea runs on the same VPS.
**Normal releases are fully automatic:** a push to `master` (or
*workflow_dispatch* in Gitea) runs `.gitea/workflows/deploy.yml` on the
`local-host` runner — checkout, `npm ci` + `next build` on the runner host
(with npm cache), then `scripts/deploy-production.sh` with a prebuilt tree
(`Dockerfile.prebuilt`: no second `npm ci` / compile inside Docker). Backup,
migrations, smoke checks, and container swap need no manual steps.
`scripts/deploy-production.sh` builds the Docker image from `PREBUILT_DIR` in CI
(or from the full root `Dockerfile` only for emergency/local use without CI),
backs up the database to `/opt/backups/edu`, applies versioned migrations
(`node db/migrate.mjs` — idempotent via `schema_migrations`), checks a
candidate container, and replaces `aut-management-faculty`. It retains the
previous container and automatically restores it if the new container fails
its initial HTTPS check. Database migrations are forward-only (not
automatically reversed); the dump before migrate is the recovery path.
Uploaded admin images persist in the Docker volume `edu-uploads`.
Production settings are stored in `/etc/edu-production.env`, owned by root
with mode `600`. It contains `DATABASE_URL`, `NEXT_PUBLIC_SITE_URL`,
`NODE_ENV`, `PORT`, and `HOSTNAME`. Database credentials must never be
committed. The database host is `insaight-postgres` on
`shared_web_network`. Database dumps are in `/opt/backups/edu`.
Nginx proxies HTTPS to `127.0.0.1:3000`; the application port is bound only
to loopback. Nginx configuration is
`/etc/nginx/sites-available/edu.mstaut.ir.conf`. Certbot manages the
certificate under `/etc/letsencrypt/live/edu.mstaut.ir`, with automatic
renewal via `certbot.timer`.
When enabling ArvanCloud, use HTTPS for the connection to the origin on
port 443, with `edu.mstaut.ir` as the origin host name. Leave the ACME
challenge path accessible for certificate renewal and bypass caching for
admin pages, API requests, and authenticated traffic.
To inspect a deployment:
```sh
docker logs --tail 100 aut-management-faculty
curl --resolve edu.mstaut.ir:443:127.0.0.1 https://edu.mstaut.ir/
certbot renew --cert-name edu.mstaut.ir --dry-run
```
+56 -11
View File
@@ -9,25 +9,55 @@
---
## ۱. رنگ (توکن‌های shadcn)
## ۱. رنگ (پالت پیکسلی → توکن‌های shadcn)
| نقش | توکن | کاربرد |
منبع: استخراج از تصاویر مرجع سایت. هویت = **سرمه‌ای + سفید + خاکستری سرد روشن**؛ آبی تیره نقش تأکیدی دارد. فقط از CSS vars در `src/app/globals.css`.
### پالت خام
| رنگ | Hex | کاربرد |
|---|---|---|
| Primary (قرمز AUT) | `--primary` / `bg-primary` | CTA، لینک هاور |
| Accent (طلایی) | `--accent` / `bg-accent` | گوهٔ هیرو، هایلایت |
| Deep / navy | `--chart-3` / `--chart-2` | هیرو و باندهای تیره |
| Surface | `--background` / `--card` / `--muted` | صفحه، کارت، بخش ملایم |
| Text | `--foreground` / `--muted-foreground` | متن اصلی / ثانویه |
| Border | `--border` | جداکننده و Card ring |
| سرمه‌ای اصلی | `#1E3358` | هدر، فوتر، کادر اسلایدر، CTA |
| آبی تیره (تأکیدی) | `#0C2461` | نوار کارت، هاور، عناصر تأکیدی |
| خاکستری بسیار روشن | `#F5F6F8` | پس‌زمینه صفحات |
| سفید | `#FFFFFF` | کارت، لوگو، متن روی سرمه |
| آبی‌خاکستری روشن | `#E3E7EE` | حاشیه کارت و جداکننده |
| آبی بسیار روشن | `#EEF2F8` | دکمه روشن (مثلاً تماس با ما) |
**قانون:** هیچ `--brand-*` یا کلاس `ds-*` ننویس. رنگ فقط از utilityهای تم (`bg-primary`, `text-muted-foreground`, …).
### نگاشت به shadcn
| نقش پیشنهادی | توکن shadcn | Hex | کاربرد |
|---|---|---|---|
| `--primary` | `--primary` | `#1E3358` | هدر/فوتر/منو، دکمهٔ اصلی، هیرو (`chart-2`/`chart-3` هم‌رنگ) |
| `--accent` | `--accent` | `#0C2461` | نوار کارت، هاور لینک، عنوان رنگی |
| `--background` | `--background` | `#F5F6F8` | پس‌زمینه صفحه |
| `--surface` | `--card` / `--popover` | `#FFFFFF` | کارت و سطح |
| `--border` | `--border` / `--input` | `#E3E7EE` | حاشیه و جداکننده |
| `--surface-soft` | `--secondary` / `--muted` | `#EEF2F8` | دکمه روشن / بخش ملایم |
| متن | `--foreground` | `#1E3358` | عناوین و متن پایه |
| متن ثانویه | `--muted-foreground` | `#5C677A` | پاراگراف و توضیح |
| روی سرمه | `--primary-foreground` | `#FFFFFF` | متن/آیکون روی primary |
**سطوح تیره / هیرو / فوتر:** `bg-primary` + `text-primary-foreground` (نه `text-background`). روی سرمه، چیپ/CTA روشن از `bg-secondary` استفاده کند.
**شبکه عصبی (`MetamorphField`):** روی `tone="dark"` گره‌ها سفید/`secondary`؛ روی `tone="light"` جوهر `primary`/`accent`.
**Overlayها:** اسکرم دیالوگ/شیت = `bg-primary/45`؛ سرچ و آکادمیک روی `bg-background` با نوار گرادیان `primary→accent`.
**قانون:** هیچ `--brand-*`، `--surface*` یا کلاس `ds-*` ننویس. رنگ فقط از utilityهای تم (`bg-primary`, `bg-card`, `bg-secondary`, `text-accent`, …). هاور لینک: `text-accent`.
---
## ۲. تایپوگرافی و فاصله
- فونت: Vazirmatn از layout → `font-sans`
- تیترها: `text-3xl font-bold` / `text-2xl font-bold` / `text-lg font-semibold` (یا `Heading` نازک)
- فونت: Vazirmatn از layout → `font-sans` / `--font-heading` (وزن‌های ۴۰۰–۷۰۰)
- بدنه: `1rem` / `line-height: 1.75` (فارسی)
- تیترها فقط از `Heading`:
- H1: `text-3xl` → `sm:text-4xl` → `lg:text-5xl` · `font-bold`
- H2: `text-2xl` → `sm:text-3xl` · `font-bold`
- H3: `text-xl` · `font-semibold`
- H4: `text-lg` · `font-semibold`
- بدون `tracking-tight` روی متن فارسی؛ eyebrow معمولاً `text-xs`/`sm:text-sm`
- ظرف محتوا: `Container` (`max-w-7xl` + padding افقی) یا همان کلاس‌های Tailwind
---
@@ -44,6 +74,21 @@
| تب | `Tabs` |
| اسکلتون | `Skeleton` |
| نشان | `Badge` |
| هیروی صفحه | `PageHero` (`size="lg"` + `actions` برای لندینگ) |
| سرتیتر بخش | `SectionHeader` (eyebrow + title + description؛ `inverse` روی بخش تیره/قرمز) |
| زمینه بخش | `Section tone="default \| subtle \| muted \| dark \| accent"` — بدون override برای `py-*` |
| جزئیات برچسب/مقدار | `DetailList` |
| فهرست نکات | `CheckList` |
| آمار | `StatGrid` |
| فرم عمومی | `FormCard` + `ContactInterestForm` |
| دکمه روی زمینه تیره | `buttonVariants({ variant: "inverse" })` یا `DotCta onDark` |
| خطا / ۴۰۴ | `ErrorState` / `(main)/not-found.tsx` |
**قوانین تکمیلی:**
- اندازه تیترها فقط از `Heading` (level 1–4)؛ کلاس `text-*` روی تیتر override نشود.
- `Card` روی hover بلند نمی‌شود؛ فقط کارت‌های لینک‌دار با `SurfaceCard interactive`.
- پنل کناری صفحات جزئیات: `SurfaceCard padded` + `DetailList` + دکمه `size="lg" w-full`.
- رنگ خطا فقط `text-destructive`.
---
+5
View File
@@ -13,6 +13,11 @@
## سوالات پاسخ‌داده‌شده
### ابهام 01 — ✅ پاسخ داده شد
تاریخ: 2026-10-11 / پاسخ عملی 2026-10-12
سوال: لیبل تگ پدر منوی دوره‌ها؟
پاسخ: لیبل نمایشی ریشه «دوره‌ها» (`courseNavParentTag`) می‌ماند؛ فرزندان از تگ‌های DB با `show_in_nav` می‌آیند (D25).
<!-- بعد از پاسخ به اینجا منتقل می‌شود:
### ابهام NN — ✅ پاسخ داده شد
تاریخ: ...
+4 -1
View File
@@ -15,7 +15,7 @@
| 2026-09-22 | D9 — فاز ۱: همه مسیرهای منو/فوتر با mock + polish هوم | بستن ۴۰۴ها؛ بدون DB/پرداخت |
| 2026-09-22 | D10 — Design system با توکن CSS + کلاس‌های `ds-*` | ظاهر دانشگاهی یکدست؛ حرکت transform/opacity؛ بدون فانتزی؛ هم‌راستا با vercel skill |
| 2026-09-22 | D11 — بازسازی ۱:۱ بصری از تم زنده Sloan (فارسی RTL) | استخراج پالت/CTA/IA از mitsloan.mit.edu؛ Program Selector در overlay آکادمیک؛ نام‌گذاری AUT |
| 2026-09-22 | D12 — PostgreSQL تست روی `138.124.117.71`؛ جزئیات در `docs/03-database.md` | محیط تست؛ credential در docs قابل‌قبول؛ امنیت بعداً |
| 2026-09-22 | D12 — PostgreSQL تست؛ جزئیات در `docs/03-database.md` | محیط تست |
| 2026-09-29 | D12b — Postgres به `185.36.145.12` منتقل شد (`ManagmentWebSite_Db` / `managment_web`)؛ production deploy هم همان `DATABASE_URL` را می‌گیرد | سرور مشترک InsAIght |
| 2026-09-22 | D13 — پلن کامل توسعه در `docs/04-development-plan.md` (A–H؛ SQL/`pg`؛ ادمین در همان Next) | اجرای مرحله‌ای با ایجنت بدون حدس معماری؛ ORM اختیاری بعداً |
| 2026-09-22 | D14 — Schema و migration با SQL خام + runner سادهٔ `db/migrate.mjs` (نسخه‌گذاری در `schema_migrations`؛ هر فایل یک تراکنش؛ + `set_updated_at` trigger) | ایدمپوتنت و تکرارپذیر؛ بدون وابستگی ORM در فاز اول |
@@ -28,3 +28,6 @@
| 2026-09-24 | D21 — ادمین عمومی با رجیستری `ENTITIES` در `src/lib/admin/entities.ts` (fields/columns/apiPath/idColumn/preview/list/get) + صفحات یکپارچهٔ داینامیک `/admin/[entity]` (list/new/[id]/edit) به‌جای صفحهٔ جدا برای هر entity؛ orgهای عمومی `GenericTable` (سرور) / `GenericFilters`، `GenericForm`، `GenericDeleteDialog`، `PublishToggle` (کلاینت)؛ استاتیک‌ها (`courses`، `login`، `registrations`) بر داینامیک ارجح‌ند؛ `GenericForm` فقط **نسخهٔ قابل‌serialize** از spec را می‌گیرد چون توابع (list/get/preview) نمی‌توانند به Client Component برسند | ۱۰ entity with شش شکل رکورد متفاوت = یک فرمول؛ کاهش تکرار شدید؛ D19/D20 تعمیم یافته |
| 2026-09-24 | D22 — فاز G/H: ثبت‌نام عمومی در `POST /api/registrations` (اسکیمای `publicRegistrationSchema` با zod v4؛ یافتن `course_id` از slug؛ عموم بدون وضعیت) + صفحهٔ `/admin/registrations` (فیلتر search/status در URL، تغییر status، حذف)؛ لایه‌های `lib/data/admin/registrations.ts` و `lib/validation/public.ts`؛ و **بازاعتبارسنجی (Phase H)** با `revalidateSite()` → `revalidatePath("/", "layout")` که در `buildInsert`/`buildUpdate` فراخوانی می‌شود و دستی در DELETE های raw-SQL و route های دوره/مقاله اضافه شد | فرم ثبت‌نام واقعاً لید می‌سازد تا ادمین دنبال کند؛ صفحه‌های استاتیک عمومی با cache قدیمی پس از هر تغییر ادمین باید invalidate شوند |
| 2026-09-24 | D23 — پایان H: حذف کامل وابستگی runtime به mock برای محتوای با تیبل: `intersections`، `stats`، `testimonials` از DB می‌آیند (`getTopics`، `getSiteStats`، `getTestimonials` در `lib/data/site.ts`؛ `HomeRest` با prop `stats`)؛ هویت/ناو استاتیکِ بدون‌تیبل به ماژول مستقل `src/lib/site-config.ts` منتقل شد؛ `src/lib/mock/site.ts` فقط برای seed باقی ماند (کامنت هدر دارد)؛ ایندکس‌ها با `db/migrations/002_indexes.sql` (leads/articles/events/programs/courses)؛ اسکریپت `scripts/smoke.mjs` (۴ API عمومی + login + create/delete stat) | معیار پذیرش C/H: runtime هیچ import مستقیمی از mock ندارد؛ config بدون تیبل نباید «دادهٔ mock» تلقی شود؛ smoke خواندنی + یک write ادمین می‌سنجد |
| 2026-10-12 | D25 — تاکسونومی دوره دو لایهٔ ادمین‌محور: `course_categories` (موضوع) + `course_tags` (نوع/منو) با junction many-to-many؛ حذف `courses.category` enum و `courses.tags` text[]؛ لینک پایدار با slug (`?tag=` / `?category=`)؛ CRUD در `/admin/course-categories` و `/admin/course-tags` | دسته و تگ باید پویا و قابل تعریف در ادمین باشند؛ لیبل فارسی جدا از slug است |
| 2026-10-11 | D24 — آپلود تصویر ادمین: `POST /api/admin/upload` (multipart، فقط ادمین) فایل را در `public/uploads/{folder}/` می‌نویسد و مسیر عمومی `/uploads/...` برمی‌گرداند؛ UI با `ImageUploadField` در `CourseForm` و فیلد نوع `image` در `GenericForm`/`entities` (articles/topics/faculty/alumni)؛ persistence در Docker با volume `uploads_data` و env `UPLOAD_DIR` | ورود دستی URL اشتباه بود؛ ادمین باید فایل بارگذاری کند؛ ستون‌های DB همچنان path/URL می‌مانند |
| 2026-10-22 | D26 — اولویت کاتالوگ: `courses.featured` + `courses.sort_order` (migration 011)؛ ترتیب عمومی غیرآرشیو → ویژه → ترتیب → عنوان؛ تگ `archive` در کتالوگ بلوک جدا با کارت ملایم‌تر است و از هوم حذف می‌ماند | چند دورهٔ جاری باید جلو بیایند و گزیدهٔ برگزارشده از لیست جاری جدا دیده شود |
+238
View File
@@ -0,0 +1,238 @@
# بازبینی صفحات سایت — اسکرین‌شات و یافته‌ها
تاریخ اسکرین: ۲۰۲۶-۱۰-۱۱
پایه: `http://localhost:3000`
Viewport: دسکتاپ ۱۴۴۰×۹۰۰ — اسکرین full-page
فایل‌ها: `docs/review/screenshots/*.png`
اسکریپت تکرار: `node scripts/capture-page-screenshots.mjs`
---
## خلاصهٔ وضعیت
| وضعیت | تعداد | توضیح |
|---|---|---|
| OK (۲۰۰) | ۲۳ | صفحه رندر شد و اسکرین گرفته شد |
| باگ واقعی داخل اپ | ۲ | `/privacy` و `/accessibility` → **۴۰۴** با وجود داده در DB |
| ریدایرکت خارجی | ۱ | `/faculty` → سایت mst.aut.ac.ir (مسدود/فایروال از محیط اسکرین) |
| نمونهٔ جزئیات | چند مسیر | از هر نوع entity یک نمونه؛ همهٔ slugها تکرار نشدند |
---
## یافته‌های مهم برای بررسی
### ۱) `/privacy` و `/accessibility` — ۴۰۴ اشتباه
در DB هر دو slug موجود و `published=true` هستند، ولی در کد فقط `press` و `careers` مجازند:
```18:33:src/app/(main)/(legal)/[slug]/page.tsx
const ALLOWED = new Set(["press", "careers"]);
// ...
if (!ALLOWED.has(slug)) notFound();
```
**نتیجه:** لینک‌های حریم خصوصی / دسترسی‌پذیری اگر جایی باشند، ۴۰۴ می‌شوند.
### ۲) `/faculty` — صفحهٔ داخلی نیست
در `next.config.ts` ریدایرکت دائم به
`https://mst.aut.ac.ir/content/31094/شبکه-اساتید`
از محیط اسکرین‌شات، سایت مقصد پاسخ «درخواست شما مسدود گردید» داد (فایروال/WAF دانشگاه). خود ریدایرکت اپ درست است؛ اسکرین مقصد قابل اتکا نیست.
### ۳) منوی «دوره‌ها» روی هوم
تگ‌های دوره در DB فعلاً خالی‌اند (`tags: []` برای همهٔ دوره‌ها). dropdown دوره‌ها از تگ ساخته می‌شود؛ اگر خالی به نظر برسد علتش داده است نه باگ UI.
### ۴) آپلود تصویر در ادمین
در `/admin/courses/new` و `/admin/articles/new` فیلد **انتخاب و بارگذاری تصویر** دیده می‌شود (دیگر input آدرس متنی نیست).
### ۵) جزئیات رویداد نازک است
صفحهٔ `/events/evt-1` فقط زمان/مکان/خلاصه دارد؛ CTA ثبت‌نام یا تصویر رویداد ندارد (ممکن است عمدی باشد).
---
## صفحات عمومی
### صفحه اصلی (`/`)
وضعیت: OK
![صفحه اصلی](./screenshots/01-home.png)
- هیرو تیره + CTA «مشاهده دوره‌ها» / «درباره مرکز»
- بنر کمپین بالای صفحه
- بخش‌های: چرا امیرکبیر، رویکرد آموزشی، رویدادها، حوزه‌های موضوعی، کارousel برنامه‌ها، آمار، فوتر
- مقالهٔ ویژه در هیرو لینک شده («سه اصل برای تبدیل داده…»)
### لندینگ حرفه‌ای (`/professional`)
وضعیت: OK
![professional](./screenshots/02-professional.png)
- هیرو دوره‌های کوتاه
- جستجو + فیلتر دسته + کارت دوره‌ها با پوستر
- آمار، testimonials، فوتر
- مسیر اصلی کاتالوگ دوره برای کاربران حرفه‌ای
### درباره ما (`/about`)
وضعیت: OK
![about](./screenshots/03-about.png)
### ارزش‌ها (`/values`)
وضعیت: OK
![values](./screenshots/04-values.png)
### تماس (`/contact`)
وضعیت: OK
![contact](./screenshots/05-contact.png)
- فرم تماس / اعلام علاقه
### دانش‌آموختگان (`/alumni`)
وضعیت: OK
![alumni](./screenshots/06-alumni.png)
- ۳ کارت داستان با تصویر (فعلاً از URL/مسیر ذخیره‌شده؛ آپلود از ادمین برای رکوردهای جدید)
### رویدادها — فهرست (`/events`)
وضعیت: OK
![events](./screenshots/07-events.png)
- ۴ رویداد در شبکهٔ کارت
### رویداد — جزئیات نمونه (`/events/evt-1`)
وضعیت: OK
![event detail](./screenshots/08-event-detail.png)
- محتوای کم؛ فقط متادیتا + خلاصه
### بینش‌ها — فهرست (`/insights`)
وضعیت: OK
![insights](./screenshots/09-insights.png)
### بینش — جزئیات نمونه (`/insights/art-1`)
وضعیت: OK
![insight detail](./screenshots/10-insight-detail.png)
### برنامه‌ها — فهرست (`/programs`)
وضعیت: OK
![programs](./screenshots/11-programs.png)
### برنامه — جزئیات نمونه (`/programs/management-core`)
وضعیت: OK
![program detail](./screenshots/12-program-detail.png)
### موضوع — نمونه (`/topics/ai-organizational-transformation`)
وضعیت: OK
![topic](./screenshots/13-topic-detail.png)
سایر موضوع‌ها در DB: `branding`, `marketing`, `managerial-dialogue` (الگوی صفحه یکسان؛ اسکرین جدا گرفته نشد).
### ثبت‌نام / علاقه — نمونه (`/register/ai-fluency`)
وضعیت: OK
![register](./screenshots/14-register.png)
- هیرو دوره + بروشور/پوستر + سایدبار «درخواست ثبت‌نام»
- نمونهٔ بقیهٔ slugها: `branding`, `marketing`, `ai-organizational-transformation`, `managerial-dialogue`, …
### حریم خصوصی (`/privacy`)
وضعیت: **۴۰۴ — باگ**
![privacy 404](./screenshots/15-privacy.png)
داده در `legal_pages` هست؛ whitelist کد آن را حذف می‌کند. توضیح کامل در بخش یافته‌ها.
### دسترسی‌پذیری (`/accessibility`)
وضعیت: **۴۰۴ — باگ**
![accessibility 404](./screenshots/16-accessibility.png)
همان علت `/privacy`.
### روابط عمومی (`/press`)
وضعیت: OK
![press](./screenshots/17-press.png)
### همکاری با ما (`/careers`)
وضعیت: OK
![careers](./screenshots/18-careers.png)
### اساتید (`/faculty`)
وضعیت: ریدایرکت خارجی — اسکرین مقصد کامل نیست
![faculty blocked](./screenshots/19-faculty-redirect.png)
**توضیح کامل:**
- داخل اپ صفحهٔ اساتید نداریم؛ `redirects()` در Next به سایت دانشکده می‌رود.
- مرورگر اتوماسیون به مقصد رسید ولی WAF دانشگاه پاسخ «درخواست شما مسدود گردید» با شماره پیگیری داد.
- برای بررسی بصری شبکهٔ اساتید باید دستی در مرورگر عادی باز شود:
https://mst.aut.ac.ir/content/31094/شبکه-اساتید
---
## پنل ادمین
### ورود (`/admin/login`)
وضعیت: OK
![admin login](./screenshots/20-admin-login.png)
### داشبورد (`/admin`)
وضعیت: OK (پس از لاگین API)
![admin dashboard](./screenshots/21-admin-dashboard.png)
- شمارنده‌ها: ۷ دوره، ۱۰ برنامه، ۴ رویداد، ۴ مقاله، ۱۰ استاد، ۳ alumni
- جدول لیدهای اخیر دیده می‌شود
### دوره‌ها — لیست (`/admin/courses`)
وضعیت: OK
![admin courses](./screenshots/22-admin-courses.png)
### دوره — ایجاد (`/admin/courses/new`)
وضعیت: OK — **آپلود تصویر فعال**
![admin course new](./screenshots/23-admin-course-new.png)
- دو باکس «انتخاب و بارگذاری تصویر» برای پوستر و بروشور
### مقالات — لیست (`/admin/articles`)
وضعیت: OK
![admin articles](./screenshots/24-admin-articles.png)
### مقاله — ایجاد (`/admin/articles/new`)
وضعیت: OK — **آپلود تصویر فعال**
![admin article new](./screenshots/25-admin-articles-new.png)
### ثبت‌نام‌ها (`/admin/registrations`)
وضعیت: OK
![admin registrations](./screenshots/26-admin-registrations.png)
### صفحات ادمین که اسکرین جدا نگرفتیم (الگوی یکسان GenericForm/Table)
این مسیرها از همان رجیستری `entities` ساخته می‌شوند؛ UI مشابه articles است:
| مسیر | توضیح |
|---|---|
| `/admin/programs` و `.../new` و `.../[id]/edit` | CRUD برنامه |
| `/admin/events` و new/edit | CRUD رویداد |
| `/admin/topics` و new/edit | CRUD موضوع (+ آپلود تصویر) |
| `/admin/faculty` و new/edit | CRUD استاد (+ آپلود تصویر اختیاری) |
| `/admin/alumni` و new/edit | CRUD alumni (+ آپلود تصویر) |
| `/admin/banners` | بنر کمپین (بدون تصویر) |
| `/admin/stats` | آمار |
| `/admin/testimonials` | نظرات |
| `/admin/legal` | صفحات قانونی |
| `/admin/courses/[id]/edit` | ویرایش دوره (همان فرم new با دادهٔ اولیه) |
اگر اسکرین جدا برای یکی از این‌ها لازم است بگویید تا همان را هم بگیرم.
---
## صفحات عمومی که اسکرین تکراری نگرفتیم
| نوع | نمونه گرفته‌شده | بقیه در DB (اسکرین نشد) |
|---|---|---|
| دوره/ثبت‌نام | `/register/ai-fluency` | branding, marketing, branding-marketing-in-practice, ai-organizational-transformation, hr-prompt-engineering, managerial-dialogue |
| برنامه | `/programs/management-core` | bridge, business-analytics, leadership-fellows, finance, executive, systems-management, evening-management, research-track, short-executive |
| رویداد | `/events/evt-1` | evt-2, evt-3, evt-4 |
| مقاله | `/insights/art-1` | art-2, art-3, art-4 |
| موضوع | یک topic | branding, marketing, managerial-dialogue |
الگوی قالب یکی است؛ تفاوت عمدتاً محتوا/تصویر است.
---
## پیشنهاد اقدام بعدی (اولویت)
1. whitelist قانونی را به `privacy` و `accessibility` گسترش دهید (یا از DB بخوانید).
2. برای دوره‌ها در ادمین تگ بگذارید تا منوی «دوره‌ها» پر شود.
3. جزئیات رویداد را در صورت نیاز غنی‌تر کنید (تصویر/CTA).
4. صفحهٔ اساتید خارجی را دستی در مرورگر چک کنید (WAF محیط اتوماسیون را بسته).
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 702 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 981 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

+262
View File
@@ -0,0 +1,262 @@
[
{
"id": "01-home",
"title": "صفحه اصلی (/)",
"url": "/",
"finalUrl": "http://localhost:3000/",
"status": "ok",
"note": "",
"file": "01-home.png",
"httpStatus": 200
},
{
"id": "02-professional",
"title": "لندینگ حرفه‌ای (/professional)",
"url": "/professional",
"finalUrl": "http://localhost:3000/professional",
"status": "ok",
"note": "",
"file": "02-professional.png",
"httpStatus": 200
},
{
"id": "03-about",
"title": "درباره ما (/about)",
"url": "/about",
"finalUrl": "http://localhost:3000/about",
"status": "ok",
"note": "",
"file": "03-about.png",
"httpStatus": 200
},
{
"id": "04-values",
"title": "ارزش‌ها (/values)",
"url": "/values",
"finalUrl": "http://localhost:3000/values",
"status": "ok",
"note": "",
"file": "04-values.png",
"httpStatus": 200
},
{
"id": "05-contact",
"title": "تماس (/contact)",
"url": "/contact",
"finalUrl": "http://localhost:3000/contact",
"status": "ok",
"note": "",
"file": "05-contact.png",
"httpStatus": 200
},
{
"id": "06-alumni",
"title": "دانش‌آموختگان (/alumni)",
"url": "/alumni",
"finalUrl": "http://localhost:3000/alumni",
"status": "ok",
"note": "",
"file": "06-alumni.png",
"httpStatus": 200
},
{
"id": "07-events",
"title": "فهرست رویدادها (/events)",
"url": "/events",
"finalUrl": "http://localhost:3000/events",
"status": "ok",
"note": "",
"file": "07-events.png",
"httpStatus": 200
},
{
"id": "08-event-detail",
"title": "جزئیات رویداد (/events/evt-1)",
"url": "/events/evt-1",
"finalUrl": "http://localhost:3000/events/evt-1",
"status": "ok",
"note": "",
"file": "08-event-detail.png",
"httpStatus": 200
},
{
"id": "09-insights",
"title": "فهرست بینش‌ها (/insights)",
"url": "/insights",
"finalUrl": "http://localhost:3000/insights",
"status": "ok",
"note": "",
"file": "09-insights.png",
"httpStatus": 200
},
{
"id": "10-insight-detail",
"title": "جزئیات مقاله (/insights/art-1)",
"url": "/insights/art-1",
"finalUrl": "http://localhost:3000/insights/art-1",
"status": "ok",
"note": "",
"file": "10-insight-detail.png",
"httpStatus": 200
},
{
"id": "11-programs",
"title": "فهرست برنامه‌ها (/programs)",
"url": "/programs",
"finalUrl": "http://localhost:3000/programs",
"status": "ok",
"note": "",
"file": "11-programs.png",
"httpStatus": 200
},
{
"id": "12-program-detail",
"title": "جزئیات برنامه (/programs/management-core)",
"url": "/programs/management-core",
"finalUrl": "http://localhost:3000/programs/management-core",
"status": "ok",
"note": "",
"file": "12-program-detail.png",
"httpStatus": 200
},
{
"id": "13-topic-detail",
"title": "موضوع (/topics/ai-organizational-transformation)",
"url": "/topics/ai-organizational-transformation",
"finalUrl": "http://localhost:3000/topics/ai-organizational-transformation",
"status": "ok",
"note": "",
"file": "13-topic-detail.png",
"httpStatus": 200
},
{
"id": "14-register",
"title": "ثبت‌نام/علاقه (/register/ai-fluency)",
"url": "/register/ai-fluency",
"finalUrl": "http://localhost:3000/register/ai-fluency",
"status": "ok",
"note": "",
"file": "14-register.png",
"httpStatus": 200
},
{
"id": "15-privacy",
"title": "حریم خصوصی (/privacy)",
"url": "/privacy",
"finalUrl": "http://localhost:3000/privacy",
"status": "http-error",
"note": "HTTP 404",
"file": "15-privacy.png",
"httpStatus": 404
},
{
"id": "16-accessibility",
"title": "دسترسی‌پذیری (/accessibility)",
"url": "/accessibility",
"finalUrl": "http://localhost:3000/accessibility",
"status": "http-error",
"note": "HTTP 404",
"file": "16-accessibility.png",
"httpStatus": 404
},
{
"id": "17-press",
"title": "روابط عمومی (/press)",
"url": "/press",
"finalUrl": "http://localhost:3000/press",
"status": "ok",
"note": "",
"file": "17-press.png",
"httpStatus": 200
},
{
"id": "18-careers",
"title": "همکاری با ما (/careers)",
"url": "/careers",
"finalUrl": "http://localhost:3000/careers",
"status": "ok",
"note": "",
"file": "18-careers.png",
"httpStatus": 200
},
{
"id": "19-faculty-redirect",
"title": "اساتید (/faculty → ریدایرکت خارجی)",
"url": "/faculty",
"finalUrl": "https://mst.aut.ac.ir/content/31094/%D8%B4%D8%A8%DA%A9%D9%87-%D8%A7%D8%B3%D8%A7%D8%AA%DB%8C%D8%AF",
"status": "http-error",
"note": "HTTP 500",
"file": "19-faculty-redirect.png",
"httpStatus": 500
},
{
"id": "20-admin-login",
"title": "ورود ادمین (/admin/login)",
"url": "/admin/login",
"finalUrl": "http://localhost:3000/admin/login",
"status": "ok",
"note": "",
"file": "20-admin-login.png",
"httpStatus": 200
},
{
"id": "21-admin-dashboard",
"title": "داشبورد ادمین (/admin)",
"url": "/admin",
"finalUrl": "http://localhost:3000/admin",
"status": "ok",
"note": "",
"file": "21-admin-dashboard.png",
"httpStatus": 200
},
{
"id": "22-admin-courses",
"title": "لیست دوره‌ها (/admin/courses)",
"url": "/admin/courses",
"finalUrl": "http://localhost:3000/admin/courses",
"status": "ok",
"note": "",
"file": "22-admin-courses.png",
"httpStatus": 200
},
{
"id": "23-admin-course-new",
"title": "ایجاد دوره — فیلد آپلود تصویر (/admin/courses/new)",
"url": "/admin/courses/new",
"finalUrl": "http://localhost:3000/admin/courses/new",
"status": "ok",
"note": "",
"file": "23-admin-course-new.png",
"httpStatus": 200
},
{
"id": "24-admin-articles",
"title": "لیست مقالات (/admin/articles)",
"url": "/admin/articles",
"finalUrl": "http://localhost:3000/admin/articles",
"status": "ok",
"note": "",
"file": "24-admin-articles.png",
"httpStatus": 200
},
{
"id": "25-admin-articles-new",
"title": "ایجاد مقاله — فیلد آپلود (/admin/articles/new)",
"url": "/admin/articles/new",
"finalUrl": "http://localhost:3000/admin/articles/new",
"status": "ok",
"note": "",
"file": "25-admin-articles-new.png",
"httpStatus": 200
},
{
"id": "26-admin-registrations",
"title": "ثبت‌نام‌ها (/admin/registrations)",
"url": "/admin/registrations",
"finalUrl": "http://localhost:3000/admin/registrations",
"status": "ok",
"note": "",
"file": "26-admin-registrations.png",
"httpStatus": 200
}
]
+8 -14
View File
@@ -1,23 +1,17 @@
# Active Context
## Current Goal
ساختار اولیه کامل است (فازهای A تا H پلن `docs/04-development-plan.md`). طبق دستور کاربر محتوای واقعی وارد نشده — بعداً از پنل ادمین کنترل می‌شود. هیچ کار ساختاری باقی نمانده؛ پیشرفت بعدی = محتوای واقعی.
اولویت نمایش دوره‌ها (ویژه + ترتیب) و جداسازی گزیدهٔ برگزارشده در کتالوگ.
## Current Work
کار ساختاری به پایان رسید و همهٔ چک‌های نهایی سبزند (2026-09-24):
- **حذف وابستگی runtime به mock**: همهٔ importهای `@/lib/mock` از runtime حذف شد. هویت/ناو استاتیک که تیبل ندارند → `src/lib/site-config.ts` (siteName، siteShortName، siteFaculty، siteUniversity، siteMission، siteAddress، homeNav، professionalNav، aboutFocusAreas، valuesContent، courseCategories). `src/lib/mock/site.ts` فقط برای seed (`db/seed.mjs`) باقی ماند (هدر کامنت دارد).
- **محتوا از DB**: `src/lib/data/site.ts` + `getSiteStats()`/`getTestimonials()` (مپرهای `rowToSiteStat`/`rowToTestimonial` موجود بودند)؛ هوم (`intersections` → `getTopics()` + `stats`) و `/professional` (stats/testimonials) از DB می‌خوانند. `HomeRest` prop جدید `stats: SiteStat[]` گرفت (Page آن را پاس می‌دهد).
- **ایندکس‌ها**: `db/migrations/002_indexes.sql` اعمال شد (`registration_leads(created_at DESC)`، `articles(published, published_at DESC)`، `events(published, start_date)`، `programs/courses(published, title)`). slugها و `articles_one_featured` از 001 موجودند.
- **tests**: tsc/lint/build سبز؛ `scripts/smoke.mjs` با `SMOKE_OK` زنده پاس شد (۴ API عمومی + login + create stat + delete stat؛ لید باقی‌نماند)؛ `/` و `/professional` با خروجی 200؛ ایندکس به‌صورت idempotent اجرا شد.
- **docs**: `00-brief.md` (ادمین دیگر out نیست)، `01-architecture.md` (پستگرس + ادمین همان اپ + الگوی registry)، `03-database.md` (بی‌نقص: جداول + migrate/seed + ایندکس ۰۰۲)، `04-development-plan.md` (چک‌لیست H کامل)، `README.md` (دستورات dev/migrate/seed/admin/smoke) به‌روز شدند.
- انجام‌شده: `featured`/`sort_order` روی `courses`، ادمین، Badge ویژه، بلوک آرشیو جدا در `/professional`
- Blocked: پالت رنگی mst (۱۱)، seed اساتید پس از دسترسی (۱۷c)
## Current Blockers
بدون مانع. تصمیم‌های باز (حذف vs unpublish؛ آپلود تصویر؛ ORM؛ محتوای واقعی) در بخش ۱۵ پلن برای پرسش هنگام نیاز آمده‌اند.
- پالت رنگی از کاربر
- دسترسی به شبکه اساتید mst برای کپی داده
## Next Steps
1. محتوای واقعی از پنل ادمین (طبق دستور کاربر بعداً — فعلاً چیزی بقای ساختاری نمانده).
2. (اختیاری، بخش ۱۰ پلن) rate limit روی `POST /api/registrations`؛ آپلود تصویر.
## نکته برای ادامهٔ کار
صفحات جدید داخل `src/app/admin/(guard)/` و کامپوننت‌های رابط در `src/components/organisms/admin/*`. افزودن primitive shadcn جدید فقط با `npx shadcn@latest add <name>` (بدون دست‌نویسی). **انتقال spec به Client Component نباید تابع داشته باشد** (list/get/preview → فقط `GenericFormSpec` serialize می‌شود؛ `GenericTable` سرور است و spec کامل مجاز است). Select بیس UI مقدار `null` هم می‌فرستد (`(v) => v ?? "all"`). در PowerShell مسیرهای حاوی `[id]` به `-LiteralPath` نیاز دارند؛ `Start-Process cmd` باید با `-ArgumentList @('/c', 'npm run start -- -p 3100 > server.log 2>&1')` ساخته شود. تست زنده: `npm run build` سپس سرور روی `-p 3100` و لاگین با `admin@aut.ac.ir/admin123` (cookie دارای Secure است؛ روی http باید دستی ارسال شود). smoke: `SMOKE_ADMIN_EMAIL/PASSWORD` بگذار و `node scripts/smoke.mjs` بزن.
1. در ادمین، دوره‌های مهم جاری را ویژه/مرتب کنید
2. دریافت پالت و به‌روزرسانی توکن‌های `globals.css`
3. پس از دسترسی mst: seed اساتید با `profileUrl`
+7 -1
View File
@@ -37,11 +37,17 @@
## Doing
هیچ — ساختار کامل است؛ فقط محتوای واقعی مانده که طبق دستور کاربر از ادمین کنترل می‌شود.
- [x] منوی هوم: یک دراپ‌داون از تگ‌ها؛ `courseNavParentTag`؛ لینک پایدار
- [x] D25 تاکسونومی ادمین‌محور: دسته + تگ many-to-many؛ migration 007؛ CRUD ادمین؛ فیلتر `?tag=`/`?category=` با slug
- [x] D26 اولویت کاتالوگ: `featured` + `sort_order` (migration 011)؛ بلوک جدا برای تگ `archive`
## Next
- [x] فاز H باقی‌مانده — ایندکس‌ها، docs/README نهایی، حذف وابستگی runtime به mock، smoke script
- [x] Todo UI سایت (هدر/هوم/دوره‌ها/فونت/اسکیما اساتید) — جزئیات در `docs/Todo.Md`
- [x] D26 اولویت دوره + جداسازی گزیدهٔ برگزارشده
- [ ] محتوای واقعی از پنل ادمین (طبق دستور کاربر بعداً)
- [x] لوگوی دانشکده (نشان بدون متن کناری + favicon)
- [ ] Todo blocked: پالت mst، seed اساتید از شبکه دانشکده
## Milestones
| مرحله | وضعیت | تاریخ |
+54 -49
View File
@@ -1,95 +1,100 @@
{
"meta": {
"homeTitle": "مرکز آموزش‌های آزاد دانشکده مدیریت، علم و فناوری دانشگاه صنعتی امیرکبیر",
"homeDescription": "مرکز آموزش‌های آزاد دانشکده مدیریت، علم و فناوری دانشگاه صنعتی امیرکبیر؛ آموزش مدیران برای تحول در صنعت با تصمیم‌گیری داده‌محور، هوش مصنوعی و مدیریت تغییر.",
"professionalTitle": "دوره‌های کوتاه و گواهی‌محور | مدیریت علم و فناوری",
"professionalDescription": "دوره‌های آنلاین و ترکیبی برای مدیران و متخصصان؛ فهرست دوره‌ها و اعلام علاقه به ثبت‌نام."
"homeTitle": "مرکز آموزش های آزاد دانشکده مدیریت، علم و فناوری دانشگاه صنعتی امیرکبیر",
"homeDescription": "مرکز آموزش های آزاد دانشکده مدیریت، علم و فناوری دانشگاه صنعتی امیرکبیر؛ یادگیری برای تصمیم گیری و عمل در دنیای در حال تغییر.",
"professionalTitle": "دوره های کوتاه و گواهی محور | مدیریت علم و فناوری",
"professionalDescription": "دوره های کوتاه آنلاین و ترکیبی دانشکده مدیریت، علم و فناوری امیرکبیر برای مدیران و متخصصان؛ فهرست دوره های گواهی محور و اعلام علاقه به ثبت نام."
},
"nav": {
"parentSite": "دانشگاه صنعتی امیرکبیر",
"contact": "تماس با ما",
"search": "جستجو",
"academics": "برنامه‌ها",
"academics": "برنامه ها",
"brandSubtitle": "دانشکده مدیریت، علم و فناوری",
"explorePrograms": "مشاهده برنامه‌ها",
"exploreCourses": "مشاهده دوره‌ها",
"seeAllEvents": "همه رویدادها",
"registerCta": "مشاهده دوره‌های کوتاه",
"explorePrograms": "مشاهده برنامه ها",
"exploreCourses": "مشاهده دوره ها",
"seeAllEvents": "همه رویداد ها",
"registerCta": "مشاهده دوره های کوتاه",
"skipToContent": "پرش به محتوای اصلی"
},
"home": {
"programSelectorTitle": "کدام برنامه مناسب شماست؟",
"executiveLabel": "ویژه مدیران",
"exploreOurPrograms": "همه برنامه‌ها",
"ideasTitle": "ایده‌هایی برای عمل",
"eventsTitle": "رویدادهای پیش‌رو",
"exploreOurPrograms": "همه برنامه ها",
"ideasTitle": "ایده هایی برای عمل",
"eventsTitle": "رویداد های پیش رو",
"intersectionsTitle": "کدام مسئله سازمان در اولویت شماست؟",
"intersectionsSubtitle": "حوزه آموزشی را بر اساس چالش‌های مدیریتی و برنامه‌های توسعه سازمان خود انتخاب کنید.",
"moreThanDegree": "دوره‌های آموزشی برای مدیران",
"moreThanDegreeBody": "برای تصمیم‌گیری درباره فناوری، بهبود عملکرد یا هدایت تغییر، برنامه‌های آموزشی را بر اساس نیاز خود و تیم مدیریتی‌تان بررسی کنید.",
"keepExploring": "مشاهده همه برنامه‌ها",
"hireTitle": "تیم مدیریتی خود را برای تغییر آماده کنید",
"hireBody": "دوره‌های کوتاه را با توجه به برنامه تحول سازمان انتخاب کنید؛ از تصمیم‌گیری با داده و به‌کارگیری هوش مصنوعی تا مدیریت اجرای تغییر و ارزیابی نتایج آن.",
"missionTitle": "هدف آموزش‌های ما",
"intersectionsSubtitle": "حوزه آموزشی را بر اساس چالش های مدیریتی و برنامه های توسعه سازمان خود انتخاب کنید.",
"moreThanDegree": "دوره های آموزشی برای مدیران",
"moreThanDegreeBody": "برای تصمیم گیری درباره فناوری، بهبود عملکرد یا هدایت تغییر، برنامه های آموزشی را بر اساس نیاز خود و تیم مدیریتی تان بررسی کنید.",
"keepExploring": "مشاهده همه برنامه ها",
"hireTitle": "توسعه توانمندی، با توجه به نیاز تیم شما",
"hireBody": "برای انتخاب آموزش مناسب، از مسئله و هدف تیم خود آغاز کنید. موضوع، سطح و شیوه برگزاری دوره های مرکز را بررسی کنید و برنامه های متناسب با مسئولیت های حرفه ای و اولویت های یادگیری همکارانتان انتخاب کنید.",
"missionTitle": "یادگیری، بخشی از مسیر حرفه ای شماست",
"findUsTitle": "آدرس و تماس",
"ideasEyebrow": "ایده‌هایی برای عمل"
"ideasEyebrow": "ایده هایی برای عمل"
},
"pages": {
"programsTitle": "برنامه‌های آموزشی",
"programsIntro": "برنامه‌ها را بر اساس هدف شغلی و زمان‌بندی مقایسه کنید و مسیر مناسب را انتخاب کنید.",
"programsTitle": "برنامه های آموزشی",
"programsIntro": "برنامه ها را بر اساس هدف شغلی و زمان بندی مقایسه کنید و مسیر مناسب را انتخاب کنید.",
"insightsTitle": "مقالات",
"insightsIntro": "نکات کاربردی مدیریت و فناوری برای کار و سازمان.",
"eventsTitle": "رویدادها",
"eventsIntro": "وبینارها، بازدیدها و نشست‌های معرفی برنامه.",
"aboutTitle": "درباره مرکز آموزش‌های آزاد",
"valuesTitle": "ارزش‌های ما",
"alumniTitle": "دانش‌آموختگان",
"alumniIntro": "تجربه کسانی که با برنامه‌های دانشکده مسیر شغلی خود را تقویت کردند.",
"eventsTitle": "رویداد ها",
"eventsIntro": "وبینار ها، بازدیدها و نشست های معرفی برنامه.",
"newsTitle": "اخبار",
"newsIntro": "اطلاعیه ها و خبرهای مرکز آموزش های آزاد.",
"newsEmpty": "هنوز خبری منتشر نشده است.",
"aboutTitle": "درباره مرکز آموزش های آزاد",
"valuesTitle": "ارزش های ما",
"alumniTitle": "دانش آموختگان",
"alumniIntro": "تجربه کسانی که با برنامه های دانشکده مسیر شغلی خود را تقویت کردند.",
"facultyTitle": "اساتید و مدرسان",
"facultyIntro": "مدرسان دانشگاهی و متخصصان صنعت.",
"contactTitle": "تماس با ما",
"contactIntro": "برای مشاوره انتخاب برنامه و پرسش‌های ثبت‌نام با ما در ارتباط باشید.",
"contactIntro": "برای مشاوره انتخاب برنامه و پرسش های ثبت نام با ما در ارتباط باشید.",
"registerTitle": "اعلام علاقه به دوره",
"registerSuccess": "درخواست شما ثبت شد. به‌زودی با شما تماس می‌گیریم.",
"registerCtaRequest": "درخواست ثبت‌نام",
"registerFormTitle": "اعلام علاقه به ثبت‌نام",
"registerFormDescription": "اطلاعات تماس را وارد کنید تا برای هماهنگی ثبت‌نام با شما ارتباط بگیریم.",
"registerFormHint": "ابتدا جزئیات دوره را بررسی کنید؛ اگر مایل به ثبت‌نام هستید، فرم را باز کنید.",
"registerSuccess": "درخواست شما ثبت شد. به زودی با شما تماس می گیریم.",
"registerCtaRequest": "درخواست ثبت نام",
"registerFormTitle": "اعلام علاقه به ثبت نام",
"registerFormDescription": "اطلاعات تماس را وارد کنید تا برای هماهنگی ثبت نام با شما ارتباط بگیریم.",
"registerFormHint": "ابتدا جزئیات دوره را بررسی کنید؛ اگر مایل به ثبت نام هستید، فرم را باز کنید.",
"registerFormCancel": "بستن فرم",
"backToCourses": "بازگشت به کاتالوگ دوره‌ها",
"backToCourses": "بازگشت به کاتالوگ دوره ها",
"courseAboutTitle": "درباره این دوره",
"courseDetailsTitle": "جزئیات برگزاری",
"courseDuration": "مدت",
"courseDate": "تاریخ برگزاری",
"courseFormat": "قالب",
"courseCategory": "دسته‌بندی",
"courseCategory": "دسته بندی",
"coursePrice": "شهریه",
"coursePriceUnset": "پس از مشاوره اعلام می‌شود",
"coursePriceUnset": "پس از مشاوره اعلام می شود",
"submit": "ارسال درخواست",
"backToPrograms": "بازگشت به فهرست برنامه‌ها",
"relatedCourses": "دوره‌های مرتبط",
"highlights": "ویژگی‌های برنامه",
"standardGroup": "برنامه‌های عمومی",
"backToPrograms": "بازگشت به فهرست برنامه ها",
"relatedCourses": "دوره های مرتبط",
"highlights": "ویژگی های برنامه",
"standardGroup": "برنامه های عمومی",
"executiveGroup": "ویژه مدیران"
},
"professional": {
"eyebrow": "دوره‌های کوتاه",
"banner": "دوره‌های آنلاین و گواهی‌محور دانشکده مدیریت علم و فناوری",
"eyebrow": "دوره های کوتاه",
"banner": "دوره های آنلاین و گواهی محور دانشکده مدیریت علم و فناوری",
"pathways": "برای چه کسانی؟",
"heroTitle": "دوره‌های کوتاه و گواهی‌محور",
"heroBody": "یادگیری فشرده و کاربردی برای مدیران و متخصصانی که می‌خواهند مهارت مشخصی را سریع ارتقا دهند.",
"heroTitle": "دوره های کوتاه و گواهی محور",
"heroBody": "یادگیری فشرده و کاربردی برای مدیران و متخصصانی که می خواهند مهارت مشخصی را سریع ارتقا دهند.",
"findProgram": "جستجوی دوره",
"offeredBy": "دانشکده مدیریت علم و فناوری — دانشگاه صنعتی امیرکبیر",
"statsTitle": "دانشکده در یک نگاه",
"rankTitle": "یادگیری در دانشگاه صنعتی امیرکبیر",
"testimonialsTitle": "نظر شرکت‌کنندگان",
"advisor": "مشاوره ثبت‌نام",
"advisor": "مشاوره ثبت نام",
"dppTitle": "یادگیری آنلاین و ترکیبی",
"dppBody": "محتوای به‌روز با تمرین و پروژه؛ مناسب شاغلانی که زمان محدود دارند."
"dppBody": "محتوای به روز با تمرین و پروژه؛ مناسب شاغلانی که زمان محدود دارند."
},
"footer": {
"links": "دسترسی سریع",
"facultySite": "دانشکده",
"facultyNetwork": "شبکه اساتید",
"press": "روابط عمومی",
"careers": "همکاری با ما",
"copyright": "© {year} مرکز آموزش‌های آزاد دانشکده مدیریت، علم و فناوری دانشگاه صنعتی امیرکبیر"
"copyright": "© {year} مرکز آموزش های آزاد دانشکده مدیریت، علم و فناوری دانشگاه صنعتی امیرکبیر"
}
}
+6 -2
View File
@@ -7,6 +7,10 @@ const nextConfig: NextConfig = {
output: "standalone",
// Babel React Compiler is heavy in Docker/CI; keep it for local `next dev`.
reactCompiler: process.env.DISABLE_REACT_COMPILER !== "1",
// VPS deploy sets SKIP_TYPECHECK=1. `npm run build` locally still typechecks.
typescript: {
ignoreBuildErrors: process.env.SKIP_TYPECHECK === "1",
},
experimental: {
optimizePackageImports: ["lucide-react"],
},
@@ -21,8 +25,8 @@ const nextConfig: NextConfig = {
async redirects() {
return [
{
source: "/faculty",
destination: "https://mst.aut.ac.ir/content/31094/شبکه-اساتید",
source: "/images/faculty/placeholder.png",
destination: "/images/faculty/placeholder.webp",
permanent: true,
},
];
+1170 -4
View File
File diff suppressed because it is too large. Load diff
+16 -1
View File
@@ -6,13 +6,26 @@
"dev": "next dev",
"build": "next build --webpack",
"start": "next start",
"lint": "eslint"
"lint": "eslint",
"db:migrate": "node db/migrate.mjs",
"db:seed": "node db/seed.mjs",
"db:test": "node scripts/test-db-connection.mjs",
"db:seed-admin": "node scripts/seed-admin.mjs"
},
"dependencies": {
"@base-ui/react": "^1.8.0",
"@tiptap/extension-link": "^3.32.0",
"@tiptap/extension-placeholder": "^3.32.0",
"@tiptap/extension-text-align": "^3.32.0",
"@tiptap/extension-underline": "^3.32.0",
"@tiptap/pm": "^3.32.0",
"@tiptap/react": "^3.32.0",
"@tiptap/starter-kit": "^3.32.0",
"class-variance-authority": "^0.7.1",
"cn": "^0.3.2",
"embla-carousel-react": "^8.6.0",
"isomorphic-dompurify": "^4.6.0",
"jalaali-js": "^2.0.1",
"lucide-react": "^1.47.0",
"next": "16.3.5",
"next-intl": "^4.14.6",
@@ -21,10 +34,12 @@
"react-dom": "19.2.8",
"shadcn": "^4.21.0",
"tw-animate-css": "^1.4.0",
"vazirmatn": "^33.0.3",
"zod": "^4.6.5"
},
"devDependencies": {
"@tailwindcss/postcss": "^4",
"@types/dompurify": "^3.0.5",
"@types/node": "^20",
"@types/pg": "^8.23.1",
"@types/react": "^19",
Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Loaded 100 of 359 files, more files were not shown because too many files have changed in this diff. Show more