mb672038 commited on
Commit
7d46920
·
verified ·
1 Parent(s): e2adf91

اون قبلی ها رو خذف کن و اینو بده🧠 لایه 1 — چشم‌انداز (Vision Layer)

Browse files

هدف محصول

ساخت یک LMS آموزشی پایتون با احراز هویت امن، داشبورد حرفه‌ای و محتوای ساختارمند

مقیاس‌پذیر، قابل توسعه، آماده Production

کاربر هدف

مبتدی تا متوسط پایتون

فارسی/انگلیسی

یادگیری پروژه‌محور

🏗️ لایه 2 — معماری کلان (System Architecture)
[ Browser ]

[ React + Vite + Tailwind ]
↓ REST API (HTTPS)
[ Node.js + Express ]

[ MongoDB Atlas ]


دلایل انتخاب

React: UX مدرن و SPA

Node: سرعت توسعه و اکوسیستم Auth

MongoDB: ساختار منعطف دوره‌ها

JWT + OAuth: امنیت واقعی

🗂️ لایه 3 — ساختار پروژه (Enterprise Structure)
python-learning-platform/

├── client/
│ ├── index.html
│ ├── src/
│ │ ├── app/ # bootstrap
│ │ ├── pages/ # Login, Register, Dashboard, Course
│ │ ├── components/ # UI reusable
│ │ ├── layouts/ # DashboardLayout
│ │ ├── routes/ # Protected routes
│ │ ├── services/ # API layer
│ │ ├── context/ # Auth, Theme, Language
│ │ ├── i18n/ # fa / en
│ │ └── styles/
│ └── package.json

├── server/
│ ├── server.js
│ ├── config/ # db, jwt, google
│ ├── models/ # User, Course, Lesson, Progress
│ ├── routes/
│ ├── controllers/
│ ├── middleware/ # auth, role, error
│ ├── services/ # email, otp, google
│ └── utils/

└── .env

🔐 لایه 4 — احراز هویت پیشرفته (Auth Blueprint)
🧩 Register Flow

Email + Password (رمز سایت)

Hash با bcrypt

تولید OTP

ارسال ایمیل

Verify OTP

Activate Account

🧩 Login Flow

Email + Password

JWT Access Token

Refresh Token (HttpOnly)

🧩 Google Login

OAuth 2.0

Verify Token

Auto-register

نکته امنیتی

❌ هرگز رمز ایمیل واقعی کاربر

✔️ فقط رمز مخصوص سایت

🧠 لایه 5 — مدیریت وضعیت و امنیت
Frontend

AuthContext

Route Guard

Token Refresh

Persist Language/Theme

Backend

Rate Limiting

Input Validation

Role Based Access

Central Error Handler

🖥️ لایه 6 — داشبورد حرفه‌ای (Dashboard Map)

Layout

Sidebar (Courses, Progress, Settings)

Topbar (Profile, Language, Theme)

Main Content

ماژول‌ها

My Courses

Learning Progress

Resume Lesson

Profile Settings

Logout

📚 لایه 7 — سیستم آموزش (LMS Core)
مدل داده
Course
├── title
├── language
├── sections
│ └── lessons
│ ├── content
│ ├── code examples
│ ├── quiz
│ └── project

ویژگی‌ها

ذخیره پیشرفت

قفل درس‌ها

ادامه از آخرین درس

پروژه پایانی

🌍 لایه 8 — چندزبانه واقعی (i18n)

fa / en

RTL / LTR

Lazy load ترجمه‌ها

SEO-friendly

🎨 لایه 9 — UI/UX و Design System

Tailwind Design Tokens

Dark / Light

Responsive

Animations (Framer Motion)

Dashboard Style واقعی (نه ساده)

🚀 لایه 10 — Production & DevOps
Deploy

Frontend: Vercel

Backend: Render / Railway

DB: MongoDB Atlas

Production Readiness

ENV separation

Logging

Monitoring

Backup

🧪 لایه 11 — تست (Professional)

Unit Tests

Integration Tests

Auth Flow Tests

E2E (Playwright)

🧭 نقشه اجرایی (Execution Roadmap)
فاز A (پایه)

Frontend boot

Auth ساده

Dashboard skeleton

فاز B (هسته)

Auth کامل + Google

Course + Progress

i18n

فاز C (حرفه‌ای)

UI polish

Security hardening

Deploy

Files changed (0) hide show