A full-stack React and Django application for generating LaTeX-based cheat sheets with live preview, saved projects, and PDF export.
Features • Architecture • Getting Started • Deployments • API Endpoints • Contributing
Cheat Sheet Generator helps students and instructors build math reference sheets from structured formula libraries. Users can select topics, generate starter LaTeX, refine layout settings, preview compiled output, and export the final result as source or PDF.
The repository includes:
- a React frontend for the interactive editor and preview workflow
- a Django REST API for formula generation, persistence, and PDF compilation
- a public GitHub Pages site for lightweight project browsing
- Multi-class selection across subjects from pre-algebra through calculus
- Category-based formula picking without multi-select keyboard shortcuts
- Drag-and-drop ordering for formulas and grouped sections
- Generated LaTeX editing in the browser
- Live PDF preview alongside the editor
- PDF compilation through the backend using Tectonic
- Download support for both
.texand compiled.pdf - Local autosave to preserve in-progress work
- One, two, or three column layouts
- Adjustable margins, font sizing, and spacing
- Layout-aware recompile flow after formatting changes
- Saved cheat sheet projects
- Reusable templates
- Practice problem storage
A public project page is available at https://chicostate.github.io/cheat-sheet/ for lightweight browsing and onboarding.
The hosted project page does not run the full application by itself. The full experience still depends on the Django API.
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite 6, react-pdf, dnd-kit |
| Backend | Django 6, Django REST Framework |
| PDF pipeline | Tectonic |
| Database | SQLite in development, PostgreSQL in Docker |
| Container tooling | Docker Compose |
| CI | GitHub Actions |
Frontend (React + Vite)
├─ Formula selection UI
├─ Layout controls
├─ LaTeX editor
└─ PDF preview
│
▼
Backend (Django + DRF)
├─ Formula data and generation
├─ Template / cheat sheet APIs
├─ Practice problem APIs
└─ PDF compilation endpoint
├── backend/ # Django REST API
│ ├── api/ # Models, serializers, views, tests, formula data
│ ├── cheat_sheet/ # Django settings
│ ├── manage.py
│ └── requirements.txt
├── frontend/ # React + Vite app
│ ├── public/
│ ├── src/
│ ├── Dockerfile
│ ├── package.json
│ └── package-lock.json
├── .github/workflows/ # CI workflows
├── docker-compose.yml
└── README.md
- Python 3.14
- Node.js 24+
- Tectonic
- Docker Desktop or compatible Docker engine for containerized development
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python manage.py migrate
python manage.py runserverBackend health check:
http://localhost:8000/api/health/
cd frontend
nvm use || true
npm install
npm run devFrontend app:
http://localhost:5173/
docker compose up --build- Public project page:
https://chicostate.github.io/cheat-sheet/ - Intended use: UI demonstration of the frontend without backend dependencies
The full application is intended to run locally or through container infrastructure because PDF generation and persistence require the backend API.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/health/ |
Service health check |
| POST | /api/register/ |
Register a user |
| POST | /api/token/ |
Obtain JWT access and refresh tokens |
| POST | /api/token/refresh/ |
Refresh a JWT access token |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/classes/ |
List classes, categories, and formulas |
| POST | /api/generate-sheet/ |
Generate LaTeX from selected content |
| POST | /api/compile/ |
Compile LaTeX into PDF |
| Method | Endpoint | Description |
|---|---|---|
| GET / POST | /api/templates/ |
List or create templates |
| GET / PUT / PATCH / DELETE | /api/templates/{id}/ |
Retrieve or modify a template |
| GET / POST | /api/cheatsheets/ |
List or create cheat sheets |
| GET / PUT / PATCH / DELETE | /api/cheatsheets/{id}/ |
Retrieve or modify a cheat sheet |
| GET / POST | /api/problems/ |
List or create practice problems |
| GET / PUT / PATCH / DELETE | /api/problems/{id}/ |
Retrieve or modify a practice problem |
- PRE-ALGEBRA: order of operations, fractions, ratios, properties, area and perimeter, solving equations
- ALGEBRA I: linear equations, inequalities, quadratics, polynomials, exponents, radicals, functions, and more
- ALGEBRA II: complex numbers, logarithms, exponentials, conics, sequences, matrices, binomial theorem
- GEOMETRY: angles, parallel lines, triangles, circles, polygons, coordinate geometry, transformations
- TRIGONOMETRY: right-triangle relationships, special angles, identities, laws of sines and cosines
- PRECALCULUS: functions, conics, exponentials, logarithms, polar and parametric topics, sequences
- CALCULUS I: limits, derivatives, derivative applications, integrals
- CALCULUS II: integration techniques, applications, sequences and series
- CALCULUS III: vectors, multivariable derivatives, multiple integrals, vector calculus
- UNIT CIRCLE: radians, degrees, and coordinate reference data
cd backend
ruff check .
safety check
pytest -vcd frontend
npx eslint src/
npm run builddocker compose buildGitHub Actions runs:
- backend linting and tests
- frontend dependency install and production build
- Docker image build verification
The frontend and CI are configured around Node.js 24.
- Add the view in
backend/api/views.py - Add or update serializers in
backend/api/serializers.py - Register the route in
backend/api/urls.py - Add tests in
backend/api/tests.py
Update the appropriate module under backend/api/formula_data/.
Contributions are welcome through issues and pull requests. For setup, workflow, and review expectations, see CONTRIBUTING.md.
If you find a vulnerability, follow the reporting guidance in SECURITY.md instead of opening a public issue.
No license file is currently included in this repository.
