UniSigma — Collaborative Problem-Solving Platform
Inspiration
We built UniSigma because getting stuck on a hard problem with no clear place to find help is frustrating. Good problems are everywhere—textbooks, competitions, handwritten notes—but they’re scattered, hard to search, and often in formats that are difficult to reuse.
UniSigma is a single place to upload, convert, and search math problems and solutions. You can submit problems as plain text, LaTeX, or images. Images and PDFs can be turned into LaTeX via OCR, so problems from paper or PDFs become clean, editable math. Everything lives in a structured, searchable store so you can find related problems by topic, tags, or semantic similarity and attach solutions so others can see different approaches.
What It Does
Multiple submission formats — Submit problems as plain text, LaTeX, or by uploading PNG/JPEG/WebP images. When LaTeX is missing, the system can generate it from text or from images using OCR (local Pix2Text or optional cloud OCR).
Similar-problem discovery — Each problem gets an embedding (from sentence-transformers when available, or a built-in fallback). The “Similar problems” view ranks by embedding similarity and tag overlap so you can find related questions quickly.
Source and attribution — Problems can be linked to sources (books, papers). The system keeps a single primary source per problem (e.g. oldest by default), and moderators can set a canonical source.
Community tagging — Users attach tags and sources to problems; suggested tag names are supported. Tags and sources are shared across the catalog.
Moderation — Moderators and admins can set moderation status (pending/approved/rejected) and choose the canonical source for a problem.
Solutions — Users can add solutions to problems with optional LaTeX and metadata, similar to a Q&A site. Filter by problem, browse solutions, and contribute answers.
Filtering and search — Filter problems by tag, source, and keyword; sort by creation time. Combined with similar-problem discovery, it’s easy to find what you need.
Accounts and reputation — Login, roles (user/moderator/admin), and per-author stats (e.g. questions posted) so contributions are attributed and moderators can manage content.
How We Built It
Frontend — React + Vite
- React with React Router for navigation and route-based rendering.
- TanStack Query for all backend data, caching, and mutations.
- Tailwind CSS and shadcn for layout and components.
- Motion for animations.
- Vitest for tests; ESLint for linting.
Backend — FastAPI + uv
- FastAPI for the API; uv for dependency and environment management.
- Pydantic for request/response validation and settings.
- SQLAlchemy as the ORM; SQLite for the database (simple to run anywhere; can be swapped for PostgreSQL via
DATABASE_URL). - Pix2Text for LaTeX OCR from images (local ONNX models or optional Breezedeus cloud).
- Sentence-transformers (optional) for problem embeddings; hash-based fallback when the ML model isn’t installed.
- Ruff for linting; pytest for backend tests.
Database
- SQLite by default for easy local and single-server deployment. Schema supports problems, solutions, tags, sources, accounts, and link tables with migrations handled in code.
Deployment
- Backend can serve the built frontend from a single process (e.g. API at
/api, SPA at/). Docker support is included for an all-in-one image.
Challenges We Ran Into
- LaTeX OCR: Integrating Pix2Text (local and cloud) meant dealing with ONNX model loading, tokenizer warnings, and different file layouts. We added config (e.g.
use_fast, non-merged decoder) so it runs cleanly. - Embeddings: We wanted similar-problem search to work even without heavy ML deps. We added a small hash-based embedding fallback so the feature always works, with optional sentence-transformers for better quality.
- Single-server deploy: Serving the SPA and API from one app required mounting the API under
/api, serving static assets andindex.html, and setting the frontend’sVITE_API_URLcorrectly at build time.
Accomplishments We’re Proud Of
- A coherent stack (React, FastAPI, SQLite) that’s easy to run locally and deploy with Docker or a single server.
- Flexible LaTeX input: plain text, manual LaTeX, or image/PDF OCR (local or cloud) with a single upload flow.
- Similar-problem discovery that combines embeddings and tag overlap and degrades gracefully without ML.
- Clear moderation and attribution: roles, moderation status, primary/canonical sources, and per-author stats.
- Structured data: problems, solutions, tags, and sources in one place with filtering and search.
What We Learned
- Frontend/backend split: Keeping a clear API contract and using TanStack Query made state and server data easy to manage.
- OCR in production: Pix2Text’s local vs cloud options and config (e.g. ONNX) required some tuning for stability and performance.
- Progressive enhancement: Optional embeddings and optional ML let the app stay usable and deployable even on minimal environments.
What’s Next for UniSigma
- Mobile — e.g. React Native or a PWA so users can browse and contribute from phones.
- Smarter recommendations — Use history and course context to suggest relevant problems.
- Richer LaTeX — Broader notation support and better handling of handwritten formulas.
- PostgreSQL option — Keep SQLite as default but document and support PostgreSQL for larger deployments.
Built With
- bun
- fastapi
- firebase
- javascript
- postgresql
- python
- render
- shadcn
- uv
Log in or sign up for Devpost to join the conversation.