Skip to content

Latest commit

 

History

History
1029 lines (738 loc) · 35.8 KB

File metadata and controls

1029 lines (738 loc) · 35.8 KB

Technical Documentation

Introduction

Summit is a full-stack job application tracker designed for students and job seekers. It streamlines the job-hunting process by intelligently integrating with your Gmail inbox to fetch, parse, and organize job-related emails, while also providing job discovery and status tracking in a single dashboard.

1.1 Purpose

The goal of this application is to streamline the job application process for job seekers by automatically organizing and tracking job-related emails. With the increasing volume of applications required to secure interviews, manually managing emails, deadlines, and interview schedules has become overwhelming. This tool aims to reduce stress, improve organization, and help candidates make more informed decisions during and after each application cycle.

1.2 Scope

This full-stack application connects to the user's inbox to:

  • Retrieve job-related emails.
  • Automatically parse and extract key details such as company names, job titles, application statuses, deadlines, and interview invitations.
  • Display this information in a centralized, user-friendly dashboard for real-time tracking.
  • Provide statistics and insights across application cycles to help users improve their job search strategies.

It eliminates the need for messy spreadsheets and lost emails, and helps users stay ahead of their interview schedules and online assessments (OAs).

1.3 Audience

This application is designed for all job seekers—from college students applying for internships to professionals navigating competitive job markets. It is especially helpful for individuals managing large volumes of applications, seeking better visibility, organization, and performance insights throughout their application cycles.

System Overview

2.1 Architecture

The application follows a modern full-stack architecture with frontend and backend. The frontend is built using React with Vite, while the backend uses Django Rest Framework (DRF) to provide API services. The two communicate via RESTful APIs, with Supabase managing authentication and PostgreSQL data storage. AI services are integrated via the OpenAI API, and additional productivity features are enabled through Gmail and Google Calendar APIs. The entire stack is deployed on Render for ease of deployment and scalability.

2.2 Technologies Used

Frontend

  • React.js – Component-based UI library for building dynamic interfaces.
  • TypeScript – Strongly-typed JavaScript for maintainable codebases.
  • Vite – Fast and optimized development build tool.
  • TailwindCSS – Utility-first CSS framework for flexible and responsive designs.

Backend

  • Django Rest Framework (DRF) – Secure, scalable backend with serialized API endpoints.
  • Gmail API – Extracts job-related content from user emails.
  • OpenAI API – Extracts meaningful data from email content using LLMs.
  • Google Calendar API – Syncs important job-related dates with user calendars.

Deployment & Database

  • Render – Hosts both backend and frontend services with continuous deployment.
  • Supabase – Manages authentication and provides a PostgreSQL database.

Testing

  • Jest – Unit testing for frontend components and logic.
  • Cypress – End-to-end testing for UI interactions and flows.
  • Django Test Suite – Validates backend endpoints, models, and business logic.

2.3 Dependencies

  • React, React Router, Vite, TailwindCSS, TypeScript
  • Django, djangorestframework, psycopg2, gunicorn
  • Supabase client SDKs
  • OpenAI Python SDK
  • Google API Client for Python (Gmail, Calendar)
  • Jest, Cypress, Django test framework

Installation Guide

3.1 Prerequisites

Before getting started, ensure you have the following tools installed on your machine:

  • Git – For cloning the repository
  • Docker & Docker Compose – For containerized deployment
  • Node.js (v18+) – Required for frontend development (if not using Docker)
  • PNPM – Package manager for the frontend
  • Python (3.11 recommended) – Required for backend development (if not using Docker)
  • Redis – For Celery background task processing
  • PostgreSQL – If not using Supabase or for local DB inspection

3.2 System Requirements

Minimum requirements for running the app:

  • OS: macOS, Linux, or Windows with WSL
  • Disk:
  • Docker:
  • Python: v3.11+
  • Node.js: v18+

3.3 Installation Steps

3.3.1. Clone the Repository

git clone https://github.com/cs421sp25-homework/team-02.git
cd team-02

