Skip to content

About

πŸ“… Modern, mobile-first PWA to view and manage class timetables for any degree program at the University of β”‚ Milano-Bicocca (UNIMIB).

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

37 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“… UNIMIB Timetable & Campus Companion

A mobile-friendly Progressive Web App (PWA) for students at the University of Milano-Bicocca (UNIMIB). View lecture timetables, check real-time classroom occupancy, track exam sessions, search professors, export to calendar apps, and coordinate study groups.

License Python PWA Ready Vercel Deployed


✨ Features

  • πŸ“… Lecture Timetables: View weekly schedules for any degree programme and year of study. Highlight followed courses ("I Miei Corsi") and spot cancelled lectures automatically.
  • πŸ›οΈ Classroom Occupancy: Real-time room status across all campus buildings (U1–U28). See whether an aula is free or occupied and until what time.
  • πŸ§‘β€πŸ« Professor Schedules: Directory search across UNIMIB faculty with weekly lecture schedules, semester events, and institutional contact info.
  • πŸ“ Exam Calendar: Track upcoming exam appeals for your degree with session filters (Winter, Summer, Autumn) and individual calendar downloads.
  • πŸ‘₯ Study Groups & Shared Calendars: Create or join multiple study groups via code or link. View combined schedules, overlapping courses, and automatic common free slots to coordinate study sessions or lunch breaks.
  • πŸ“₯ Calendar Export & WebCal: Export schedules to iCalendar (.ics), CSV (Excel), or JSON. Subscribe via a live WebCal feed (webcal://) to automatically sync with Apple Calendar, Google Calendar, or Outlook.
  • πŸ‘€ Cloud Profile & Multi-Device Sync: Optional lightweight account (nickname + PIN) backed by Redis to keep your courses, exams, and group memberships in sync across devices.
  • πŸ“± Mobile-First PWA: Dark mode, swipe gestures, and offline support via Service Worker.

πŸ› οΈ Tech Stack

  • Frontend: Vanilla JavaScript (ES6+), CSS3 (Mobile-First responsive dark theme), PWA Service Worker.
  • Backend: Python serverless functions on Vercel (api/*.py, Python standard library only).
  • Storage: Upstash Redis (REST API) for user profiles and shared groups.
  • Scraper Source: Live queries to official UNIMIB EasyCourse endpoints (grid_call.php, combo.php, bookings_call.php).

πŸ“‚ Project Structure

.
β”œβ”€β”€ api/
β”‚   β”œβ”€β”€ calendar.py         # Weekly lecture schedule scraper
β”‚   β”œβ”€β”€ exams.py            # Exam appeals scraper
β”‚   β”œβ”€β”€ export.py           # .ics, .csv, .json, and WebCal export engine
β”‚   β”œβ”€β”€ group.py            # Study groups and membership management
β”‚   β”œβ”€β”€ options.py          # Degree and course options dropdown data
β”‚   β”œβ”€β”€ profile.py          # User profile sync and PIN authentication
β”‚   β”œβ”€β”€ rooms.py            # Real-time classroom occupancy scraper
β”‚   β”œβ”€β”€ shared_calendar.py  # Combined multi-student timetable generator
β”‚   └── teachers.py         # Faculty directory and professor timetables
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   └── style.css       # Responsive dark-theme styling
β”‚   β”œβ”€β”€ js/
β”‚   β”‚   β”œβ”€β”€ app.js          # SPA logic, state management, and export helpers
β”‚   β”‚   └── sw.js           # PWA Service Worker (offline asset cache)
β”‚   β”œβ”€β”€ icons/              # App icons (PWA)
β”‚   β”œβ”€β”€ index.html          # SPA entry point
β”‚   └── manifest.json       # Web App Manifest
β”œβ”€β”€ scratch/
β”‚   └── test_edge_cases.py  # Backend unit tests
β”œβ”€β”€ vercel.json             # Serverless routing and rewrites
└── README.md

πŸ”Œ API Endpoints

Method Endpoint Description
GET /api/options Academic years, departments, degree programmes, and study years
GET /api/calendar Weekly lectures for degree and study year (date=DD-MM-YYYY)
GET /api/rooms Classroom occupancy and day schedule for a building (sede=U01)
GET /api/exams Exam appeals filtered by course and session
GET /api/teachers Faculty directory search (?anno=YYYY) or teacher schedule (?docente=ID)
GET /api/export Calendar export in .ics, .csv, .json, or WebCal feed
GET /api/shared_calendar Merged weekly timetable for multiple student codes
GET, POST /api/group Group creation, join, leave, rename, and member listings
GET, POST, PUT /api/profile Profile creation, authentication, PIN recovery, and cloud sync

πŸš€ Getting Started

Local Development

Run the frontend and serverless API locally using the Vercel CLI:

# Install Vercel CLI if needed
npm i -g vercel

# Start local development server
vercel dev

The app will be available at http://localhost:3000.

Running Tests

Run the Python unit test suite:

python3 -m unittest scratch/test_edge_cases.py

Environment Variables

To enable cloud profiles and study group syncing, configure your Upstash Redis credentials in .env.local (or in Vercel Project Settings):

Variable Description
UPSTASH_REDIS_REST_URL Upstash Redis REST endpoint URL
UPSTASH_REDIS_REST_TOKEN Upstash Redis REST bearer token

πŸ“„ License

This project is open-source and available under the MIT License.

About

πŸ“… Modern, mobile-first PWA to view and manage class timetables for any degree program at the University of β”‚ Milano-Bicocca (UNIMIB).

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages