Work

Ascend

Backend-first aptitude practice: topics, sessions, attempts, derived performance.

Problem & Solution

Problem

Most aptitude platforms just display questions: there is no structured practice workflow, attempts live apart from any performance picture, and admin content such as company sheets can end up half-created.

Solution

Ascend models the real workflow — Topic → Subtopic → Question, Session → Attempt — in PostgreSQL behind a layered Controller → Service → Repository API. Performance is derived by walking the attempt chain so it can never drift, and sheet creation commits atomically. Caching, queues, and containers are deliberately out of scope.

Architecture

Ascend aptitude platform architecture diagram
Ascend — aptitude platform architecture — click to expand

Requests travel one way down the layers: routes parse, controllers delegate, services validate and orchestrate — wrapping multi-step writes such as sheet creation in a Prisma transaction — and repositories execute the Prisma queries against PostgreSQL.

Engineering Decisions

One job per layer

Controllers hold no logic; services own validation and orchestration; repositories are the only Prisma callers. Multi-step operations have exactly one home.

Derived performance

Accuracy is computed on read by walking Attempt → Question → Subtopic → Topic, so it can never drift from attempts. Tradeoff: compute on read.

Atomic sheets

Sheet plus question mappings commit in one Prisma transaction; the mapping table lets one question serve many sheets. Content is never half-written.

Limitations & next steps

  • No automated test coverage yet
  • No caching or rate limiting
  • Aggregation is computed on read, unoptimized for large volumes
  • Docker, background jobs, and AI features are out of scope