Skip to content

vanshjain99/QuickCal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

40 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

QuickCal: Schedule to Calendar AI Utility

QuickCal is a modern, privacy-focused, and ultra-lean web utility that instantly converts weekly timetables, class schedules, or appointment sheets into recurring events in your Google Calendar.

Simply upload a screenshot, image, PDF, or Excel spreadsheet of your schedule, verify the extracted details, and sync them directly to your Google Calendar.


🎬 Demo Video

2.Recording.at.2026-07-13.20.55.11-Edited-1.5x.mp4

πŸš€ Key Features

  • AI-Powered Layout Analysis: Uses Google's Gemini 3.1 Flash-Lite (gemini-3.1-flash-lite) via the google-genai SDK to automatically perform 2D grid document alignment and layout analysis. It detects weekdays, time slots, course/event titles, and room locations.
  • Multi-Format Support: Instantly uploads and parses PNG, JPG, JPEG, PDF documents, or Excel (.xls, .xlsx) spreadsheets.
  • Adaptive Theme Engine: Built-in theme toggle with localStorage caching to eliminate flashing. The site defaults to Dark Mode on desktop screens (>=768px) and Light Mode on mobile screens to align with platform design aesthetics.
  • Interactive Review Workspace: A sleek responsive workspace that allows you to inspect, modify, add, or delete extracted schedule events (times, days, titles, locations, and recurrence list) in real-time before syncing.
  • One-Click Google Calendar Sync: Integrates with the Google Calendar API client-side (using Google Identity Services OAuth 2.0 flow) to automatically schedule recurring weekly events on your primary calendar.
  • Support Contact Pipeline: Integrated contact form submitting queries directly to a FormSubmit AJAX endpoint from the client's browser (requiring no backend email setup or credentials).
  • SEO & Discoverability: Automatic compilation of dynamic XML sitemaps (sitemap-index.xml, sitemap-0.xml) and dynamic robots.txt configuration for search engine crawlers.
  • Privacy First: Processed through secure ephemeral pipelines. We do not store your uploaded documents, schedule data, or Google OAuth credentials.

πŸ› οΈ Technology Stack

Frontend

  • Framework: Astro 7.0 (Static Site Generation / SSG)
  • Styling: Tailwind CSS v4 (integrated via @tailwindcss/vite plugin)
  • Authentication: Google Identity Services (GIS) OAuth 2.0 & Google Calendar API Client
  • Deployment: Cloudflare Pages (managed via Wrangler CLI)

Backend


πŸ“ Repository Structure

QuickCal/
β”œβ”€β”€ backend/                   # FastAPI backend application
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”‚   β”œβ”€β”€ extract.py     # Gemini OCR extraction endpoint for documents/spreadsheets
β”‚   β”‚   β”‚   └── sync.py        # Receives events and pushes them to Google Calendar API
β”‚   β”‚   β”œβ”€β”€ schemas.py         # Pydantic validation models (TimetableEvent, DayOfWeek)
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”‚   └── calendar.py    # Google Calendar event formatting and recurrence rules
β”‚   β”‚   └── main.py            # FastAPI entry point, middleware, & CORS setup
β”‚   β”œβ”€β”€ .env.example           # Example backend environment variables
β”‚   β”œβ”€β”€ Dockerfile             # Multi-stage Docker config with dynamic PORT binding
β”‚   β”œβ”€β”€ requirements.txt       # Python backend dependencies
β”‚   β”œβ”€β”€ sample_timetable.xlsx  # Sample schedule spreadsheet for testing
β”‚   └── test_extract.py        # Local command-line parsing testing utility
β”œβ”€β”€ frontend/                  # Astro frontend web client
β”‚   β”œβ”€β”€ public/                # Static assets (favicons, manifests, etc.)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ UploadZone.astro # Drag-and-drop file uploader & fetch client
β”‚   β”‚   β”‚   └── Welcome.astro  # Welcome component
β”‚   β”‚   β”œβ”€β”€ layouts/
β”‚   β”‚   β”‚   └── Layout.astro   # Core HTML skeleton, SEO metadata, theme control
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   β”œβ”€β”€ 404.astro      # Error 404 page
β”‚   β”‚   β”‚   β”œβ”€β”€ 500.astro      # Error 500 page
β”‚   β”‚   β”‚   β”œβ”€β”€ about.astro    # About info page
β”‚   β”‚   β”‚   β”œβ”€β”€ contact.astro  # Support contact page
β”‚   β”‚   β”‚   β”œβ”€β”€ faq.astro      # Interactive FAQ accordion page
β”‚   β”‚   β”‚   β”œβ”€β”€ index.astro    # Main dashboard application and grid workspace
β”‚   β”‚   β”‚   β”œβ”€β”€ privacy.astro  # Privacy policy
β”‚   β”‚   β”‚   β”œβ”€β”€ terms.astro    # Terms & conditions page
β”‚   β”‚   β”‚   └── robots.txt.ts  # Dynamic robots.txt metadata generator
β”‚   β”‚   └── styles/
β”‚   β”‚       └── global.css     # CSS variable bindings & Tailwind imports
β”‚   β”œβ”€β”€ astro.config.mjs       # Astro configuration (Vite, Tailwind v4, & Sitemap)
β”‚   └── package.json           # Node scripts and dependencies
└── README.md                  # Root documentation (this file)

