← All projects

Case study · Dec 2025 – Present

ZenDSA

A live DSA learning platform with spaced repetition and LLM-powered hints.

  • RoleSolo: designed, built, deployed, and operate it
  • Result37 registered users
  • Result120+ problems across 15 topics

The problem

Solving a data structures problem once does not mean you can solve it again in an interview weeks later. ZenDSA schedules reviews with spaced repetition and gives an LLM-powered hint when you are stuck.

What it looks like

ZenDSA Garden screen: today’s review progress and the list of problems ready for review.
Garden: what is due for review today.

How a request flows

A Spring Boot REST API on PostgreSQL, containerized with Docker and deployed on Render. The Next.js frontend runs on Vercel. GitHub Actions runs CI.

ZenDSA request pathThe learner's browser loads the Next.js frontend on Vercel, which calls the Spring Boot REST API running in Docker on Render. The API reads and writes PostgreSQL through a HikariCP connection pool. When a learner asks for a hint, the hint service checks the target against a URL allowlist and calls an LLM provider. If OpenRouter or Groq fails, the request moves to the other provider, so the learner still gets a hint. Actuator health checks, structured JSON errors and a trace ID on every log line cover the API.
  • Actuator health checks
  • Trace ID on every log line
  • Structured JSON errors
  • Tuned HikariCP pool
The real path a request takes. If one LLM provider fails, the hint request moves to the other.

Decisions that shaped it

  1. A fallback chain for LLM hints

    Hints come from OpenRouter and Groq. Providers fail and rate-limit, and a missing hint breaks the learning flow. So hint requests go through a fallback chain: if one provider fails, the request moves to the next one and the learner still gets a hint.

  2. Observability before features

    I run production alone, so problems have to be easy to see. The API has Actuator health checks, structured JSON errors, and a trace ID on every log line, so I can follow any request end to end. The HikariCP connection pool is tuned for the database it talks to.

  3. Keep the source private

    ZenDSA is a live product with real users, so the code is private. This page shows how it works instead, and I am happy to walk through the code in an interview.

What broke, and the fix

  • BrokeLLM providers failed and rate-limited

    FixHint requests now fall back to the next provider instead of failing.

  • BrokeThe LLM proxy could be pointed at hosts it should never reach (SSRF)

    FixI found this in my own security audit and fixed it with allowlist validation before any user was exposed.

Proposed design · not deployed

How I would run ZenDSA on AWS

ZenDSA runs on Render and Vercel today, and at its current size that is the right call. This is the AWS design I would move it to if it outgrew them, built on what I learned for the AWS Certified Cloud Practitioner exam. It is a design, not something I have deployed.

Proposed AWS design for ZenDSAA proposed design, not deployed. Learners reach ZenDSA through Route 53 and CloudFront with a web application firewall. CloudFront serves the frontend from S3 and sends API calls to an application load balancer in the public subnets of a VPC. The Spring Boot API runs on ECS Fargate in private subnets and uses RDS PostgreSQL, also private. Outbound calls to the LLM providers leave through a NAT gateway. Admins reach the private subnets through Client VPN. DynamoDB holds a hint cache and the Terraform lock, Secrets Manager holds credentials, CloudWatch collects logs and alarms, and Lambda runs scheduled jobs. Terraform provisions all of it from GitHub Actions.
Proposed design, not deployed. Blue is the edge, copper the public subnets, teal the private subnets, violet the managed services, and green the Terraform layer that creates them.
  • CloudFront, S3 and WAF

    Serve the frontend from the edge and put rate limits in front of the hint endpoint, because every hint costs an LLM call.

  • ECS Fargate, not Lambda, for the API

    The Spring Boot API keeps a warm JVM and a HikariCP pool to PostgreSQL. A long-running container fits that, the Docker image moves over as it is, and there are no cold starts on user requests.

  • RDS PostgreSQL in private subnets

    The data already lives in PostgreSQL, so the schema stays. Automated backups come built in, and Multi-AZ can be switched on when uptime matters more than cost.

  • DynamoDB where key-value fits

    A hint cache with a time-to-live, so a repeated hint does not cost a second LLM call, and the lock table for Terraform state. Not as a replacement for PostgreSQL.

  • NAT gateway for outbound calls

    The API has no public IP but can still reach the LLM providers. The URL allowlist from the SSRF fix still decides where it may call.

  • Secrets Manager and IAM task roles

    Database credentials and LLM API keys stay out of images and environment files. Only the API task role can read them.

  • CloudWatch

    Logs, metrics and alarms in one place. The trace IDs the API already logs become searchable across requests.

  • Lambda with EventBridge

    Scheduled jobs run on their own, so the API container only serves requests.

  • Client VPN

    Admin access to the private database without a public endpoint. For one person, SSM Session Manager would be the cheaper option.

  • Terraform

    Separate network, data, compute and edge modules. State in S3 with a DynamoDB lock. GitHub Actions runs plan on every pull request and apply on merge, using an OIDC role instead of long-lived keys.

Render today compared with the proposed AWS design
Trade-offRender todayAWS design
CostLow, and close to zero when idleA fixed monthly floor for NAT, the load balancer and RDS, even with no traffic
OperationsThe platform handles networking and patchingI own the network, upgrades and alarms
IsolationShared platform networkingAPI and database in private subnets, no public IPs
ScalingPick a bigger planECS autoscaling on CPU or request count
RebuildingSettings live in a dashboardEverything is in Terraform and can be rebuilt from Git

My call: stay on Render until traffic or uptime needs justify AWS's fixed monthly cost. With the whole design in Terraform, the move would be a planned change, not a rebuild by hand.

Results

  • 37 registered users
  • 120+ problems across 15 topics
  • Live at zendsa.vercel.app
  • Java
  • Spring Boot
  • PostgreSQL
  • Docker
  • Next.js
  • TypeScript
  • OpenRouter
  • Groq
  • GitHub Actions
  • Render
  • Vercel

Source code is private.