Interactive algorithm visualizer with 12 built-in DSA visualizations (sorting, searching, graph, DP) and AI-powered custom generation via OpenRouter.
Stack: React 18 + TypeScript + Vite + Tailwind • FastAPI + LangGraph (Python) • PocketBase (auth + SQLite DB)
DSA-VISU/
├── frontend/ React + TypeScript + Vite app — the UI (run npm here)
├── backend/ FastAPI + LangGraph server — the AI generation pipeline
├── deploy/ Droplet setup: systemd, nginx, PocketBase scripts
├── docs/ Design specs
└── .env Shared env (VITE_* → frontend, the rest → backend)
The frontend never calls the LLM directly — it POSTs to the backend, which runs the real generation pipeline. See backend/README.md.
bash deploy/run.sh # starts PocketBase + backend + frontend, waits until ready
bash deploy/stop.sh # stops them allThen open http://localhost:5173. Logs go to deploy/.run/. First-time setup
(install deps, download PocketBase, create the admin account + DB collection)
is the manual flow below.
bash deploy/dev-start.shFirst run: open http://127.0.0.1:8090/_/ to create an admin account, then:
bash deploy/init-pocketbase.sh http://127.0.0.1:8090 your@email.com YourPasswordcd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp ../.env.example ../.env
# Edit .env and set OPENROUTER_API_KEY (get one at https://openrouter.ai/)
export $(grep -v '^#' ../.env | xargs)
python -m uvicorn app.main:app --reload --port 8000cd frontend
npm install
npm run devOpen http://localhost:5173.
See deploy/README.md for full droplet setup.
| Variable | Where | Purpose |
|---|---|---|
VITE_POCKETBASE_URL |
frontend | PocketBase URL |
POCKETBASE_URL |
backend | Server-side PocketBase URL (for token verification) |
OPENROUTER_API_KEY |
backend | OpenRouter API key |
OPENROUTER_MODEL |
backend | Model identifier (default: google/gemini-2.5-flash) |
MIT