3.3.2. Set Up Environment Variables

Copy .env.example to create your own environment files:

cp frontend/.env.example frontend/.env
cp backend/.env.example backend/.env

Update all <YOUR_*> fields with actual credentials (API keys, secrets, etc.).

3.3.3.1. Running the App with Docker

Make sure Docker and Docker Compose are installed.

docker compose up --build

To apply local changes:

docker compose down
docker compose up --build

3.3.3.2. Running Without Docker

Frontend
cd frontend
pnpm install --frozen-lockfile
pnpm dev
Backend
cd backend
python -m venv venv
source venv/bin/activate # macOS
# or venv\Scripts\activate on Windows
pip install -r requirements.txt

python manage.py makemigrations
python manage.py migrate
python manage.py runserver

Start background services:

  • Celery (for async task queueing):
celery -A backend worker --loglevel=info
  • Redis:
brew install redis   # installing on macOS
redis-server

Configuration Guide

4.1 Configuration Parameters

The application relies on multiple environment variables and service configurations. Below is a breakdown of key configuration parameters used across the system:

Backend (backend/.env)

  • DJANGO_SECRET_KEY – Secret key for Django security
  • DJANGO_DEBUG – Enables or disables Django debug mode
  • DJANGO_ALLOWED_HOSTS – Comma-separated list of allowed hostnames
  • DATABASE_URL – PostgreSQL database URL for local or Supabase database
  • SUPABASE_URL – Supabase project URL
  • SUPABASE_KEY – Supabase service key for backend operations
  • SUPABASE_JWT_SECRET – JWT secret for decoding Supabase-authenticated tokens
  • GOOGLE_CLIENT_ID – OAuth2 client ID used for Gmail/Calendar API access
  • GOOGLE_CLIENT_SECRET – OAuth2 client secret for Gmail/Calendar integration
  • OPENAI_API_KEY – API key to access OpenAI's GPT and embedding models
  • CELERY_BROKER_URL – Redis URL used by Celery to queue background jobs
  • CELERY_RESULT_BACKEND – Redis backend used by Celery to store task results

Frontend (frontend/.env)

  • VITE_SUPABASE_URL – Supabase project URL for client-side usage
  • VITE_SUPABASE_KEY – Public anon key or service key for accessing Supabase client-side
  • VITE_API_URL – Base URL for accessing the backend API endpoints
  • VITE_SUPABASE_SERVICE_ROLE_KEY – Service role key for elevated Supabase access (if needed client-side)
  • VITE_TEST_PASS – A custom field used for testing or feature toggles
  • VITE_CALLBACK_URL – OAuth redirect URI after successful Google login

4.2 Environment Setup

To properly set up your environment:

  1. Copy the provided example files:
cp frontend/.env.example frontend/.env
cp backend/.env.example backend/.env
  1. Populate the .env files with the appropriate credentials and keys.

  2. Ensure services like Redis and Supabase are reachable from your local environment.

  3. For email parsing and calendar updates, ensure the Google credentials are set up and authorized.

4.3 External Services Integration

This project integrates with several third-party services:

Supabase

  • Auth: Handles secure user authentication via OAuth2 (Google).
  • Database: Stores user job applications, job lists, and others.

OpenAI

  • Embeddings: Used for semantic search on job-related, application-related data.
  • LLM: Parses email content and classifies whether or not if it is job related.

Google APIs

  • Gmail API: Fetches job-related emails using the user's Gmail account.
  • Google Calendar API: Syncs deadlines and interview dates with the user's calendar.

Redis & Celery

  • Redis is used as a broker for background task processing.
  • Celery handles async tasks like email parsing and watcher renewal.

Ensure API keys, tokens, and OAuth credentials are properly configured in both .env files before deploying or running the application locally.

Usage Guide

5.1 User Interface Overview

