System Architecture
This page provides an overview of the architecture powering AggieSeek, including the frontend, backend services, infrastructure, and external integrations.
Overview Diagram

The full system flow from user request to notification.
🧱 1. Core Components
🖥️ Frontend (Next.js)
- Built with Next.js and TailwindCSS
- Uses Next.js API routes for server-side actions
- Served behind an NGINX reverse proxy
- Dockerized and deployed to a Hetzner VPS
- Auth via Google (NextAuth) and Discord OAuth2
🧠 Backend Services
📦 Tracker Service (tracker.py)
- Runs every minute
- Fetches course availability from Howdy
- Compares with local SQLite3 cache
- Sends alerts via Twilio and Discord Webhooks
📦 Updater Service (updater.py)
- Runs every 10 minutes
- Pulls all course data from Howdy
- Processes using pandas
- Updates PostgreSQL (Amazon RDS) with upserts
🗃️ 2. Databases
🐘 PostgreSQL (Amazon RDS)
- Stores user accounts, tracked sections, and public course data
- Queried by Next.js API routes and updater
🧩 SQLite3 (Local)
- Maintains previous course states for diff comparisons
- Used only by
tracker.py
🔐 3. Authentication
- Google OAuth via NextAuth.js
- Discord OAuth via dedicated route to store Discord IDs
- Protected documentation (MkDocs) served via Flask + Google OAuth or Cloudflare Access
📦 4. Deployment & Infrastructure
| Component | Hosted On | Containerized |
|---|---|---|
| Next.js App | Hetzner VPS | ✅ Docker |
| NGINX Reverse Proxy | Hetzner VPS | ✅ Docker |
| Python Services | Hetzner VPS | ✅ Docker |
| PostgreSQL DB | Amazon RDS | ❌ |
| Flask Docs | Hetzner VPS (optional) | ✅ Docker |
- DNS via Cloudflare
- SSL/TLS terminated at Cloudflare or NGINX
- Cloudflare Access restricts documentation access
🌐 5. External Integrations
- Howdy API: Primary source of course and seat data
- Twilio API: Sends SMS notifications
- Discord Webhooks & OAuth: Sends pings, links accounts
🧭 6. Request Flow Summary
- User requests
aggieseek.net - Cloudflare proxies to NGINX
- NGINX serves built Next.js app
- Next.js:
- Renders UI
- Calls API routes
- API routes query PostgreSQL
- Tracker service:
- Pulls latest course data from Howdy
- Compares with SQLite3
- Notifies via Twilio/Discord
- Updater service:
- Refreshes PostgreSQL with new Howdy data
📌 Future Improvements
- Add caching for public course views
- Split services into independent containers for autoscaling
- Deploy docs to Cloudflare Pages + Access