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.
- Multi-Class Selection: Choose from 10 different subjects including PRE-ALGEBRA, ALGEBRA I & II, GEOMETRY, TRIGONOMETRY, PRECALCULUS, CALCULUS I-III, and UNIT CIRCLE.
- Category Selection: Select categories with checkboxes for each class (no Ctrl/Cmd needed)
- Drag-and-Drop Reordering: Intuitively organize your cheat sheet by dragging individual formulas or entire collapsible class groups to reorder them before generating.
- Formula Generation: Automatically generates formatted LaTeX for selected formulas
- Live Preview: Split-pane interface with line-numbered LaTeX editor (45% width) and PDF preview (45% width)
- PDF Compilation: Compile to PDF using Tectonic LaTeX engine on the backend
- Download Options: Download as
.texsource or.pdf - Auto-Save: Progress automatically saved to browser localStorage - survives page refresh
- Version History: Navigate through last 3 compiled versions with back/forward buttons
- Column Layout: Single, two, or three column layouts with auto-scaling formulas that fit within column boundaries
- Margins: Adjustable page margins
- Font Size: Configurable font scaling (8pt - 12pt)
- Spacing: Adjustable spacing between formula sections
- Templates: Save and manage reusable LaTeX templates
- Cheat Sheets: Save and load your cheat sheet projects
- Practice Problems: Add practice problems to your sheets
| Layer | Technology |
|---|---|
| Frontend | React 18 + Vite |
| Backend | Django 6 + Django REST Framework |
| LaTeX Engine | Tectonic |
| Database | SQLite (dev) / MariaDB (prod) |
| Container | Docker Compose |
├── backend/ # Django REST API
│ ├── cheat_sheet/ # Django project settings
│ ├── api/ # Main API app
│ │ ├── views.py # API endpoints
│ │ ├── models.py # Database models
│ │ ├── latex_utils.py # LaTeX generation utilities
│ │ ├── urls.py # URL routing
│ │ ├── serializers.py # DRF serializers
│ │ ├── tests.py # Test suite
│ │ └── formula_data/ # Formula definitions
│ │ ├── pre_algebra.py
│ │ ├── algebra_i.py
│ │ ├── algebra_ii.py
│ │ └── geometry.py
│ └── requirements.txt
├── frontend/ # React + Vite
│ ├── src/
│ │ ├── App.jsx # Main app
│ │ ├── components/
│ │ │ └── CreateCheatSheet.jsx
│ │ ├── hooks/
│ │ │ ├── formulas.js # Formula selection logic
│ │ │ └── latex.js # LaTeX generation & compilation
│ │ └── App.css
│ └── package.json
├── docker-compose.yml
└── README.md
| Method | Endpoint | Description |
|---|---|---|
| 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 |
| Method | Endpoint | Description |
|---|---|---|
| GET/POST | /api/templates/ |
List/create templates |
| GET/PUT/PATCH/DELETE | /api/templates/{id}/ |
Retrieve/update/delete template |
| GET/POST | /api/cheatsheets/ |
List/create cheat sheets |
| GET/PUT/PATCH/DELETE | /api/cheatsheets/{id}/ |
Retrieve/update/delete cheat sheet |
| GET/POST | /api/problems/ |
List/create practice problems |
| GET/PUT/PATCH/DELETE | /api/problems/{id}/ |
Retrieve/update/delete problem |
- 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
- TRIGONOMETRY - Right Triangle Trigonometry, Special Angles, Trigonometric Identities, Laws of Sines and Cosines
- PRECALCULUS - Functions and Graphs, Polynomial and Rational Functions, Exponential and Logarithmic Functions, Conic Sections, Parametric Equations and Polar Coordinates, Sequences and Series
- CALCULUS I - Limits and Continuity, Derivatives, Applications of Derivatives, Integrals
- CALCULUS II - Techniques of Integration, Applications of Integration, Sequences and Series
- CALCULUS III - Vectors and Geometry of Space, Vector Functions, Partial Derivatives, Multiple Integrals, Vector Calculus
- UNIT CIRCLE - Complete visual representation of the unit circle with radians, degrees, and coordinates
- 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.
cd backend
pytest # Run all tests
pytest -v # Run with verbose output
pytest -k "test_name" # Run tests matching pattern
pytest api/tests.py # Run specific test filecd frontend
npx eslint src/ # Lint source files
npx eslint --fix src/ # Auto-fix lint issues
npm run build # Production build verificationThe 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 (e.g., CALCULUS I, UNIT CIRCLE, ALGEBRA II)
- Select Categories: Check the categories you want
- Reorder: Drag and drop formulas or entire categories to set their final order
- 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
- Customize: Edit the LaTeX directly or adjust formatting options
- Download: Download as
.texor.pdf - Save: Click "Save Progress" to store your cheat sheet to the database
- Add view function in
backend/api/views.py - Add serializer in
backend/api/serializers.pyif needed - Add URL route in
backend/api/urls.py - Write tests in
backend/api/tests.py
Add formulas to the appropriate file in backend/api/formula_data/:
pre_algebra.pyalgebra_i.pyalgebra_ii.pygeometry.pytrig.pyprecalculus.pycalculus_i.pycalculus_ii.pycalculus_iii.pyunit_circle.py