The application opens to a streamlined dashboard that keeps every part of your job search in one place.

  • Application Tracker – A sortable table listing Job Title, Company, Status, and Deadline so you can see whole process.
  • Insights Section – Real‑time stats (e.g., applications sent, interview rate, offers) to help you measure progress at a glance.
  • Calendar Integration – Integration with google calendar so you can check upcoming‑events list showing online assessments (OAs), interviews, etc.
  • Job Discovery Page – A dedicated tab that lets you search, filter, and sort through many of scraped job listings.
  • Chatbot Widget – A floating chat bubble in the lower‑right corner that opens an AI assistant ready to answer job‑search questions.

5.2 User Authentication

To start using the app:

  1. Sign Up / Log In – Click "Continue with Google."
  2. Grant Permissions – Approve the OAuth scopes for Gmail (read‑only) and Google Calendar.

5.3 Core Functionality

  • Email Parsing – A background job watches Gmail to detect job‑related messages (applications, OAs, interviews, rejections, others).
  • Data Extraction – The parser captures Company, Position, Status, and Relevant Dates and stores them in the tracker.
  • Application View – Filter, sort, search, and—if something slipped through—edit any field manually.
  • Job Discovery – On the Job Discovery tab, enter keywords, apply filters (location, salary, job type, remote/on‑site), and sort by relevance, date posted, or company name. Results update instantly; click any listing to see details and an external apply link.
  • Notifications – Enable push/email alerts for approaching job-related events.

5.4 Advanced Features

  • Stats & Insights – Charts that reveal offer rates, recruiter response times, and application volume by industry or role.
  • Cycle Comparison – Break your search into "cycles" (e.g., Fall 2024, Spring 2025) and compare performance.
  • Conversational Chatbot – An AI assistant that understands the structured data in your tracker and the job‑listing database.

5.5 Troubleshooting

  • Email Not Syncing

    • Open Profiles and enable the email parsing.
  • Calendar events missing.

    • Open Profiles and enable the calendar for event creation.
  • Dashboard Not Updating

    • Clear your browser cache and refresh the page

API Documentation

6.1 Endpoints

The API provides endpoints for:

  • Token Management

    • /api/save-token/: Saves OAuth tokens and sets up Gmail and Calendar integration.
  • Email Processing

    • /api/fetch-emails/: Triggers background email parsing.
    • /gmail/notification/: Handles Gmail push notifications.
  • Google Calendar

    • /api/calendars/: Lists user calendars.
    • /api/events/: Fetches events.
    • /api/events/create/: Creates a new event.
    • /api/events/<event_id>/: Updates an event.
    • /api/events/<event_id>/delete/: Deletes an event.
  • Chatbot

    • /api/chatbot_view/: Handles user queries via LLM, supports streaming.

6.2 Request and Response Formats

  • All endpoints use standard JSON for requests and responses.
  • Requests must include the necessary fields (e.g., event details, query text).
  • Chatbot responses may be streamed (SSE) or full JSON.

6.3 Authentication and Authorization

  • All endpoints require Supabase-authenticated sessions.
  • The backend uses Django's IsAuthenticated to validate requests.
  • Each user is linked to a UserProfile storing Google and Supabase credentials.
  • OAuth tokens are stored securely and used for Gmail and Calendar API access.

Database Schema

7.1 Entity-Relationship Diagram

ER Diagram

7.2 Table Definitions

api_userprofile

Stores user-specific integration details for Google APIs and assistant associations.

  • id: bigint – Primary key, auto-generated.
  • google_provider_token: text – Google access token (nullable).
  • google_refresh_token: text – Google refresh token (nullable).
  • supabase_uid: varchar(255) – Supabase authentication ID (nullable).
  • gmail_history_id: varchar(255) – Gmail sync point (nullable).
  • gmail_watch_expiration: bigint – Gmail watch expiration timestamp (nullable).
  • user_id: integer – Foreign key to auth_user(id), unique per user.
  • assistant_id: varchar(100) – Assistant reference (nullable).

applications

Tracks job applications and their statuses for users.

  • id: bigint – Primary key, auto-generated.
  • company_name: varchar – Company name.
  • job_name: varchar – Job title.
  • job_id: varchar – External/internal job reference.
  • application_status: varchar – Status (default: '').
  • deadline: date – Application deadline.
  • created_at: timestamptz – Record creation time (default: now()).
  • updated_at: timestamptz – Last updated timestamp (default: now()).
  • user_id: uuid – Foreign key to auth.users(id).
  • additional_info: varchar – Extra notes.
  • sender_name: varchar – Sender name (nullable).
  • sender_email: varchar – Sender email (nullable).
  • cycle: bigint – Foreign key to cycles(id) (nullable).
  • event_id: text – Optional event reference.

auth_group

Stores permission groups.

  • id: integer – Primary key.
  • name: varchar(150) – Unique group name.

auth_group_permissions

Associates permissions with groups.

  • id: bigint – Primary key.
  • group_id: integer – FK to auth_group(id).
  • permission_id: integer – FK to auth_permission(id).

auth_permission

Defines specific system permissions.

  • id: integer – Primary key.
  • name: varchar(255) – Permission name.
  • content_type_id: integer – FK to django_content_type(id).
  • codename: varchar(100) – Unique codename.

auth_user

Stores authentication and profile data.

  • id: integer – Primary key.
  • password: varchar(128) – Encrypted password.
  • last_login: timestamptz – Last login time.
  • is_superuser: boolean – Admin flag.
  • username: varchar(150) – Unique username.
  • first_name, last_name, email: User personal details.
  • is_staff, is_active: Flags for UI and login.
  • date_joined: timestamptz – When the user joined.

auth_user_groups

Links users to groups.

  • id: bigint – Primary key.
  • user_id: integer – FK to auth_user(id).
  • group_id: integer – FK to auth_group(id).

auth_user_user_permissions

Links users to permissions.

  • id: bigint – Primary key.
  • user_id: integer – FK to auth_user(id).
  • permission_id: integer – FK to auth_permission(id).

companies

Stores company details.

  • id: bigint – Primary key.
  • name: text – Unique company name.
  • industry, website, address, description: Company metadata.
  • logo_url: text – Logo image URL.
  • num_emp_lower, num_emp_upper: Employee count range.
  • founded_date: text – Year of establishment.

cycles

Tracks user-defined application cycles.

  • id: bigint – Primary key.
  • user_id: uuid – FK to auth.users(id).
  • start_date, end_date: Date range.
  • total_application_count, total_interview_count, total_offer_count, total_rejection_count, total_oa_count, total_other_count: Metrics for the corresponding application statuses (application being applied).
  • name: text – Cycle name.

django_admin_log

Admin actions log.

  • id: integer – Primary key.
  • action_time: timestamptz – Action timestamp.
  • object_id, object_repr: Affected object.
  • action_flag: smallint – Type of action.
  • change_message: text – Log message.
  • content_type_id, user_id: FKs.

django_content_type

Used for permission system and content types.

  • id: integer – Primary key.
  • app_label, model: Identifiers.

django_migrations

Tracks applied database migrations.

  • id: bigint – Primary key.
  • app, name: Migration metadata.
  • applied: Timestamp of migration.

django_session

Stores user sessions.

  • session_key: varchar(40) – Primary key.
  • session_data: text – Encoded session info.
  • expire_date: timestamptz – Expiry timestamp.

job_list

Stores scraped job listings.

  • id: bigint – Primary key.
  • date_posted: timestamptz – Listing date.
  • site, job_url, location, title, etc.
  • company: FK to companies(id).
  • salary_min, salary_max: Integer ranges.
  • is_remote: boolean – Remote status.
  • embedding: vector – For semantic search.

profiles

User-level profile preferences.

  • id: uuid – Primary key, also FK to auth.users(id).
  • email, username: Contact details.
  • has_consented: boolean for consent.
  • email_parsing_enabled, calendar_integration_enabled: Toggles.

temp_applications

Temporary application storage for confirmation.

  • id: bigint – Primary key.
  • created_at: timestamptz – Creation timestamp.
  • company_name, job_name, application_status: Metadata.
  • user_id: uuid – FK to auth.users(id).
  • origin_id: bigint – Reference to original application.
  • job_id: varchar – Job identifier.

7.3 Relationships and Constraints

api_userprofile

  • Primary Key: id
  • Unique Constraint: user_id
  • Foreign Key: user_idauth_user(id) — (1:1, each profile belongs to one user, and each user has at most one profile)

applications

  • Primary Key: id
  • Foreign Keys:
    • user_idauth.users(id) — (M:1, many applications can belong to one user)
    • cyclecycles(id) — (M:1, many applications can be grouped into one cycle)
  • Index: applications_cycle_idx on cycle

auth_group

  • Primary Key: id
  • Unique Constraint: name
  • Index: pattern index on name
  • Relationships:
    • Linked to many permissions through auth_group_permissions (M:N)

auth_group_permissions

  • Primary Key: id
  • Unique Constraint: (group_id, permission_id)
  • Foreign Keys:
    • group_idauth_group(id) — (M:1)
    • permission_idauth_permission(id) — (M:1)
  • Relationship: Acts as a junction table for M:N between auth_group and auth_permission

auth_permission

  • Primary Key: id
  • Unique Constraint: (content_type_id, codename)
  • Foreign Key: content_type_iddjango_content_type(id) — (M:1)

auth_user

  • Primary Key: id
  • Unique Constraint: username
  • Relationships:
    • 1:M with applications, auth_user_groups, auth_user_user_permissions, django_admin_log
    • 1:1 with profiles

auth_user_groups

  • Primary Key: id
  • Unique Constraint: (user_id, group_id)
  • Foreign Keys:
    • user_idauth_user(id) — (M:1)
    • group_idauth_group(id) — (M:1)
  • Relationship: Junction table for M:N between auth_user and auth_group

auth_user_user_permissions

  • Primary Key: id
  • Unique Constraint: (user_id, permission_id)
  • Foreign Keys:
    • user_idauth_user(id) — (M:1)
    • permission_idauth_permission(id) — (M:1)
  • Relationship: Junction table for M:N between auth_user and auth_permission

companies

  • Primary Key: id
  • Unique Constraint: name
  • Relationships: 1:M with job_list

cycles

  • Primary Key: id
  • Foreign Key: user_idauth.users(id) — (M:1, many cycles can belong to one user)
  • Relationships: 1:M with applications

django_admin_log

  • Primary Key: id
  • Foreign Keys:
    • user_idauth_user(id) — (M:1)
    • content_type_iddjango_content_type(id) — (M:1)
  • Check Constraint: action_flag >= 0

django_content_type

  • Primary Key: id
  • Unique Constraint: (app_label, model)
  • Relationships: 1:M with auth_permission, django_admin_log

django_migrations

  • Primary Key: id

django_session

  • Primary Key: session_key
  • Indexes: pattern index on session_key, index on expire_date

job_list

  • Primary Key: id
  • Foreign Key: companycompanies(id) — (M:1)
  • Index: embedding with HNSW vector search

profiles

  • Primary Key / Foreign Key: idauth.users(id) — (1:1, exact match with user table)

temp_applications

  • Primary Key: id
  • Unique Constraint: id
  • Foreign Key: user_idauth.users(id) — (M:1)

Testing

8.1 Test Plan

This project employs a multi-layered testing strategy to ensure the quality, reliability, and correctness of the frontend application. Our approach combines unit tests, component integration tests, and end-to-end (E2E) tests to cover different aspects of the codebase, from individual functions to complete user workflows.

Testing Tools:

  • Frontend:
    • Unit/Component Testing:
      • Jest
      • React Testing Library
      • jest-dom
    • End-to-End (E2E) Tests:
      • Cypress
  • Backend:
    • Unit/Integration Testing:
      • Django's Built-in Test Framework

