- TypeScript 100%
- Docker <1%
- HTML <1%
Quenti (lightweight fork) #
An open-source Quizlet-style flashcard/study app.
This is a fork of quenti-io/quenti, rewritten into a lighter-weight stack: a static Vite/React frontend backed by a Bun + Elysia API and an embedded SQLite database — replacing the original's Next.js + tRPC + Prisma/MySQL app entirely. The motivation was deployability: the original needs a MySQL server, Redis, S3-compatible storage, and several third-party accounts (Google OAuth, Resend, Stripe, ...) just to run; this fork needs none of that, and ships as a single container with one file as its database.
This is a deliberate scope reduction, not just an architecture swap: classes/assignments, organizations, billing, real-time collaboration, image upload, and leaderboards from the original are not present here. What's kept is auth, study sets, the four core study modes, folders, and profiles — see "What's here" below.
The stack #
- Bun — JS runtime, used for both the API server and package management
- Elysia — HTTP API framework (
apps/api) - Drizzle + SQLite — embedded database, single file (
packages/db) - Vite + React — static SPA frontend (
apps/web) - Chakra UI — same UI library as the original, reused for visual parity
- React Router + TanStack Query
Dependency footprint, for reference: apps/api has 6 runtime dependencies, apps/web has 10. No ORM code generation step, no external database service, no OAuth app registration, no email provider — auth is username/password, stored in the same SQLite file as everything else.
What's here #
- Auth: signup/login/logout (username + password)
- Study sets: create, edit, delete, view
- Study modes: Learn, Flashcards, Match, Test
- Folders and profiles
- Spaced repetition: every Learn/Flashcards answer feeds an SM-2 schedule;
/reviewworks through due cards (Again/Hard/Good/Easy), with a daily streak on the home page - Weak-terms set:
/review?mode=weakdrills the terms you miss most across all sets - Stats (
/stats): activity heatmap, streaks, weekly accuracy, per-mode accuracy, per-set mastery, and a 7-day due forecast - Global search (
/search, or Cmd/Ctrl+K): SQLite FTS5 over set titles, descriptions, tags, terms and definitions — your own sets plus other people's public ones
Running it #
apps/api runs its database migrations automatically on startup (idempotent — safe on every boot), so there's no separate migrate step.
-
Install dependencies (from the repo root):
bun install -
Set up env files for each app:
cp apps/api/.env.example apps/api/.env cp apps/web/.env.example apps/web/.envThe default
DATABASE_URLinapps/api/.env.exampleis a relative path — fine for local dev, but use an absolute path if you ever runapps/apifrom a different working directory, to avoid pointing at two different files by accident. -
Start both apps:
bun run appThis runs
apps/apion:3001andapps/webon:5173.
If you need to run migrations manually (e.g. against a database apps/api isn't currently pointed at), bun run --cwd packages/db db:migrate does that against whatever DATABASE_URL you pass it.
Deploying #
The root Dockerfile builds apps/web to a static bundle and runs apps/api as a single Bun process that serves both the API and the static frontend, backed by a SQLite file on a mounted volume. The image auto-migrates on startup, so a first run against an empty volume just works:
docker build -t quenti .
docker run -p 3001:3001 -v quenti-data:/data -e DATABASE_URL=/data/quenti.db quenti
A prebuilt multi-arch (linux/amd64 + linux/arm64) image is published at indexxingdev/quenti-lite:
docker run -d -p 3001:3001 -v quenti-data:/data -e DATABASE_URL=/data/quenti.db indexxingdev/quenti-lite:latest
Deploying with Coolify (or any platform that reads docker-compose.yml) #
Platforms like Coolify configure environment variables and persistent storage from a docker-compose.yml — they don't read a Dockerfile's ENV/VOLUME or a prebuilt image's embedded metadata for that. Deploying the raw image directly (no compose file) is why Coolify won't show any env vars or offer persistent storage, and why every redeploy silently starts from an empty database — without a named volume declared in compose, there's nothing telling the platform to keep /data around across deploys.
Use the root docker-compose.yml instead: in Coolify, add a new resource as a "Docker Compose" application pointing at this repo (or paste the file directly), not a plain "Docker Image" deployment. It:
- declares a named volume mounted at
/data, so the SQLite file survives redeploys - requires one variable,
PUBLIC_URL— the URL the service is actually reachable at (e.g.https://quenti.example.com); it's used to build default avatar image URLs and for CORS, so leaving it wrong breaks avatars and, if you ever split the frontend out, cross-origin requests - deliberately does not expose
DATABASE_URLas an overridable variable — the image already defaults it to/data/quenti.dbto match the volume; making it overridable just invites an unrelated ambientDATABASE_URL(a stray.envfile, a platform-injected value from some other attached database) silently pointing the app at the wrong thing
Repo layout #
apps/
api/ Bun + Elysia HTTP API
web/ Vite + React static SPA
packages/
auth/ session/password auth logic, used by apps/api
db/ Drizzle schema + SQLite client, migrations