CougarGrades is a comprehensive tool that helps students explore course evaluations, instructor ratings, historical GPA trends, and academic data for the University of Houston. This monorepo contains the complete full-stack application-frontend, backend API, shared packages, and data services.
- What is included?
- What isn't included?
- Architecture
- Tech Stack
- Practices
- Contributing
- Resources
- License
The monorepo includes:
- Web App (
@cougargrades/web) - A static React application deployed to Cloudflare Pages - API (
@cougargrades/api) - An HTTP API (Cloudflare Workers with Hono) that powers the web app and serves third-party data - Shared Packages - Core models, services, utilities, and vendor integrations used across the stack
- The web scraping scripts and source data acquired from the University of Houston.
- That can be found in the @cougargrades/publicdata repository linked below.
- https://github.com/cougargrades/publicdata/tree/master/documents
- The scripts used to combine and transform the source data into a CougarGrades-specific NoSQL database
- That can be found in the @cougargrades/publicdata repository linked below.
- https://github.com/cougargrades/publicdata/tree/master/bundler
- https://github.com/cougargrades/publicdata/tree/master/mock-database
- Direct access to the production Firestore database that is populated based on data in the @cougargrades/publicdata project.
- The Firestore REST API client that is compatible with the Cloudflare Workers runtime.
- That can be found in the @cougargrades/firebase-rest-firestore repository linked below.
- https://github.com/cougargrades/firebase-rest-firestore
- It is a fork of the package developed by @nabettu
cougargrades-monorepo/
βββ src/
β βββ apps/ # Deployable applications
β β βββ api/ # Cloudflare Workers backend (Hono + D1)
β β βββ web/ # React frontend (Vite + TanStack)
β β
β βββ packages/ # Shared libraries
β βββ models/ # Zod schemas & data models
β βββ services/ # Type-safe API clients
β βββ vendor/ # External service wrappers (RMP, GitHub, etc.)
β βββ utils/ # Common utilities & helpers
β βββ atom-feed/ # Atom feed parser (used for checking blog and posting messages on the site)
Data Flow:
- Frontend (React) fetches data from the API using
@cougargrades/services - API (Hono) retrieves data from Firestore, Cloudflare D1, or vendor services
- All responses validated with Zod schemas from
@cougargrades/models - Shared logic in
@cougargrades/utilsand@cougargrades/vendor
Deployable applications
Shared Libraries
- Models (
@cougargrades/models) - Zod schemas for type safety and validation - Services (
@cougargrades/services) - Type-safe API client libraries - Vendor (
@cougargrades/vendor) - External service integrations - Utils (
@cougargrades/utils) - Shared utility functions - Atom Feed (
@cougargrades/atom-feed) - Atom feed parser
Core
- Language: TypeScript with strict mode
- Package Manager: pnpm (monorepo workspaces)
- Deployment: Cloudflare (Workers + Pages)
- Strict Mode Enabled: All TSConfig files use
"strict": true - Zod Validation: Runtime validation with Zod schemas ensures data integrity at API boundaries
- No Implicit Any: Type inference is preferred over
anytypes - ES Module System: Modern
"type": "module"throughout
- Monorepo with pnpm Workspaces: Separate
apps/for deployable projects andpackages/for shared libraries - Clear Dependency Boundaries: Apps depend on packages; packages can depend on other packages but not apps
- Consistent Naming:
@cougargrades/scoped package names
- Vitest: Lightning-fast unit testing (used in
atom-feedpackage) - Test Patterns: Focused on critical paths and data validation
We welcome contributions from the community! Whether you're interested in fixing bugs, adding features, or improving documentation, check out CONTRIBUTING.md for detailed instructions.
- Live Site: https://cougargrades.io/
- API Documentation: https://api.cougargrades.io/
- License: MIT (see LICENSE)