Skip to content

singlaamitesh/DSA-VISU

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorhythm

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)

Project Structure

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.

Local Development

Quick start (all services, one command)

bash deploy/run.sh     # starts PocketBase + backend + frontend, waits until ready
bash deploy/stop.sh    # stops them all

Then 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.

Manual (three terminals)

1. PocketBase (auth + database)

bash deploy/dev-start.sh

First 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 YourPassword

2. Python backend

cd 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 8000

3. Frontend

cd frontend
npm install
npm run dev

Open http://localhost:5173.

Deployment (DigitalOcean)

See deploy/README.md for full droplet setup.

Environment Variables

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)

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages