Skip to content

cougargrades/web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1,070 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CougarGrades Monorepo

License: GPLv2 Node.js pnpm

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.

πŸ“– Table of Contents

What is included?

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

What isn't included?

⚠️ None of the following are included in this monorepo:

Architecture

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:

  1. Frontend (React) fetches data from the API using @cougargrades/services
  2. API (Hono) retrieves data from Firestore, Cloudflare D1, or vendor services
  3. All responses validated with Zod schemas from @cougargrades/models
  4. Shared logic in @cougargrades/utils and @cougargrades/vendor

Tech Stack

Deployable applications

Shared Libraries

Core

  • Language: TypeScript with strict mode
  • Package Manager: pnpm (monorepo workspaces)
  • Deployment: Cloudflare (Workers + Pages)

Practices

TypeScript & Type Safety

  • 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 any types
  • ES Module System: Modern "type": "module" throughout

Code Organization

  • Monorepo with pnpm Workspaces: Separate apps/ for deployable projects and packages/ 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

Testing

  • Vitest: Lightning-fast unit testing (used in atom-feed package)
  • Test Patterns: Focused on critical paths and data validation

Contributing

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.

Resources

Sponsor this project

 

Packages

 
 
 

Contributors