How shavkatjony/mnist-classifier-fullstack works
This is an end-to-end MNIST digit-recognition application: users draw or load a digit, the browser sends pixels to the Python API, and the backend returns a prediction for display. A second workflow trains the network on MNIST, streams progress and metrics to the UI, and saves a checkpoint. The backend also exposes model status and sample-image retrieval. The graph reflects the sampled backend/model and frontend code; some UI and storage details are documented or visible only through the file tree, so those links use README evidence where appropriate.
Main entry points: main.py Training workflow · app.js Digit canvas · model.py MNIST network · raw-dataset MNIST dataset
Components 16
Web interface
- Digit canvas
static/app.js - Prediction display
static/app.js - Sample controls
static/app.js - Training controls
static/app.js - Training charts
static/app.js - Metrics display
static/app.js
Backend API
- FastAPI service
backend/main.py - Prediction endpoint
backend/main.py - Sample endpoint
backend/main.py - Training WebSocket
backend/main.py - Metrics WebSocket
backend/main.py
Model and training
- Training workflow
backend/main.py - MNIST network
backend/model.py
Data and state
- MNIST dataset
raw-dataset - Model checkpoint
mnist_model.pth
Other components
- User
Connections 19
- User → Digit canvas: draws digits
README.md - Digit canvas → Prediction endpoint: submits pixels
README.md - Prediction endpoint → MNIST network: runs inference
backend/main.py - Prediction endpoint → Prediction display: returns prediction
README.md - User → Sample controls: requests sample
static/app.js - Sample controls → Sample endpoint: fetches sample
static/app.js - Sample endpoint → MNIST dataset: loads test data
backend/main.py - Sample endpoint → Digit canvas: returns pixels
static/app.js - User → Training controls: starts or stops
static/app.js - Training controls → FastAPI service: sends configuration
static/app.js - FastAPI service → Training workflow: starts workflow
backend/main.py - Training workflow → MNIST dataset: loads training data
backend/main.py - Training workflow → MNIST network: trains network
backend/main.py - Training workflow → Model checkpoint: saves weights
backend/main.py - Training workflow → Training WebSocket: broadcasts progress
backend/main.py - Training WebSocket → Training charts: streams updates
static/app.js - Metrics WebSocket → Metrics display: streams metrics
static/app.js - FastAPI service → Metrics WebSocket: serves metrics
backend/main.py - FastAPI service → MNIST network: reports model details
backend/main.py