Course browsing app with a Svelte frontend and Rust API.
Start with the maintainer guide, feature matrix, and deployment runbook.
-
Install Lix and configure the ScottyLabs binary cache using the Kennel setup guide. To use Collar from outside the project shell, install it once:
nix profile install 'git+https://git.cmu.dev/ScottyLabs/collar#collar' -
Clone the repository and enter its shell with Collar:
git clone ssh://forgejo@git.cmu.dev/ScottyLabs/courses.git cd courses collar auth bao login collar dev shellFrom an existing checkout, pull the latest changes and run
collar dev shellfrom the repository root. The shell also bundles Collar, sonix developis available as a bootstrap option. OpenBao supplies the app's OIDC settings to members of the CMU Courses team. Usecollar auth loginfor Forgejo access. -
Prepare the local catalog if
data/catalog/public.sqliteanddata/catalog/member.sqliteare absent. Place the Stellic scraper output underexported/, then run:cargo run --release -p courses-index -- --import-catalog exported python3 scripts/verify_catalog.py
The catalog and scraper exports are intentionally ignored by Git. The local API reads
data/catalogdirectly; it does not need CDN or S3 credentials. It createsdata/private/users.sqlitefor local personal data. Keep that file out of Git and static assets. See backend setup and data audit. -
Start PostgreSQL, the Ricochet OIDC callback relay, the browser API on port 3002 and the Svelte app on port 5173 from the repository root:
collar dev up
-
Open http://localhost:5173. Use Sign in to test the configured CMU identity provider. The frontend proxies
/apiand/authto the API, and Ricochet returns the callback to port 5173. The API needsAPP_URL=http://localhost:5173and the callback URL supplied by the development secrets. Usecollar dev statusto inspect the processes,collar dev logs web-apifor API logs, andcollar dev downto stop the stack.
If the API cannot start, first check that the catalog exists and that the development shell loaded the OIDC settings. A 403 from /api/me after login means the provider did not supply a verified CMU email in the ID token or matching UserInfo response. The header uses GET /auth/status, which returns 200 with name: null while signed out and the account name after sign-in. Its can_access_member_catalog field controls whether the frontend preloads the member SQLite snapshot. Member-only endpoints such as /api/me still return 401 before login.
From sites/web, with the development environment loaded:
deno task build
deno task previewOpen http://localhost:4173 to inspect the built UI. Vite's preview server does not use the development /api and /auth proxy, so use the development server above to test sign-in. Rebuild after changes. Deployment serves sites/web/build through courses-web-api using STATIC_DIR.
| Command | Run from | Purpose |
|---|---|---|
deno task check |
sites/web |
Check Svelte and TypeScript |
cargo test -p courses-web-api |
Repository root | Run API unit tests |
More details: architecture and scraper usage.