A web application that helps groups find common free time by analyzing uploaded schedule screenshots using OCR and intelligent time-gap detection.
- π User Authentication - JWT-based login/signup system
- πΈ Schedule Upload - Drag-and-drop schedule image uploads
- π€ OCR Processing - Automatic schedule parsing from images
- π Free Time Detection - Find common free times across multiple schedules
- π₯ Group Management - Create groups with shareable invite codes
- π Copy to Clipboard - Easy sharing of common free times
- Backend: Flask, Python 3.12
- Database: Supabase (PostgreSQL)
- Authentication: JWT with bcrypt
- OCR: PyTorch, Pillow
- Frontend: JavaScript, HTML, CSS
- Python 3.12+
- Supabase account (free tier works)
- Git
git clone https://github.com/yourusername/MRUHacks.git
cd MRUHackspython -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r backend/requirements.txtCreate backend/.env file:
SUPABASE_URL=your_supabase_url_here
SUPABASE_KEY=your_supabase_anon_key_here
JWT_SECRET_KEY=your-super-secret-jwt-key-change-in-productionRun this SQL in your Supabase SQL Editor:
-- Create users table
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
email TEXT UNIQUE NOT NULL,
password_hash TEXT NOT NULL,
full_name TEXT,
created_at TIMESTAMPTZ DEFAULT NOW()
);
-- Create groups table
CREATE TABLE groups (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
name TEXT NOT NULL,
invite_code TEXT UNIQUE NOT NULL,
created_by UUID REFERENCES users(id),
created_at TIMESTAMPTZ DEFAULT NOW()
);
-- Create schedules table
CREATE TABLE schedules (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
group_id UUID REFERENCES groups(id) ON DELETE CASCADE,
user_name TEXT NOT NULL,
classes JSONB NOT NULL,
created_at TIMESTAMPTZ DEFAULT NOW()
);
-- Disable Row Level Security (for development)
ALTER TABLE users DISABLE ROW LEVEL SECURITY;
ALTER TABLE groups DISABLE ROW LEVEL SECURITY;
ALTER TABLE schedules DISABLE ROW LEVEL SECURITY;# From project root
gunicorn backend.app:app --bind 0.0.0.0:5001# From project root
cd frontend
python -m http.server 8080Open your browser to: http://localhost:8080/login/login.html
- Sign Up - Create an account at
/signup/signup.html - Login - Sign in at
/login/login.html - Create Group - Create a new group and get an invite code
- Upload Schedules - Drag-and-drop schedule screenshots
- View Free Times - See common free times once 2+ people have uploaded
MRUHacks/
βββ backend/
β βββ app.py # Flask API endpoints
β βββ auth.py # JWT authentication utilities
β βββ requirements.txt # Python dependencies
β βββ .env # Environment variables (not in git)
βββ frontend/
β βββ login/
β β βββ login.html # Login page
β βββ signup/
β β βββ signup.html # Registration page
β βββ scheduleInsert/
β βββ upload.html # Main app - upload & view free times
βββ find_times.py # OCR and schedule parsing
βββ find_free_times.py # Time gap detection algorithm
βββ README.md
POST /api/auth/register- Register new userPOST /api/auth/login- Login userGET /api/auth/me- Get current user (protected)
POST /api/groups- Create new groupPOST /api/groups/<code>/upload- Upload schedule imageGET /api/groups/<code>/free-times- Get common free times
- Push code to GitHub
- Create new Web Service on Render
- Configure:
- Build Command:
pip install -r backend/requirements.txt - Start Command:
gunicorn backend.app:app --bind 0.0.0.0:$PORT
- Build Command:
- Add environment variables (SUPABASE_URL, SUPABASE_KEY, JWT_SECRET_KEY)
- Deploy
Change API_BASE in all HTML files from:
const API_BASE = 'http://localhost:5001/api';To:
const API_BASE = 'https://your-app.onrender.com/api';Backend won't start:
- Check
.envfile exists and has correct Supabase credentials - Ensure virtual environment is activated
- Verify all dependencies installed:
pip install -r backend/requirements.txt
Database errors:
- Check Supabase credentials in
.env - Verify tables created in Supabase SQL Editor
- Ensure RLS is disabled (for development)
Frontend can't connect:
- Verify backend is running on port 5001
- Check CORS is enabled in Flask
- Ensure
API_BASEURL is correct
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - feel free to use this project for learning and personal projects.
Built at MRU Hacks 2025