Learnille Tech Stack
Overview
This document outlines the technologies powering the Learnille platform across all applications and infrastructure.
Backend
Core Framework
| Technology | Purpose |
|---|
| NestJS | Backend framework (modular, TypeScript-first) |
| TypeScript | Primary language |
| TypeORM | Database ORM and migrations |
Databases
| Technology | Purpose |
|---|
| PostgreSQL | Primary relational database |
| Elasticsearch | Search, recommendations, product embeddings |
| Redis | Caching, session storage, rate limiting |
Background Processing
| Technology | Purpose |
|---|
| BullMQ | Job queues (video processing, emails, embeddings) |
| Redis | Queue backend for BullMQ |
Authentication & Security
| Technology | Purpose |
|---|
| Passport.js | Authentication strategies |
| JWT | Access tokens (short-lived) |
| HttpOnly Cookies | Refresh tokens (secure) |
| bcrypt | Password hashing |
| CASL | Authorization and permissions |
File Storage
| Technology | Purpose |
|---|
| MinIO | S3-compatible object storage (videos, images, files) |
| Cloudflare R2 | CDN and storage (production) |
Real-time
| Technology | Purpose |
|---|
| Soketi | WebSocket server (Pusher-compatible) |
| InstantDB | Real-time data sync |
Payments
| Technology | Purpose |
|---|
| Paystack | Payment processing (primary) |
| Flutterwave | Payment processing (alternative) |
Email & Notifications
| Technology | Purpose |
|---|
| Nodemailer | Email sending |
| Handlebars | Email templates |
| Firebase Cloud Messaging | Push notifications |
API Documentation
| Technology | Purpose |
|---|
| Swagger/OpenAPI | API documentation |
| Mintlify | Developer docs site |
Frontend Applications
Shared Stack (All Apps)
| Technology | Purpose |
|---|
| React 18 | UI framework |
| TypeScript | Primary language |
| Vite | Build tool and dev server |
| Chakra UI v3 | Component library |
| Zustand | State management |
| React Query | Server state and caching |
| Axios | HTTP client |
| Zod | Schema validation |
| React Router | Routing |
Applications
| App | Domain | Description |
|---|
| public | learnille.com | Student-facing marketplace |
| student | app.learnille.com | Student dashboard and learning |
| instructor | instructor.learnille.com | Instructor dashboard |
| consultant | consultant.learnille.com | Consultant dashboard |
| admin | admin.learnille.com | Admin dashboard |
| auth | auth.learnille.com | Authentication flows |
| landing-page | learnille.com | Marketing pages |
Shared Package
| Technology | Purpose |
|---|
| shared/ | Shared TypeScript types, utilities, constants |
Infrastructure
Hosting & Deployment
| Technology | Purpose |
|---|
| Docker | Containerization |
| Docker Compose | Local development orchestration |
| GitHub Actions | CI/CD pipelines |
Monitoring & Logging
| Technology | Purpose |
|---|
| Winston | Structured logging |
| Sentry | Error tracking (planned) |
| Technology | Purpose |
|---|
| ESLint | Code linting |
| Prettier | Code formatting |
| Jest | Unit and integration testing |
| Supertest | API testing |
Third-Party Services
| Service | Purpose |
|---|
| OpenAI | Embeddings for recommendations |
| Google OAuth | Social login |
| Apple OAuth | Social login |
| Cloudflare | CDN, DNS, security |
Data Flow
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Frontend ββββββΆβ NestJS ββββββΆβ PostgreSQL β
β (React) β β Server β β β
βββββββββββββββ ββββββββ¬βββββββ βββββββββββββββ
ββββββββββββββΌβββββββββββββ
ββββββββββββ ββββββββββββ ββββββββββββ
β Redis β β Elastic β β MinIO β
β (Cache) β β (Search) β β (Files) β
ββββββββββββ ββββββββββββ ββββββββββββ
ββββββββββββ
ββββββββββββ
Key Architectural Decisions
| Decision | Rationale |
|---|
| NestJS over Express | Modular architecture, built-in DI, TypeScript-first |
| PostgreSQL over MongoDB | Relational data, complex queries, ACID compliance |
| Elasticsearch for search | Full-text search, vector similarity, aggregations |
| BullMQ over Agenda | Redis-backed, better performance, reliable job processing |
| Chakra UI v3 | Accessible, composable, good DX |
| Zustand over Redux | Simpler API, less boilerplate |
| Separate frontend apps | Independent deployments, role-specific UX |
Version Requirements
| Technology | Version |
|---|
| Node.js | 18+ |
| PostgreSQL | 14+ |
| Elasticsearch | 8.x |
| Redis | 6+ |
| Docker | 20+ |
Local Development
docker-compose up -d postgres redis elasticsearch minio
cd server && npm run start:dev
# Start frontend (pick one)
cd instructor && npm run dev
Last Updated
2025-01-27