βš™οΈ Environment Configuration

To run both services, create the respective .env files in backend/ and frontend/ directories:

Backend .env (backend/.env)

# Gemini API Key (from Google AI Studio)
GEMINI_API_KEY=your_gemini_api_key_here

# Server Binding
HOST=127.0.0.1
PORT=8000
```,StartLine:102,TargetContent:

### Frontend `.env` (`frontend/.env`)
```env
# Google Identity Services Configuration (OAuth 2.0 Client ID)
PUBLIC_GOOGLE_CLIENT_ID=your_oauth_client_id.apps.googleusercontent.com

# Backend API Endpoint URL
PUBLIC_API_URL=http://127.0.0.1:8000

πŸš€ Getting Started

1. Backend Setup & Run

  1. Navigate to the backend directory:

    cd backend
  2. Set up a Python virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install required Python packages:

    pip install -r requirements.txt
  4. Create and configure your local environment file:

    cp .env.example .env
    # Open .env and add your GEMINI_API_KEY and other parameters
  5. Run the FastAPI development server:

    uvicorn app.main:app --reload

    The backend API will run locally at http://127.0.0.1:8000 with Swagger docs available at http://127.0.0.1:8000/docs.


2. Frontend Setup & Run

  1. Open a new terminal window and navigate to the frontend directory:

    cd frontend
  2. Install Node modules:

    npm install
  3. Configure your local .env file as specified in the Environment Configuration section.

  4. Start the frontend local development server:

    npm run dev

    Open http://localhost:4321 in your browser to access the QuickCal dashboard.


⚑ CLI Commands reference

Frontend (frontend/)

Command Action
npm run dev Runs the Astro development server
npm run build Compiles the production-ready static assets to ./dist/
npm run preview Runs a local web server to preview the built ./dist/ files
npm run deploy Compiles assets and deploys directly to Cloudflare Pages

Backend (backend/)

Command Action
uvicorn app.main:app --reload Starts the local API server with hot reloading
python test_extract.py Command-line utility to test schedule extraction

🐳 Deployment & Containerization

Dockerizing the Backend

The backend includes a Dockerfile optimized for container platforms (Render, Koyeb, AWS, etc.).

  1. Build the Docker Image:

    docker build -t quickcal-backend ./backend
  2. Run the Container locally:

    docker run -p 8000:8000 --env-file ./backend/.env quickcal-backend

    (Ensure to pass your GEMINI_API_KEY either via the env file or directly using -e GEMINI_API_KEY=key).

Deploying the Frontend (Cloudflare Pages)

To deploy the Astro frontend static build to Cloudflare Pages, use the built-in Wrangler deploy task:

cd frontend
npm run deploy

This builds your static distribution bundle inside dist/ (which pre-minifies bundles, structures pages, and writes sitemaps) and uploads it directly to your registered Cloudflare project.


πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

OCR-to-ICS pipeline leveraging Gemini 3.1 Flash-Lite for spatial schedule grid parsing. Frontend built with Astro 7.0 & Tailwind CSS v4 (Cloudflare Pages); backend powered by FastAPI, Pandas, and Google Identity Services for client-side calendar sync.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors