How jafarfarzi-stack/afagh works
Afagh ERP is a university information system delivered in a modern Next.js generation and a smaller Node/SQLite phase-zero generation. The main user journey is authenticated student and staff work across enrollment, teaching and grades, then policy-driven graduation, clearance, and alumni services; administrators manage the associated academic, finance, workflow, and reporting functions. The modern generation also documents robust enrollment queuing, electronic archiving, and public credential verification. The tree and excerpts establish the phase-zero API’s engine calls; several modern subsystems are represented from README descriptions and paths, not inspected implementations.
Main entry points: admin Admin portal · server.js Phase-zero API · index.js SQLite database · student Student portal
Components 31
Modern university system
- Student portal
afagh-next/src/app/student - Professor portal
afagh-next/src/app/professor - Alumni portal
afagh-next/src/app/alumni
Academic operations
- Enrollment and waitlist
afagh-next/src/lib/enroll-engine.ts - Curriculum management
afagh-next/src/app/admin/curriculum/actions.ts - Exam management
afagh-next/src/lib/exam-engine.ts - Grades and transcript
afagh-next/src/app/professor/grades/grades-core.ts - Graduation and clearance
afagh-next/src/lib/graduation-engine.ts - Certificates and verification
afagh-next/src/lib/certificate-engine.ts
Administration
- Admin portal
afagh-next/src/app/admin - Workflow engine
afagh-next/src/lib/workflow-engine.ts - Finance and tuition
afagh-next/src/lib/finance-engine.ts - Payroll
afagh-next/src/lib/payroll-engine.ts - Business intelligence
afagh-next/src/lib/bi-engine.ts - Electronic archive
afagh-next/src/lib/objectStore.ts
Phase-zero system
- Phase-zero API
afagh-erp/src/server.js - Enrollment validation
afagh-erp/src/engines/enrollment.js - Grades and GPA
afagh-erp/src/engines/grades.js - Academic regulations
afagh-erp/src/engines/regulations.js - Workflow
afagh-erp/src/engines/workflow.js - Payroll and pay rules
afagh-erp/src/engines/payroll.js - RBAC and audit
afagh-erp/src/engines/rbac.js - SQLite database
afagh-erp/src/db/index.js - Pay rules
afagh-erp/src/engines/payRules.js
Shared platform
- Authentication and roles
afagh-next/src/lib/auth.ts - PostgreSQL data
afagh-next/src/db/index.ts - Redis queue
- MinIO object storage
Other components
- Student
- Staff
- Public verifier
Connections 36
- Student → Student portal: uses
README.md - Staff → Professor portal: uses
README.md - Staff → Admin portal: uses
README.md - Student portal → Authentication and roles: authenticates
- Professor portal → Authentication and roles: authenticates
- Admin portal → Authentication and roles: authenticates
- Student portal → Enrollment and waitlist: requests enrollment
README.md - Enrollment and waitlist → Redis queue: queues capacity
README.md - Admin portal → Curriculum management: manages curriculum
afagh-next/src/app/admin/curriculum/CurriculumManagerClient.tsx - Admin portal → Exam management: plans exams
README.md - Professor portal → Grades and transcript: submits grades
README.md - Grades and transcript → Graduation and clearance: triggers completion
README.md - Graduation and clearance → Workflow engine: routes clearance
README.md - Graduation and clearance → Alumni portal: transfers account
README.md - Alumni portal → Certificates and verification: requests credentials
README.md - Public verifier → Certificates and verification: verifies degree
README.md - Admin portal → Finance and tuition: manages finance
README.md - Admin portal → Payroll: manages payroll
README.md - Admin portal → Business intelligence: views reports
README.md - Admin portal → Electronic archive: manages archive
README.md - Electronic archive → MinIO object storage: stores files
README.md - Student → Phase-zero API: uses API
- Staff → Phase-zero API: uses API
- Phase-zero API → Enrollment validation: dispatches
afagh-erp/src/server.js - Phase-zero API → Grades and GPA: dispatches
afagh-erp/src/server.js - Phase-zero API → Workflow: dispatches
afagh-erp/src/server.js - Phase-zero API → Payroll and pay rules: dispatches
afagh-erp/src/server.js - Phase-zero API → RBAC and audit: checks access
afagh-erp/src/server.js - Enrollment validation → Academic regulations: reads limits
afagh-erp/src/engines/enrollment.js - Grades and GPA → Academic regulations: uses policies
afagh-erp/src/engines/grades.js - Payroll and pay rules → Pay rules: uses pay rules
afagh-erp/src/engines/payroll.js - Phase-zero API → SQLite database: reads and writes
afagh-erp/src/server.js - Enrollment validation → SQLite database: reads and writes
afagh-erp/src/engines/enrollment.js - Grades and GPA → SQLite database: reads and writes
afagh-erp/src/engines/grades.js - Workflow → SQLite database: reads and writes
afagh-erp/src/engines/workflow.js - RBAC and audit → SQLite database: reads and writes
afagh-erp/src/engines/rbac.js