A full-stack web application for generating LaTeX-based cheat sheets. Users select math classes and formula categories, then view the generated LaTeX code alongside a live PDF preview.
- Class Selection: Choose from PRE-ALGEBRA, ALGEBRA I, ALGEBRA II, and GEOMETRY
- Category Selection: Select categories with checkboxes (no Ctrl/Cmd needed)
- Live Preview: Split-view interface with LaTeX code and PDF preview
- Auto-compile: PDF generates automatically when you generate a cheat sheet
- PDF Export: Compile to PDF using Tectonic LaTeX engine on the backend
- Download Options: Download as .tex source or .pdf
- Fix bugs:
- Dark mode (complete variable coverage, remove hardcoded colors)
- Compile button not working after changes
- Implement or migrate database (currently MariaDB; consider migration if needed)
- Increase formatting options (columns, margins, text sizing, etc.)
These features are not yet implemented
- Formatting Options:
- Column layout (single, two, three columns)
- Text sizes (font scaling)
- Margin adjustments
- Image Insertion:
- Allow users to insert images, store them in the database
- Embed images in PDF and keep code reference in exported .tex
- User Accounts: Register and log in with username and password
- Database Storage: Save and manage cheat sheets in database
- Autosave & Version History: Every compile is saved automatically; revert to any previous version
- Custom LaTeX Syntax Shortcuts: Allow users to use shortcuts for custom LaTeX commands
| Layer | Technology |
|---|---|
| Frontend | React 18 + Vite + npm |
| Backend | Django 6 + Django REST Framework |
| LaTeX Engine | Tectonic |
| Database | SQLite (dev) / MariaDB (prod) |
| Container | Docker Compose |
- django>=6.0
- djangorestframework>=3.15
- django-cors-headers>=4.4
- python-dotenv>=1.0
- dj-database-url>=2.1
- pymysql>=1.1
- pytest>=8.0
- pytest-django>=4.8
- ruff>=0.4.0 (linting)
- safety>=2.0 (security)
- react, react-dom
- vite
├── backend/ # Django REST API
│ ├── cheat_sheet/ # Django project settings
│ ├── api/ # API app
│ │ ├── views.py # API endpoints
│ │ ├── models.py # Database models
│ │ ├── formula_data/ # Hardcoded formula data
│ │ │ ├── pre_algebra.py
│ │ │ ├── algebra_i.py
│ │ │ ├── algebra_ii.py
│ │ │ └── geometry.py
│ ├── requirements.txt # Python dependencies
│ ├── Dockerfile # Backend container
│ └── manage.py
├── frontend/ # React + Vite
│ ├── src/
│ │ ├── App.jsx # Main app component
│ │ ├── components/
│ │ │ └── CreateCheatSheet.jsx # Main UI
│ │ └── App.css
│ ├── package.json
│ ├── vite.config.js
│ └── Dockerfile
├── docker-compose.yml # Container orchestration
└── README.md
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/health/ |
Health check |
| GET | /api/classes/ |
List available classes with categories and formulas |
| POST | /api/generate-sheet/ |
Generate LaTeX for selected formulas |
| POST | /api/compile/ |
Compile LaTeX to PDF |
- PRE-ALGEBRA - Order of Operations, Fractions, Ratios, Properties, Area/Perimeter, Solving Equations
- ALGEBRA I - Linear Equations, Inequalities, Integer Rules, Decimals/Percents, Mean/Median/Mode, Quadratics, Polynomials, Exponents, Radicals, Functions, Absolute Value, Rational Expressions
- ALGEBRA II - Complex Numbers, Logarithms, Exponential Functions, Polynomial Theorems, Conic Sections, Sequences/Series, Matrices, Binomial Theorem
- GEOMETRY - Angle Relationships, Parallel Lines, Triangles, Pythagorean Theorem, Similar/Congruent Triangles, Quadrilaterals, Polygons, Circles, Circle Theorems, Coordinate Geometry, Surface Area/Volume, Transformations
- Python 3.13+
- Node.js 20+
- Tectonic (for PDF compilation)
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
python manage.py migrate
python manage.py runserverThe API will be available at http://localhost:8000/api/.
cd frontend
npm install
npm run devThe frontend will be available at http://localhost:5173/.
docker compose up --buildThis builds and starts the Django backend, React frontend, and MariaDB database.
The app will be available at http://localhost:5173/. API requests are proxied to the Django backend.
cd backend
pytest -v # Run with verbose output
pytest -k "test_name" # Run tests matching patterncd frontend
npx eslint src/ # Lint source files
npx eslint --fix src/ # Auto-fix lint issuesThe project includes GitHub Actions CI that runs:
- Backend: Ruff linting, Safety security scan, pytest
- Frontend: ESLint, build verification
- Docker: Image build verification
- Enter Title: Give your cheat sheet a name
- Select Class: Click on a class (PRE-ALGEBRA, ALGEBRA I, ALGEBRA II, GEOMETRY)
- Select Categories: Check the categories you want (no Ctrl/Cmd needed)
- Generate: Click "Generate Cheat Sheet" - LaTeX generates and PDF compiles automatically
- Preview: View the PDF in the preview pane, or click the circular button to recompile
- Download: Download as .tex or .pdf