A comprehensive data collection and analysis system for Texas A&M University professor ratings, grade distributions, and course information.
- Department & Course Scraping β Automated collection of department and course data from TAMU Course Catalog
- Rate My Professor Integration β Collection and analysis of professor ratings and reviews
- Database Management β PostgreSQL-based storage with SQLAlchemy ORM
- Data Analysis β AI-powered summarization and insights generation
- API Endpoints β RESTful API for accessing collected data
- Auth (SuperTokens) β Sign-in, sessions, and JWT for the web app and extension; protected routes use
verify_session - Seat alerts (Section Watcher) β Users track sections via API; a scheduled section watcher reads
user_tracked_sectionsand section open status, then sends Web Push when a seat opens
graph TD
%% -- Styling --
classDef external fill:#f9f,stroke:#333,stroke-width:2px,color:#fff;
classDef storage fill:#555,stroke:#333,stroke-dasharray: 5 5,color:#fff;
classDef client fill:#4a90e2,stroke:#333,stroke-width:2px,color:#fff;
classDef default fill:#333,color:#fff,stroke:#111;
%% -- Entities --
User["TAMU Student (Browser)"]:::client
subgraph ExternalSources ["External Data Sources"]
direction LR
TAMU["TAMU Catalog"]:::external
RMP["RateMyProf"]:::external
Anex["Anex.us (GPA)"]:::external
end
subgraph ClientLayer ["Client Side (Frontend)"]
NextJS["Next.js Web App (Vercel)"]
subgraph Extension ["Chrome Extension"]
ContentScript["Content Script (Injected)"]
Popup["Extension Popup (UI)"]
end
end
subgraph AuthLayer ["Auth (SuperTokens)"]
SuperTokens["SuperTokens β sessions, email/password, JWT"]:::auth
end
subgraph ServiceLayer ["Application Layer"]
FastAPI["AggieSB+ API (FastAPI/Python)"]
end
subgraph WorkerLayer ["Data Pipelines (Scheduled)"]
Scrapers["Scraper Workers (TAMU, RMP, GPA)"]
SectionWatcher["Section Watcher β seat-open alerts + Web Push"]
end
subgraph StorageLayer ["Storage Layer"]
PostgreSQL[(PostgreSQL Main DB)]:::storage
Redis[(Redis β cache + tracked CRNs)]:::storage
end
%% -- Connections --
%% User to Clients
User -->|Interacts with| NextJS
User -->|Uses| Popup
ContentScript -.->|Injects UI into| User
%% Auth: sign-in and protected API
User -->|Sign in / account| NextJS
NextJS <-->|Auth APIs| SuperTokens
FastAPI <-->|verify_session + recipe| SuperTokens
%% Clients to Backend (REST; tracking requires session)
NextJS <-->|REST| FastAPI
Popup <-->|Fetch Stats| FastAPI
ContentScript <-->|Fetch Prof Metrics| FastAPI
NextJS -->|Track section alerts| FastAPI
ContentScript -->|Seat alerts| FastAPI
%% Backend logic
FastAPI <-->|SQL Queries| PostgreSQL
FastAPI <-->|Cache / tracking sets| Redis
%% Pipeline Flow
Scrapers -.->|Scrape / Download| ExternalSources
Scrapers -->|ETL / Upsert| PostgreSQL
%% Section watcher: watches user_tracked_sections + sections.is_open β push
SectionWatcher -->|Active watches + section status| PostgreSQL
SectionWatcher -->|Optional Redis coordination| Redis
SectionWatcher -.->|Web Push when seat opens| User
AggieRMP/
βββ π src/aggiermp/ # Main source code
β βββ π api/ # API endpoints and routes
β βββ π collectors/ # Data collection + section_watcher (seat alerts)
β βββ π database/ # Database models and operations
β βββ π models/ # Pydantic data models
β βββ π core/ # Core utilities and configuration
β βββ main.py # Main application entry point
βββ π pipelines/ # Data processing pipelines
β βββ π professors/ # Professor reviews and summarization
β βββ π gpa/ # GPA data collection and processing
β βββ π sections/ # Course section updates
β βββ π courses/ # Course catalog updates
βββ π docs/ # Documentation
βββ pyproject.toml # Project dependencies
βββ README.md # This file
-
Clone the repository
git clone <repository-url> cd AggieRMP
-
Set up virtual environment
python -m venv .venv # Windows .venv\Scripts\activate # macOS/Linux source .venv/bin/activate
-
Install dependencies
pip install -e . -
Set up database
- Configure your PostgreSQL connection
- Run database migrations
-
Upsert Professor Reviews & Summaries
python pipelines/professors/upsert_reviews_and_summaries.py --force-update
-
Upsert GPA Data
python pipelines/gpa/upsert_gpa_data.py
python src/aggiermp/main.py| Source | Description |
|---|---|
| TAMU Course Catalog | Department and course information |
| Anex.us | Historical GPA data |
| Rate My Professor | Professor ratings and reviews |
| Manual Curation | Additional data validation & enhancement |
| Pipeline | Status |
|---|---|
| Sections Upsert | |
| GPA Upsert | |
| Courses Upsert | |
| Sections Watcher |
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
This project is for educational and research purposes.
For questions or issues, please open a GitHub issue or contact the maintainer.