7cb2b957a7a5cdbe0cb6c06c96ba205a3a6f7088
Gameno Dashboard - Persian Teaching Institution Admin Dashboard
A complete, production-ready admin dashboard built with Vue 3 (Composition API), PrimeVue 4, PrimeFlex, Pinia, Vue Router 4, vue-i18n, and Axios. Designed specifically for managing an educational institution in Persian (RTL layout) with role-based access control (RBAC).
🚀 Setup and Installation
Prerequisites
- Node.js v18+ and npm v9+
Commands
# 1. Install dependencies
npm install
# 2. Run local development server
npm run dev
# 3. Build production bundle
npm run build
# 4. Preview production build
npm run preview
🗺️ Route Permission Mapping
All routes enforce client-side permission checks via global navigation guards (/src/router/guards.js) and UI element visibility gates (<PermissionGate>).
| Route Path | View Component | Required Permission | Description |
|---|---|---|---|
/login |
LoginView.vue |
Public | Admin login page |
/ |
DashboardHomeView.vue |
Authenticated | Dashboard home statistics & shortcuts |
/users |
UserListView.vue |
users:read |
List students & staff |
/users/create |
UserFormView.vue |
users:create |
Create new user |
/users/edit/:id |
UserFormView.vue |
users:update |
Edit user profile |
/users/:id |
UserDetailView.vue |
users:read |
Profile summary, courses, payments, certificates |
/professors |
ProfessorListView.vue |
professors:read |
List instructors |
/professors/create |
ProfessorFormView.vue |
professors:create |
Add instructor |
/professors/edit/:id |
ProfessorFormView.vue |
professors:update |
Edit instructor |
/courses |
CourseListView.vue |
courses:read |
List courses |
/courses/create |
CourseFormView.vue |
courses:create |
Create course & auto/manual session generator |
/courses/edit/:id |
CourseFormView.vue |
courses:update |
Edit course & sessions |
/courses/:id |
CourseDetailView.vue |
courses:read |
Course details & sessions overview |
/sessions |
SessionListView.vue |
sessions:read |
List scheduled sessions |
/sessions/create |
SessionFormView.vue |
sessions:create |
Schedule single session |
/sessions/edit/:id |
SessionFormView.vue |
sessions:update |
Edit session details |
/attendances/session/:id |
AttendanceEntryView.vue |
sessions:attendance |
Bulk session attendance entry |
/payments |
PaymentListView.vue |
payments:read |
Payment ledgers & invoices |
/payments/:id |
PaymentDetailView.vue |
payments:read |
Payment detail & record transactions |
/roles |
RoleListView.vue |
roles:read |
List custom roles |
/roles/create |
RoleFormView.vue |
roles:create |
Create role & permission matrix |
/roles/edit/:id |
RoleFormView.vue |
roles:update |
Edit role permissions |
/notifications |
NotificationListView.vue |
notifications:read |
Delivery log & manual retry |
/forbidden |
ForbiddenView.vue |
Authenticated | 403 Forbidden page |
/* |
NotFoundView.vue |
Public | 404 Not Found page |
⚙️ Automatic Session Date Generation Algorithm
In CourseFormView.vue (Automatic Tab):
- Inputs: Admin specifies requested total sessions count (e.g.
12), start date in Jalali Shamsi format (e.g.1403/01/01), start/end time, and selected weekdays (e.g. Saturday = 6, Tuesday = 2). - Rolling Calendar Loop:
- Converts the start date into a
momentinstance in Jalali locale. - Iteratively increments day by day.
- Checks if
currentMoment.day()matches any of the chosen weekdays. - When matched, increments session counter and pushes a preview row object (
sessionNumber,dateformatted in JalaliYYYY/MM/DD,startTime,endTime,topic).
- Converts the start date into a
- Interactive Preview: Renders an inline editable data table so the admin can review or manually adjust individual row dates or topics before final submission.
- Bulk Dispatch: Sends the generated session array to
POST /sessions/admin/createin a single API request.
📝 Key Architecture Assumptions
- Authentication & Token Storage:
- JWT
accessTokenandrefreshTokenare stored inlocalStorageand synchronized with HTTP cookies viajs-cookie. - Axios request interceptor attaches
Authorization: Bearer <accessToken>. - On
401 Unauthorizedresponses, Axios automatically triggers silent token renewal callingPOST /auth/refresh.
- JWT
- Permission Store Rehydration:
- Permissions array is loaded once on login from
response.user.role.permissions. - On hard page refresh, if a valid token exists but Pinia store is unpopulated,
guards.jstriggersGET /users/user/get-selfonce to rehydrate permissions.
- Permissions array is loaded once on login from
- Certificate Upload Flow:
- Uses two-stage S3/MinIO upload strategy.
ImageManager.vueuploads binary file toPOST /files/admin/upload-tempreturning a temporary filename (tempFileName).- Committing a certificate form dispatches
tempFileNameto/certificates/user/upload, moving the file to persistent storage on the backend.
Languages
Vue
86.5%
JavaScript
11.2%
SCSS
2.2%