Project Info
Inspiration
Coming to Berkeley, we struggled with manually managing our time. Even with tools like Google Calendar it was tedious to add every single lecture, homework, exam, to our calendars. Upon further research we found that in workplaces an average of 4.7 meetings per week are canceled/rescheduled. In order to solve this problem and save time we created Cal Squared. Features Cal Squared can import all events from a course in one chat, add events from gmail in your calendar autonomously, and help guide you through managing your time every step of the day. We used Python for the backend and API calls to LLMs like GPT 4o mini. We designed our frontend through React, Javascript, and CSS. Challenges We struggled with inexperience with technologies for the frontend and also with scraping data for the course and menu information.
Course Calendar Agent
Python agent that ingests course schedules, syncs them to Google Calendar, and now scans Gmail for new events using a LavaPayments-backed LLM.
Quickstart
- Install dependencies
python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt - Create OAuth credentials
- In the Google Cloud Console, create desktop-app OAuth credentials.
- Save the JSON as
credentials.jsonin the repo root.
- Run the CSV agent
python -m agentic_calendar.cli --calendar CalendarID- By default the CLI ingests
schedule.csv; override with--csv /path/to/file.csv. - If the CSV omits a year (e.g.,
Oct 05), add--csv-year 2025so dates are interpreted correctly. - Use
--default-start HH:MMand--duration minutesfor files without explicit times. - Add
--console-oauthto use the copy/paste OAuth flow.
- By default the CLI ingests
- Use
--replace-eventsto delete matching events before inserting new ones.
Web UI + API server
The React dashboard (src/App.js) now talks to a FastAPI backend that wraps the calendar agent, the scraper, and the Gmail ingest loop.
-
Start the API
# Same virtualenv as above export GOOGLE_CALENDAR_ID="primary" # or a specific calendar id export CALENDAR_AGENT_DRY_RUN=false # set true to preview without writing export ENABLE_GMAIL_POLLING=true # polls Gmail every 5 minutes export LAVAPAY_FORWARD_TOKEN='{"token":"..."}' uvicorn backend.server:app --reloadUseful overrides:
SCHEDULE_CSV– path to the working CSV (defaults toschedule.csv).CALENDAR_TIMEZONE,DEFAULT_START_TIME,DEFAULT_DURATION_MINUTES,SCHEDULE_FALLBACK_YEAR– parser hints.FRONTEND_ORIGINS– comma-separated list of allowed browser origins (defaulthttp://localhost:3000).COURSE_IMPORT_REPLACE=true– delete+recreate matching events during course imports.GMAIL_*variables mirror the CLI flags (GMAIL_QUERY,GMAIL_TOKEN, etc.).
-
Run the frontend
npm install npm startSet
REACT_APP_API_BASE_URLif the backend is not onhttp://localhost:8000.
Using the chat box
- Natural-language requests (“add a study session tomorrow at 6pm”, “move HW4 to Friday”) are forwarded to the LLM agent that previously lived in the CLI.
- Pasting a course/syllabus URL and mentioning “course”, “syllabus”, etc. triggers the scraper, rewrites
schedule.csv, reloads the events, and (when not in dry-run mode) pushes them to Google Calendar. - Gmail ingestion runs automatically every five minutes whenever
ENABLE_GMAIL_POLLING=trueandCALENDAR_AGENT_DRY_RUN=false; the background task feeds new email-derived events into the same agent memory so you can reference them in chat.
Gmail ingestion
The agentic_calendar.gmail_ingest_cli entry point authorizes Gmail (read-only) and Calendar (write) and sends each unread email to the LLM so commitments (deadlines, hackathon schedules, etc.) are added automatically.
python -m agentic_calendar.gmail_ingest_cli \
--calendar primary \
--gmail-credentials credentials.json \
--gmail-token gmail_token.json \
--query "label:unread newer_than:1d" \
--forward-token "$LAVAPAY_FORWARD_TOKEN" \
--apply
Workflow:
- Gmail OAuth tokens are stored separately (
gmail_token.json) so you can grant read-only mail access alongside Calendar writes. - The CLI searches Gmail with the provided query (default
label:unread newer_than:1d), skips messages already logged in.gmail_processed.json, and feeds new ones into the extractor. - Preview results without
--applyor add the flag to create the events immediately.
Environment variables:
LAVAPAY_FORWARD_TOKEN/LAVA_FORWARD_TOKEN– LavaPayments forward token (or pass via--forward-token).LAVAPAY_BASE_URL,LAVAPAY_TARGET_URL,LAVAPAY_PROVIDER,LAVAPAY_MODEL– optional overrides for the Lava gateway/provider.
CSV format
Two layouts are supported:
- Normalized headers –
title,date,start_time,end_time,category,location,description. These map directly to event fields. - Scraper feed (default) –
Date,Type,Descriptionas produced byschedule.csv. Titles/descriptions are inferred, type maps to categories, and missing times fall back to per-category defaults.
Date is required. Optional columns include duration, location, and explicit titles. When dates omit a year, provide --csv-year so parsing succeeds.
Analysis
View
Metric
- 8
- 7
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- FastAPIIn code
- HTMLIn code
- JavaScriptIn code
- PythonIn code
- ReactIn code
- Tailwind CSSIn code
7 of 7 appear in the indexed code.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
263 KB
Source files
31
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
aryanj2374/Calhacks12.0
44 files · 2.2 MB · @ 3544e3c
Structure
Application logic
31 files · 70%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Python86%
- JavaScript8%
- CSS5%
- Markdown2%
- HTML1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
requirements.txt
pypi · 12- fastapi
- google-api-python-client
- google-auth
- google-auth-httplib2
- google-auth-oauthlib
- pydantic
- python-dateutil
- requests
- rich
- selenium
- uvicorn
- webdriver-manager
package.json
npm · 11- @testing-library/dom
- @testing-library/jest-dom
- @testing-library/react
- @testing-library/user-event
- react
- react-dom
- react-scripts
- web-vitals
- +3 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.