This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
BOA (Berkeley Online Advising) is UC Berkeley's academic advising application. It aggregates student data from multiple campus systems and provides advising tools including notes, appointments, cohort management, degree progress tracking, and alerts.
flask run --debugger # Run dev server
flask initdb # Initialize database schema
tox -e test # Run all pytest tests
pytest tests/test_api/test_notes_controller.py # Run a single test file
pytest tests/test_api/test_notes_controller.py::TestNotes::test_foo # Run a single test
tox -e lint-py # Lint with Ruffnpm run serve-vue # Vite dev server
npm run build-vue # Production build to dist/static
npm run lint-vue # ESLint
npm run lint-vue-fix # ESLint with auto-fix
npm run oxlint # Oxlint static analysistox -p # Run all tox envs in parallelboac/api/— Flask route controllers (one file per resource domain). Route registration happens inboac/routes.py.boac/models/— SQLAlchemy ORM models backed by theboacPostgreSQL database. These represent BOA-owned data (notes, cohorts, degree templates, users).boac/merged/— The central aggregation layer. Functions here combine data from the BOA database (boac/models/) with external SIS/data-warehouse data (boac/externals/data_loch.py). Most API responses for student data flow through this layer.boac/externals/— Clients for external systems:data_loch.py(read-only data warehouse with SIS/enrollment/grade data),calnet.py(LDAP-based UC Berkeley auth),s3.py/sqs.py(AWS).boac/lib/— Shared utilities:analytics.py,background.py(scheduler),berkeley.py(term/dept constants).boac/factory.py— Flask app factory (create_app()). Entry point for WSGI isapplication.py.
src/api/— Axios-based API client modules (one per backend domain). All HTTP calls go through here.src/views/— Page-level Vue components, organized by feature area.src/components/— Reusable components, organized in subdirectories by feature.src/stores/— Pinia stores for shared state (context.tsholds current user and global config).src/lib/— Frontend utilities;types.tshas shared TypeScript types,boa-user.tshas permission-check helpers.src/router.ts— Vue Router configuration.
Two PostgreSQL databases:
boac— Application-owned data (notes, cohorts, users, degree progress, appointments).boac_loch_test(test only) / data loch in production — Read-only external data warehouse with SIS, enrollment, and grade data. Queried viaboac/externals/data_loch.py.
Config files live in config/ (default.py, development.py, test.py). The BOAC_ENV environment variable selects the config. Tests set BOAC_ENV=test automatically. A BOAC_LOCAL_CONFIGS env var can point to an encrypted volume with local overrides.
tests: pytest unit tests. Tests intests/test_api/test HTTP endpoints end-to-end against a real test database.tests/conftest.pysets up fixtures, mock AWS (via moto), and test users. Run a focused test withpytest tests/path/to/test_file.py::ClassName::test_method.bea: browser automation tests written using Selenium's Python API and run locally against a live BOA instance via Chromedriver (or Firefox/Safari).