Skip to content

Learnille Tech Stack

Learnille Tech Stack

Overview

This document outlines the technologies powering the Learnille platform across all applications and infrastructure.

Backend

Core Framework

TechnologyPurpose
NestJSBackend framework (modular, TypeScript-first)
TypeScriptPrimary language
TypeORMDatabase ORM and migrations

Databases

TechnologyPurpose
PostgreSQLPrimary relational database
ElasticsearchSearch, recommendations, product embeddings
RedisCaching, session storage, rate limiting

Background Processing

TechnologyPurpose
BullMQJob queues (video processing, emails, embeddings)
RedisQueue backend for BullMQ

Authentication & Security

TechnologyPurpose
Passport.jsAuthentication strategies
JWTAccess tokens (short-lived)
HttpOnly CookiesRefresh tokens (secure)
bcryptPassword hashing
CASLAuthorization and permissions

File Storage

TechnologyPurpose
MinIOS3-compatible object storage (videos, images, files)
Cloudflare R2CDN and storage (production)

Real-time

TechnologyPurpose
SoketiWebSocket server (Pusher-compatible)
InstantDBReal-time data sync

Payments

TechnologyPurpose
PaystackPayment processing (primary)
FlutterwavePayment processing (alternative)

Email & Notifications

TechnologyPurpose
NodemailerEmail sending
HandlebarsEmail templates
Firebase Cloud MessagingPush notifications

API Documentation

TechnologyPurpose
Swagger/OpenAPIAPI documentation
MintlifyDeveloper docs site

Frontend Applications

Shared Stack (All Apps)

TechnologyPurpose
React 18UI framework
TypeScriptPrimary language
ViteBuild tool and dev server
Chakra UI v3Component library
ZustandState management
React QueryServer state and caching
AxiosHTTP client
ZodSchema validation
React RouterRouting

Applications

AppDomainDescription
publiclearnille.comStudent-facing marketplace
studentapp.learnille.comStudent dashboard and learning
instructorinstructor.learnille.comInstructor dashboard
consultantconsultant.learnille.comConsultant dashboard
adminadmin.learnille.comAdmin dashboard
authauth.learnille.comAuthentication flows
landing-pagelearnille.comMarketing pages

Shared Package

TechnologyPurpose
shared/Shared TypeScript types, utilities, constants

Infrastructure

Hosting & Deployment

TechnologyPurpose
DockerContainerization
Docker ComposeLocal development orchestration
GitHub ActionsCI/CD pipelines

Monitoring & Logging

TechnologyPurpose
WinstonStructured logging
SentryError tracking (planned)

Development Tools

TechnologyPurpose
ESLintCode linting
PrettierCode formatting
JestUnit and integration testing
SupertestAPI testing

Third-Party Services

ServicePurpose
OpenAIEmbeddings for recommendations
Google OAuthSocial login
Apple OAuthSocial login
CloudflareCDN, DNS, security

Data Flow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Frontend │────▢│ NestJS │────▢│ PostgreSQL β”‚
β”‚ (React) β”‚ β”‚ Server β”‚ β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β–Ό β–Ό β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Redis β”‚ β”‚ Elastic β”‚ β”‚ MinIO β”‚
β”‚ (Cache) β”‚ β”‚ (Search) β”‚ β”‚ (Files) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ BullMQ β”‚
β”‚ (Jobs) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Architectural Decisions

DecisionRationale
NestJS over ExpressModular architecture, built-in DI, TypeScript-first
PostgreSQL over MongoDBRelational data, complex queries, ACID compliance
Elasticsearch for searchFull-text search, vector similarity, aggregations
BullMQ over AgendaRedis-backed, better performance, reliable job processing
Chakra UI v3Accessible, composable, good DX
Zustand over ReduxSimpler API, less boilerplate
Separate frontend appsIndependent deployments, role-specific UX

Version Requirements

TechnologyVersion
Node.js18+
PostgreSQL14+
Elasticsearch8.x
Redis6+
Docker20+

Local Development

Terminal window
# Start infrastructure
docker-compose up -d postgres redis elasticsearch minio
# Start backend
cd server && npm run start:dev
# Start frontend (pick one)
cd public && npm run dev
cd admin && npm run dev
cd instructor && npm run dev

Last Updated

2025-01-27