EduCourse
An e-learning platform for building-safety professionals, built solo end to end — Express/Mongo API with Redis-backed caching and RBAC, plus a React 18 SPA.

- React 18
- Express 4
- TypeScript
- MongoDB
- Redis
- Mongoose
- Redux Toolkit
- JWT
- Tailwind CSS
- Vite 5
The problem
Building-safety professionals had no dedicated place to learn, teach, or track structured safety coursework — they relied on general-purpose course marketplaces that mixed unrelated content and offered no niche-aware curation, instructor workflows, or progress tracking. The product needed three coexisting roles (learner, instructor, admin) sharing one system that covered enrollment, lecture playback, reviews, blogs, an instructor earnings dashboard, and the API/data plumbing underneath.
The approach
Backend is a TypeScript Express REST API at `/api/v1/` built around a generic handler-factory pattern (getOne / getAll / createOne / updateOne / deleteOne) that every resource controller delegates to, backed by Mongoose models that carry their own statics for cross-document aggregation (ratings, comment counts, students enrolled) and soft-deletes via `active: false`. Redis is load-bearing: it stores sessions (connect-redis), a 300s data cache invalidated by an event-driven SCAN-and-DEL pattern (`src/events/cache/*`), distributed rate limits (1000/15min global, 5/15min on auth), and a 5-min permission cache for a numeric three-tier RBAC (user/instructor/admin) with a resource×action matrix. Auth is JWT-with-cookie + session fallback and password-rotation invalidation; uploads go through Multer + Sharp + Cloudinary. The frontend is a Vite + React 18 SPA in strict-mode TypeScript with Redux Toolkit + thunks split across 15 domain slices (courses, enrollment, wishlist, reviews, notifications, instructor dashboard, blogs, tags, categories, etc.) each backed by a typed Axios service, React Router 6 separating public / protected / auth route trees behind a token-revalidation gate, Tiptap for rich text, Formik + Yup for forms, and Tailwind + GSAP for styling and motion.
The impact
Shipped end-to-end across both repos: 20 Mongoose models, 26 controllers and 22 REST route trees on the API; ~22 page views, 15 Redux slices and 15 Axios service modules on the SPA. Full three-role experience in production — public browsing (courses, blogs, FAQs, instructor directory, public profiles), authenticated learner flows (enrollment, lecture playback, my-learning, wishlist, notifications), and an instructor dashboard with course management and earnings charts. The handler-factory + event-driven cache architecture means new resources are added by writing a model, a thin controller that delegates to the factory, a routes file, and a single cache-event listener — the pattern has absorbed certificates, learning paths, quizzes, recommendations, streaks, and AI-trigger callbacks without controller bloat. Backend repo: https://github.com/Joe-Praise/EduCourse-backend.
