- Rust 79.2%
- Python 14.3%
- Svelte 3.7%
- TypeScript 1.3%
- Nix 1.1%
- Other 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
Some checks failed
CI / checks-1 (push) Failing after 20s
CI / checks (push) Failing after 0s
nixbot/nix-eval evaluation succeeded in 4m 13s (1 warning)
nixbot/nix-build gitea:ScottyLabs/courses#checks.x86_64-linux.web-api-clippy failed
nixbot/nix-build gitea:ScottyLabs/courses#checks.x86_64-linux.hooks failed
nixbot/nix-build gitea:ScottyLabs/courses#checks.x86_64-linux.api-clippy failed
nixbot/nix-build gitea:ScottyLabs/courses#checks.x86_64-linux.web-api-test failed
nixbot/nix-build 5 of 7 attributes failed
nixbot/nix-build gitea:ScottyLabs/courses#checks.x86_64-linux.kennel failed
Signed-off-by: Anish Pallati <i@anish.land> |
||
| .forgejo/workflows | ||
| crates | ||
| data | ||
| deployments | ||
| scripts | ||
| sites | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| deno.json | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| osv-scanner.toml | ||
| README.md | ||
| secretspec.toml | ||
CMU Courses
Course browsing app with a Svelte frontend and Rust API.
Maintainers
Start with the maintainer guide, feature matrix, and deployment runbook.
Run locally
-
Install Lix and log in to OpenBao by following kennel's local development and secrets guides. The development shell loads the OIDC settings and other secrets, which you can read after you join the CMU Courses team through governance. You need them for CMU sign-in; there is no local login bypass.
-
Clone the repository and enter the development shell:
git clone ssh://forgejo@git.cmu.dev/ScottyLabs/courses.git cd courses nix develop -
Prepare the local catalog if
data/catalog/public.sqliteanddata/catalog/member.sqliteare absent. Copy the supplied source exports intodata/raw, then run:python3 scripts/import_catalog.py data/raw python3 scripts/verify_catalog.pyThe catalog and raw 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:
pitchfork start --local -
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.
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. An anonymous 401 from /api/me before login is expected.
Preview a production build
From sites/web, with the development environment loaded:
deno task build
deno task preview
Open 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.
Useful commands
| Command | Run from | Purpose |
|---|---|---|
deno task check |
sites/web |
Check Svelte and TypeScript |
deno task test |
sites/web |
Run frontend unit tests |
cargo test -p courses-web-api |
Repository root | Run API unit tests |
More details: architecture and scraper usage.