Modern, secure, high-performance medical exam preparation LMS.
| Layer | Technology |
|---|---|
| Frontend | Next.js 15, TypeScript, Tailwind CSS 4, Radix UI |
| Backend | ASP.NET Core (.NET 10), C# 14, Modular Monolith |
| Database | PostgreSQL 17, EF Core, Code-First |
| Cache | Redis 7 |
| Search | Meilisearch |
| Brevo | |
| Storage | Cloudflare R2 (S3-compatible) |
| Logging | Serilog → Seq |
| CI/CD | GitHub Actions |
| Deployment | Docker Compose on Ubuntu VPS |
- .NET 10 SDK
- Node.js 22+
- Docker & Docker Compose
git clone https://github.com/your-org/fame-v2.git
cd fame-v2
docker compose up -d postgres redis meilisearch seqcd src/FAME.Api
dotnet runAPI runs at http://localhost:5000. Swagger at http://localhost:5000/swagger.
cd packages/web
cp .env.example .env.local # Already configured for localhost
npm install
npm run devFrontend runs at http://localhost:3000.
cd tools/FAME.Seeder
dotnet runSeeds 10 exam tracks, 20 courses, 200 MCQs, 20 exams, demo users, subscription plans, and content.
Demo credentials:
| Role | Password | |
|---|---|---|
| Admin | admin@firstaidmadeeasy.com.pk | Admin@Fame2026! |
| Instructor | instructor@demo.fame.pk | Instructor@2026! |
| Student | fatima@demo.fame.pk | Student@2026! |
Open Seq at http://localhost:5341.
Infrastructure services:
| Service | Port | URL |
|---|---|---|
| PostgreSQL | 5432 | — |
| Redis | 6379 | — |
| Meilisearch | 7700 | http://localhost:7700 |
| Seq (logs) | 5341 | http://localhost:5341 |
| MailHog SMTP | 1025 | — |
| MailHog UI | 8025 | http://localhost:8025 |
fame-v2/
├── src/
│ ├── FAME.Api/ # API host (composition root)
│ ├── FAME.SharedKernel/ # Base entities, Result<T>, value objects
│ ├── FAME.Infrastructure/ # EF Core, Redis, Email, Storage, Jobs
│ └── Modules/
│ ├── Identity/ # Auth, registration, profiles, roles
│ ├── Catalog/ # Exam tracks, courses, lectures
│ ├── Assessment/ # MCQ engine, exams, results
│ ├── Enrollment/ # Subscriptions, access, progress
│ ├── Payment/ # JazzCash, Easypaisa, Stripe
│ ├── Communication/ # Notifications, tickets, email
│ ├── Certificate/ # Issuance, verification
│ ├── Ambassador/ # Referrals, commissions
│ ├── Content/ # CMS, blog, FAQs
│ ├── Analytics/ # Audit logs, dashboards
│ └── Admin/ # Admin aggregation
├── packages/
│ └── web/ # Next.js 15 frontend
├── tests/
│ ├── FAME.UnitTests/
│ ├── FAME.IntegrationTests/
│ └── FAME.ArchitectureTests/
├── tools/
│ ├── FAME.Migrator/ # V1 → V2 data migration ETL
│ └── FAME.Seeder/ # Development seed data
├── ops/ # Monitoring, backup scripts
├── docs/ # Architecture documentation
└── docker-compose.yml
- Modular Monolith with vertical slice architecture
- CQRS-light via MediatR (Command/Query separation)
- Result pattern for explicit error handling (no exceptions for expected failures)
- Domain events dispatched after SaveChanges via EF Core interceptors
- Policy-based authorization with 8 roles
- Keyset pagination for all list endpoints
- Guid v7 primary keys (time-sortable)
- Soft delete with global query filters
Each module follows the vertical slice pattern:
Module/
├── Domain/ # Entities, enums, domain events
├── Features/ # Command/Query + Handler + Validator + Endpoint
├── Infrastructure/ # EF Core configurations
└── ModuleExtensions.cs # DI registration
# Build entire solution (18 projects)
dotnet build FAME.slnx
# Run all tests
dotnet test FAME.slnx
# Run unit tests (75 tests across SharedKernel, Catalog, Assessment, Enrollment, Payment)
dotnet test tests/FAME.UnitTests
# Run architecture tests (module boundary + naming conventions)
dotnet test tests/FAME.ArchitectureTests
# Run integration tests (requires Docker for Testcontainers)
dotnet test tests/FAME.IntegrationTests
# Frontend type check + lint
cd packages/web && npm run type-check && npm run lint
# Full Docker stack
docker compose up -d| Role | Access |
|---|---|
| SuperAdmin | Full system access |
| Admin | User/content/payment management |
| AcademicManager | Content + assessment management |
| ContentEditor | Course/lecture editing |
| SupportAgent | Tickets + read-only users |
| FinanceStaff | Payments + refunds |
| Instructor | Own courses + student interaction |
| Student | Learning + exams + profile |
# 1. Configure environment
cp .env.production.example .env
# Edit .env with real secrets (DB passwords, JWT secret, SMTP, etc.)
# 2. Deploy with build
./ops/deploy.sh --build
# 3. Verify health
curl https://firstaidmadeeasy.com.pk/api/health
curl https://api.firstaidmadeeasy.com.pk/health- Build frontend:
cd packages/web && npm run build - Build API:
cd src/FAME.Api && dotnet publish -c Release - Configure Nginx: copy
ops/nginx/fame-v2.confto/etc/nginx/sites-available/ - Set up SSL:
certbot --nginx -d firstaidmadeeasy.com.pk -d api.firstaidmadeeasy.com.pk - Start services via systemd
Production Nginx config is at ops/nginx/fame-v2.conf and includes:
- HTTP → HTTPS redirect
- TLS 1.2/1.3 with modern cipher suite
- Security headers (HSTS, X-Frame-Options, CSP, etc.)
- Gzip compression for text/CSS/JS/JSON/SVG
- Static asset caching (365 days for
_next/static/) - WebSocket support for SignalR
- Separate server block for API subdomain
docker-compose.prod.yml adds resource limits, PostgreSQL tuning, Redis eviction policy, and JSON file logging.
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d- Dashboard with stats, recent courses, upcoming exams
- Course catalog with search and filters
- Video lecture player with progress tracking
- MCQ exam engine (timed/tutor modes, strike-through, flagging)
- Detailed exam results with topic-level breakdown
- Auto-generated certificates with public verification
- Real-time notifications via SignalR
- Profile management with avatar upload
- Support ticket system with threaded replies
- Full-text search across courses, exams, content
Dashboard, Courses, Exam Tracks, Users, Payments, Blog, FAQs, CMS Pages, Certificate Templates, Announcements, Audit Logs, Feature Flags, Subscription Plans, Enrollments
Landing page, Course catalog, Exam browser, Pricing, Blog, FAQ, Certificate verification
Referral stats, earnings tracking, link management
| Week | Description |
|---|---|
| 1-2 | Monorepo scaffold, Docker Compose, .NET API scaffold |
| 3-4 | Auth module (JWT), Catalog module (courses, exam tracks) |
| 5-6 | Assessment (MCQs, exams), Enrollment, Payment, Notification |
| 7-8 | Content (blog, FAQ, CMS), Analytics, Feature flags, Search |
| 9-10 | API hardening, Health checks, Frontend scaffold |
| 11-12 | Auth UI, Student dashboard, Course catalog, Exam browser |
| 13-14 | Exam taking, Results, Course learning, Checkout, Pricing |
| 15-16 | SignalR notifications, Profile, File uploads, Tickets |
| 17-18 | Full-text search, Course player, Onboarding, Settings |
| 19-20 | Admin CRUD, Blog, FAQ, Certificates, Verification |
| 21-22 | Admin content management, Certificate templates, Announcements |
| 23-24 | Admin audit logs, Feature flags, Plans, Enrollments |
| 25+ | Production readiness: SEO, error handling, deployment config |
Proprietary — First Aid Made Easy © 2026