How jpavrdev/plataforma-estudos works
ensina.dev is a free Portuguese-language learning platform. Learners browse trails and lessons, practice through quizzes, coding challenges, certification exams and spaced-repetition cards, then track progress and earn achievements or certificates. The React app calls an Express API backed by PostgreSQL; challenge execution and disposable Linux labs are isolated in separate services. The README documents the broader product areas, while some subsystem internals were not sampled, so their links are limited to documented relationships.
Main entry points: app.ts HTTP API · App.tsx Web application · TrailController.ts Trail controller · schema.ts PostgreSQL data
Components 26
Learning experience
- Web application
frontend/src/App.tsx - Account session
frontend/src/contexts/AuthContext.tsx - Trails and lessons
frontend/src/pages/TrilhaDetalhe/index.tsx - Spaced review
frontend/src/pages/Revisao/index.tsx - Home content
frontend/src/data/home.ts - Roadmap service
backend/src/services/roadmap.service.ts - Exam service
backend/src/services/simulado.service.ts - Flashcard service
backend/src/services/flashcard.service.ts
Platform API
- HTTP API
backend/app.ts - Authentication routes
backend/src/routes/auth.routes.ts - Trail routes
backend/src/routes/trail.routes.ts - Trail controller
backend/src/controllers/TrailController.ts - Authentication controller
backend/src/controllers/AuthController.ts - Auth validation
backend/src/schemas/auth.schema.ts - Authentication middleware
backend/src/middlewares/auth.ts - PostgreSQL data
backend/schema.ts - Database client
backend/db.ts
Progress and community
- Progress statistics
backend/src/services/stats.service.ts - Study streak
backend/src/services/streak.ts
Isolated execution
- Challenge runner
runner/server.mjs - Linux labs
labs/server.mjs - Lab WebSocket
backend/src/labs.ws.ts
Administration and services
- Resume analysis
backend/src/services/ats.service.ts - Community
backend/src/services/comunidade.service.ts - Content studio
backend/src/services/estudio.service.ts
Other components
- Learner
Connections 30
- Learner → Web application: uses
- Web application → Account session: provides session
frontend/src/App.tsx - Web application → Trails and lessons: routes to
frontend/src/App.tsx - Web application → Spaced review: routes to
frontend/src/App.tsx - Web application → Home content: uses
- Trails and lessons → HTTP API: requests lessons
- Spaced review → HTTP API: requests cards
- Account session → HTTP API: requests session
frontend/src/contexts/AuthContext.tsx - HTTP API → Authentication routes: mounts
backend/app.ts - HTTP API → Trail routes: mounts
backend/app.ts - Authentication routes → Authentication controller: routes to
backend/src/routes/auth.routes.ts - Authentication routes → Authentication middleware: applies limits
- Authentication controller → Auth validation: validates with
backend/src/controllers/AuthController.ts - Trail routes → Authentication middleware: protects routes
backend/src/routes/trail.routes.ts - Trail routes → Trail controller: routes to
backend/src/routes/trail.routes.ts - Trail controller → Roadmap service: uses
- Trail controller → Content studio: uses
backend/src/controllers/TrailController.ts - Trail controller → Progress statistics: requests stats
backend/src/controllers/TrailController.ts - Authentication controller → PostgreSQL data: reads and writes
backend/src/controllers/AuthController.ts - Progress statistics → PostgreSQL data: queries
backend/src/services/stats.service.ts - Study streak → PostgreSQL data: queries
- Database client → PostgreSQL data: connects
backend/db.ts - HTTP API → Challenge runner: submits code
- HTTP API → Lab WebSocket: serves lab sockets
- Lab WebSocket → Linux labs: issues sessions
- HTTP API → Exam service: serves exams
- HTTP API → Flashcard service: serves review
- HTTP API → Resume analysis: serves resume analysis
- HTTP API → Community: serves community
- HTTP API → Study streak: calculates streak