# Intentionality

> A productivity app for students that turns coursework into quests, with streaks, focus sessions, friends, and an AI planner.

Solo, design to deploy · 193 commits · Dec 2025 to Mar 2026

Scale: 300+ users

## Results

- 300+ users
- 46 tables, all with row-level security
- 2 LLM providers with automatic failover

## The problem

Students juggle coursework, calendars and habits across separate tools, and a plain to-do list makes procrastination easy. Intentionality makes the work feel like progress, and plans from the student's real calendar and courses.

## What I built

- Quests, XP and levels, achievements, daily habits and streaks, a focus timer, analytics, friends, groups, and leaderboards.
- A Postgres schema of 46 tables across 44 migrations, with row-level security on every table.
- Kofi, an AI assistant for chat, a daily briefing, and turning a brain dump into structured tasks.
- Calendar sync from Google Calendar and Canvas or any ICS feed.

## The hard part

Keeping the AI features usable on free-tier model quotas. I wrote a router that gives each feature a primary and a fallback provider, opens a per-provider circuit breaker after three straight failures, enforces per-user daily caps, and turns provider errors into friendly messages, so a rate limit never breaks the app.

## How it fits together

- Web app -> API routes
- Calendars -> API routes (sync)
- API routes -> Database (queries)
- API routes -> AI router (plans)
- AI router -> LLM providers (failover)

Parts David built: Web app, API routes, Database, AI router.

Tradeoff: two cheaper providers with failover instead of one paid one, so the app stays free to run.

## Decisions

- Two free-tier providers with failover instead of one paid provider, so the app stays free to run and a rate limit never breaks it.
- Row-level security on every table, not just checks in API routes, so a bug in one route can't leak another student's data.

Tech: Next.js, TypeScript, Supabase, LLMs. Links: [live](https://intentionality.io) · [code](https://github.com/Alienware2000/intentionality)

Page: https://davidantwi.vercel.app/work/intentionality
