Skip to main content

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
OpenSearchSearch, 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
MinIOLocal S3-compatible object storage for development
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
OneSignalPush notifications

API Documentation​

TechnologyPurpose
Swagger/OpenAPIAPI documentation
MintlifyDeveloper docs site

Frontend Applications​

Shared Stack (All Apps)​

TechnologyPurpose
ReactUI framework; version is package-specific
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
SentryFrontend and backend error tracking

Development Tools​

TechnologyPurpose
ESLintCode linting
PrettierCode formatting
JestUnit and integration testing
SupertestAPI testing

Third-Party Services​

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

Data Flow​

┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Frontend │────▶│ NestJS │────▶│ PostgreSQL │
│ (React) │ │ Server │ │ │
└─────────────┘ └──────┬──────┘ └─────────────┘
│
┌────────────┼────────────┐
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Redis │ │ OpenSearch│ │ R2/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
OpenSearch 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+
OpenSearch2.x-compatible Aiven service
Redis6+
Docker20+

Local Development​

# Start infrastructure
docker-compose up -d 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