An interactive Flask learning site for visualizing core data structures and algorithms. It combines step-by-step browser animations with an optional OpenAI-powered teaching assistant.
- Sorting: bubble, insertion, quick, and merge sort
- Trees: traversal, binary trees, and BST insert/search/delete
- Graphs: BFS, DFS, and Dijkstra's algorithm
- Data structures: arrays and linked lists
- Contextual chat assistant through
/chat-api
- Python and Flask
- Vanilla JavaScript visualizations
- HTML/CSS templates
- OpenAI API for the optional assistant
git clone https://github.com/mark2146/education_system.git
cd education_system
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
python -m pip install -r requirements.txt
cp .env.example .envThe visualizations work without an API key. To enable chat, set OPENAI_API_KEY in .env. For a shared deployment, also set APP_ACCESS_TOKEN and configure the frontend/reverse proxy to send it as a bearer token.
flask --app app run --debugOpen http://127.0.0.1:5000. For a production-like process:
gunicorn app:appapp.py Flask routes and chat endpoint
templates/ pages for individual topics
static/js/ visualization algorithms
static/css/ site styling
requirements.txt Python runtime dependencies
- Keep
.envandOPENAI_API_KEYout of version control. /chat-apisupports optional bearer-token protection, a 32 KB request limit, and a 2,000-character message limit. Add per-client rate limiting before public deployment.- Internal exceptions are logged server-side and are not returned to clients.
- Set request-size limits and production security headers at the application or reverse proxy.
Educational project. The visualizations prioritize clarity and are not intended as production algorithm libraries.