Mocking:

  • Jest Tests: External dependencies are mocked using jest.mock. This includes:
    • The supabaseClient to simulate database interactions without making real calls.
    • Child components to isolate the component being tested.
    • Context hooks to provide controlled state.
    • Browser APIs (localStorage) or libraries where necessary.
  • E2E Tests: Network requests (API calls to Supabase) are intercepted using `cy.intercept. This allows us to provide controlled mock responses for API calls, ensuring consistent test runs and isolating the frontend from backend fluctuations during testing.
  • Django Tests: unittest.mock - Python's standard library for creating mock objects to isolate parts of the system.

8.2 Test Cases

Main Dashboard:

  • Jest:
    • Renders Navbar and initial content after load
    • Renders dashboard with cycles and applications in list view by default
    • Renders message when no applications are found for the selected cycle
    • Switches between list and column view
    • Changes the selected cycle and fetches new applications
    • Opens Create Cycle modal when "Create New Cycle" is selected
    • Filtering, Searching, and Sorting:
      • Filters applications by status
      • Searches applications by company name
      • Searches applications by position name
      • Sorts applications by company name ascending
      • Sorts applications by company name descending
    • Opens Edit Application modal when edit button is clicked
    • Opens Create Application modal when Add New button is clicked
    • Displays error message when fetching applications fails
    • Displays error message when fetching cycles fails
  • Cypress:
    • Should load initial data correctly (Cycle 1, List View)
    • Should switch between list and column view
    • Should filter applications by status
    • Should search applications by company or position
    • Should sort applications by company (ascending/descending)
    • Should open Create Application modal
    • Should open Edit Application modal
    • Should delete a cycle after confirmation

List View (Dashboard):

  • Jest:
    • Renders job applications in list view
    • Status dropdowns display correct initial values
    • Status dropdown should change application status
    • Clicking on column headers calls requestSort with correct key
    • Deleting an application should call onDelete
    • Cycle counts should be updated when status changes
  • Cypress:
    • Status dropdown selection
    • Listview dropdowns functionality

Column View (Dashboard):

  • Jest:
    • Renders all columns and applications
    • Calls onUpdate after mock drag and drop
  • Cypress:
    • Renders ColumnView and draggable applications
    • Displays correct columns for statuses

Application Management:

  • Jest:
    • ApplicationCard renders application details correctly
    • ApplicationCard calls drag events correctly
    • ApplicationCard displays deadline for OA and Interview statuses
    • EditApplicationModal validates required fields
    • EditApplicationModal updates application successfully
    • DeleteApplicationModal confirms before deleting
    • DeleteApplicationModal updates cycle counts for different application statuses

Updates:

  • Jest:
    • Renders Updates component with application data
    • Handles empty state and loading states
    • Refreshes updates when requested
    • Redirects immediately when no session
    • Completes the delete flow for unwanted updates
    • Handles overwrite for same-job applications
    • Tests insert via make-changes with not-same applications
    • Tests the duplicate modal and confirms overwrite functionality
    • Tests incomplete sheet insertion
    • Redirects on SIGNED_OUT event
    • Tests sheet close resets state
    • Tests modal cancel hides overwrite dialog
    • Tests creating new application from original one
  • Cypress:
    • Redirects to home if no session exists
    • Null value table handling
    • Handles similar entries and overwrites them

Jobs:

  • Jest:
    • Renders search input and filters
    • Fetches and displays first page of jobs
    • Filters by work type
    • Updates search query state
    • Paginates to next page
    • Shows job details when a job is selected
  • Cypress:
    • Loads job listings successfully
    • Searches for a job using the search input
    • Filters jobs by work type
    • Selects a job and displays details

Cycles:

  • Jest:
    • Creates a cycle when the form is submitted
    • Deletes a cycle when confirmed
    • EditCycleModal validates required fields and date ordering
    • EditCycleModal updates cycle and invokes callbacks
  • Cypress:
    • Should switch cycles and load corresponding applications
    • Should open Create Cycle modal
    • Should delete a cycle after confirmation

Profile:

  • Jest:
    • Renders profile view after fetching data
    • Toggles to editing mode when 'Edit Profile' is clicked
    • Updates profile successfully on form submit
    • Cancels editing mode when 'Cancel' is clicked
    • Navigates to '/' when session fetch fails
    • Navigates to '/' when profile fetch returns null
    • Toggles email parsing and calendar integration and reflects changes after update
  • Cypress:
    • Should display the profile information correctly
    • Should enter edit mode when Edit Profile is clicked
    • Should toggle email parsing and affect calendar integration

Notifications & Calendar:

  • Jest:
    • Renders notification bell button
    • Shows unread indicator when there are unread notifications
    • Opens dropdown when bell is clicked
    • Renders notification items correctly
    • Displays loading state
    • Displays empty state when no notifications
    • Closes dropdown when clicking outside
    • Provides notifications context
    • markAllAsRead updates localStorage and resets hasUnreadNotifications
    • refreshNotifications fetches new notifications
    • Handles authentication changes
    • Detects unread notifications correctly
    • Handles auth session error
    • Tests NotificationsContext provider functionality
    • Tests authentication state changes handling
  • Cypress:
    • Should not show unread indicator when there are no upcoming deadlines
    • Should show unread indicator when there are new upcoming deadlines
    • Should display notifications in the dropdown and hide indicator after closing
    • Should not show indicator if upcoming deadlines have already been read

Statistics:

  • Jest:
    • Calculates and passes correct ApplicationStats to DashboardControls
    • Calculates and passes correct areaChartData to DashboardControls
    • Generates and passes correct sankeyInputText to DashboardControls
    • Handles zero applications correctly for stats, area chart, and sankey
    • Tests status distribution calculations
    • Tests timeline chart data formatting
    • Verifies different cycle data rendering
  • Cypress:
    • Should open the Stats & Graphs modal, display basic elements, and close
    • Should display correct total application count and render graphs
    • Should handle zero applications correctly

Supabase:

  • Jest:
    • createClient should be called with correct parameters
    • supabase provides expected API methods
    • Can call supabase.from with table name
    • Can call supabase.rpc with function name and parameters
  • Cypress:
    • Should make requests with proper authorization headers

Backend Unit Tests:

  • Calendar:
    • test_refresh_credentials_if_needed_no_refresh
    • test_refresh_credentials_if_needed_with_refresh
    • test_get_calendar_service_success
    • test_get_calendar_service_missing_profile
    • test_list_calendars
    • test_list_upcoming_events
    • test_create_event
    • test_update_event
    • test_delete_event_success_and_failure
    • test_get_preferred_calendar_id
  • Chatbot:
    • test_get_or_create_assistant_for_user_creates
    • test_create_assistant_returns
    • test_create_thread
    • test_get_thread_history
    • test_handle_user_query
    • test_handle_user_query_stream
  • Email Parsing:
    • test_parse_none_returns_none
    • test_parse_not_job_returns_default_dict
    • test_parse_email_success
    • test_compare_json_files_struct
    • test_compute_accuracy_empty_lists
  • Email Fetching:
    • test_no_profile
    • test_missing_token
    • test_fetch_success
    • test_get_email_text
    • test_fetch_history_missing_profile
  • Notifications:
    • test_missing_message_field
    • test_missing_data_in_message
    • test_missing_email_address
    • test_valid_notification_with_history
  • Tasks:
    • Tests filtering job-related emails (test_filter_emails_task_job_related)
    • Tests processing job-related emails (test_process_job_related_emails_task)
  • Views:
    • Tests token saving with missing provider token
    • Tests token saving with a new user
    • Tests email fetching view
    • Tests for handling Google API integrations
  • Process Job Application:
    • Tests handling emails with missing key fields
    • Tests the complete flow of processing new applications from emails
    • Tests edge cases in application processing

8.3 Test Results

Frontend Unit Tests (Jest): pnpm run test (in frontend folder)

  • All Jest test cases pass.

Frontend E2E Tests (Cypress): pnpm cypress:run (in frontend folder)

  • All Cypress test cases pass.

Django unit tests: python manage.py test --keepdb (in backend folder)

  • All Django unit tests passed

Frontend Code Coverage: 81.87% lines pnpm jest --coverage

Backend Code Coverage: 85% coverage coverage run --source='.' manage.py test --keepdb

Deployment

9.1 Deployment Process

Summit is deployed on Render, a cloud platform that hosts both the frontend and backend services.

Frontend Deployment

  • The React application is built using the command pnpm build which runs TypeScript compilation with the deployment configuration (tsconfig.deploy.json) and Vite build process
  • The production build creates optimized static files in the /dist directory
  • Frontend is deployed as a static site service on Render, which serves these files through a CDN

Backend Deployment

  • The Django application is deployed as a web service on Render
  • The deployment process handles:
    • Installing Python dependencies from requirements.txt
    • Running database migrations
    • Starting the Django application server
  • Environment variables are configured in the Render dashboard to provide necessary secrets and configuration

Database & Additional Services

  • Supabase provides the PostgreSQL database and authentication services
  • Redis is deployed on Render as a separate service to support:
    • Celery task queue for asynchronous processing
    • Background jobs for email fetching and parsing

CI/CD Pipeline

  • GitHub Actions workflow automatically runs tests when code is pushed to the main branches
  • Deployment to Render is triggered automatically when changes are pushed to the main branch
  • Environment variables are securely managed through Render's environment configuration

9.2 Release Notes

Current Version: 1.0.0

Key features in the current release:

  • Gmail integration for email parsing and job application tracking
  • Smart application status detection using AI
  • Application cycle management
  • Job discovery engine
  • Google Calendar integration & notifications
  • Statistics visualization
  • Chatbot assistant

9.3 Known Issues and Limitations

  • Email processing may experience delays during high traffic periods due to API rate limits
  • Limited support for non-Gmail email providers
  • Job scraping is limited to certain job platforms
  • Mobile responsiveness is optimized primarily for tablet and desktop views
  • Calendar integration is limited to Google Calendar only

Glossary

10.1 Terms and Definitions

  • Application: A specific job opportunity the user is tracking in the Summit app (e.g., "Software Engineer Intern at Google") in which they have applied to. This typically automatically comes from the email they recieve if Gmail access is given. Users can also manually add/update their applications in Summit.
  • Cycle: A collection or group created by the user to organize their job applications, often by semester or year (e.g., "Fall 2024").
  • Dashboard: The main overview screen in Summit showing the user's tracked applications and cycles.
  • Job Discovery: The section of Summit where users can search for new job postings.
  • Chatbot: The in-app assistant that helps answer questions about applications, find new jobs, or answer any general app questions.
  • Statistics / Insights: Charts, graphs, and diagrams showing the user's application progress and outcomes.
  • Sankey: A type of flow diagram that visualizes the flow of data between different stages, used in Summit to show the progression of applications through different statuses (e.g., from Applied → Interview → Offer). Popular diagram format shared in social media posts.
  • Company: The name of the employer offering the job (e.g., "Google", "Microsoft"). If in our database, company may also come with logo, industry, website, and description.
  • Position: The title of the role the user applied for (e.g., "Software Engineer Intern", "Data Analyst").
  • Job ID: A unique identifier sometimes provided by the company for a specific job posting (e.g., "REQ-12345").
  • Status: The current stage of the user's job application within the hiring process. Applications can only be one of 6 options: "Applied", "OA", "Interview", "Offer", "Rejection", or "Other". "Other" is used for any non-standard application stages or when the status is unclear/unknown (additional information usually provided within Summit for clarity). Some examples of "Other" includes 'Recruiter Assigned' or 'Team Matching'.
  • Recruiter Information: Contact details for the recruiter or hiring manager associated with the application, if available (e.g., name, email).
  • Deadline: The date by which an application or a specific task (like an Online Assessment or Interview) must be completed. This deadline will show up as a notification in Summit if it is within 7 days. It can also appear on the user's Google Calendar as an event if given access.