Case Study

Study Buddy

A gamified study-productivity app with a virtual companion that grows as you study.

RoleLead Developer · 6-person teamOwnedArchitecture · backend · data modelContextBU CS673 · Sep–Dec 2025

Study Buddy is a full-stack mobile app that turns focus time into a game. You adopt a virtual companion that grows as you study — hit your weekly goal and it thrives; fall behind and it gets unhappy, then sick, and eventually dies. The pet is the hook: not wanting to let your buddy down keeps students coming back for one more session.

Note: all screenshots use a throwaway demo account with seeded sample data, running the app locally against its own SQLite database. The same React codebase runs on iOS, Android, and web via Expo — these shots are the web target.

Tech stack

Frontend
React Native + Expo (SDK 54) · React Navigation (stack + bottom tabs)
Backend
Node.js · Express
Database
SQLite
Auth
JWT (Bearer tokens) with bcrypt-hashed passwords
API docs
Swagger / OpenAPI 3.0 (swagger-jsdoc + swagger-ui-express)
Testing
Jest + Supertest (unit, integration, acceptance)
Tooling
ESLint · Docker + Docker Compose · GitHub Actions CI · Render

Sign in — JWT auth with real password rules

A single screen toggles between Login and Register. Registration enforces a strong-password policy (12+ chars with upper, lower, number, and symbol) on the client; the backend hashes with bcrypt and issues a JWT. The token is persisted on-device and auto-expires — the app silently logs you back in on return, and out when the token lapses.

Study Buddy login screen with username and password fields and a switch-to-register link

Home — meet your buddy

The home screen is your companion. The buddy's sprite reflects its health — one of five states (Happy → Normal → Unhappy → Angry → Dead) across four animal types (cat, deer, owl, wolf), for 20 hand-drawn variations — and it physically grows as it gains experience from completed sessions. Status is recomputed from your study-vs-goal progress each time the screen is focused; if the buddy ever dies, the app hands you a fresh one to revive.

Home screen showing a happy cartoon cat companion named Buddy above a Logout button, with a bottom tab bar

Focus Mode — the study timer

Studying is the core loop. Pick a preset (25 / 60 min) or enter any duration up to 180 minutes, then run a focus block. Completed sessions are written to the backend, feed the buddy's experience, and count toward your weekly goal.

Focus Mode screen with 25 / 60 minute presets, a custom-minutes field, and a Start Study Session button

Progress — calendar & statistics

Every session is logged and rolled up: total sessions, active days, and total time sit above a month calendar that dots the days you studied and highlights today. Tapping a day drills into that day's individual sessions with start/end times and durations — progress is concrete, not just a number.

Calendar tab showing lifetime stats and a July 2026 calendar with study days dotted and today highlighted

Game Center — earned breaks

The app leans into “a balance between work and rest is better for learning.” Three built-in mini-games — a jumping platformer, a ball-defense game, and a survival game — each a self-contained React Native canvas — give the user a low-stakes reason to stay in the app between sessions.

Game Center with three selectable mini-game cards (Action, Racing, Strategy) and a Launch button
Three selectable mini-games
A physics jumping mini-game rendered in-app: hold to aim angle, release to jump
A physics jumping game, rendered in-app

Settings — customize your buddy & goal

Users set their weekly study goal (which drives the buddy's health), rename the companion, and choose its species. Settings are persisted per user and immediately change how progress is scored.

Settings screen with weekly goal in minutes, buddy name, and an animal-type picker, plus a Save button

The backend — 20+ documented endpoints

The Express backend exposes 20+ RESTful endpoints across 6 modules — Users, Profiles, Settings, Study, Stats, and Buddy — every one documented in an interactive Swagger / OpenAPI 3.0 spec. All routes except register/login require a Bearer JWT; a rate limiter guards the API surface.

Swagger UI for the Study Buddy API showing grouped Buddy, Profiles, and Settings endpoints under the OpenAPI 3.0 spec

Engineering highlights

  • Led a 6-person Agile team end to end.

    I owned the architecture, sprint planning, and feature delivery across the full project lifecycle (BU CS673 Agile SWE).

  • 20+ RESTful endpoints across 6 backend modules.

    Users, profile, settings, study tracking, stats, and companion — all behind JWT auth and rate limiting, fully documented in Swagger.

  • Normalized SQLite schema.

    6 tables with foreign-key relationships tying accounts to sessions, timers, settings, and companion progression.

  • State-driven companion system.

    A single status field (0–4) maps to 20 sprite variations and drives an experience/size progression, decoupled from the UI via small data-interface modules.

  • Component-based React Native frontend.

    Reusable inputs, buttons, backgrounds, and a shared navigation shell (stack + bottom tabs) across every screen.

  • Jest + Supertest suite.

    Unit, integration, and acceptance tests reaching 90%+ endpoint coverage.

  • Docker + GitHub Actions CI/CD.

    Every push builds both images and reruns the full test suite inside the containers before deploying to Render.

Architecture notes

  • One React Native / Expo codebase targets iOS, Android, and web; navigation is a native stack wrapping a bottom-tab navigator.
  • Thin data-interface layer — screens never call fetch blindly; a small set of modules (status, exp, studySessions, timeLeft, …) wrap the API so business logic stays out of the components.
  • Auth as context — a single AuthProvider holds the user, token, and buddy data, hydrates from storage on launch, and schedules auto-logout at token expiry.
  • Config-driven backend — secrets (JWT_SECRET, expiry, port) come from the environment; the same image runs locally, in Docker Compose, and on Render.

What I'd build next

  • Push notifications to remind users before the buddy's health starts to slip.
  • Social layer — compare streaks with friends and revive each other's buddies.
  • Richer analytics (streaks, best time-of-day, subject tagging) on top of the session log.
  • Migrate the datastore from SQLite to Postgres for multi-instance deployment.