Project prompt: https://github.com/CST-438-projects/cst438-docs/tree/main/projects/p2
Starter repo for Project 02. One person per team clicks Use this template → Create a new repository, names it after your API, and adds teammates as collaborators.
Replace this README with your own in Sprint 4. The prompt lists what it must contain.
| Path | What it is | When |
|---|---|---|
docs/proposal.md |
Proposal template: pitch, resources, ER sketch, endpoints, choices, risks | Thu 10/1 |
docs/openapi.yaml |
A complete example contract (workout tracker). Replace it with your API. | Sprint 1 |
redocly.yaml |
Lint rules for the contract | Sprint 1 |
.github/ISSUE_TEMPLATE/user_story.md |
Every new issue starts as a user story with acceptance criteria | now |
.github/pull_request_template.md |
Every PR starts with Closes # and a test checklist |
now |
.gitignore |
Gradle, Android, IntelliJ, Node, and secrets (.env, keystores, local.properties) |
now |
Where your code goes is up to you: an api/ and an android/ folder in this repo (monorepo),
or a second repo for the Android app. Write it down in an ADR.
- Add teammates: Settings → Collaborators
- Protect
main: Settings → Rules → Rulesets → New branch ruleset. Target the default branch, require a PR with 2 approvals (1 for a team of 3), block force pushes. Enforcement: Active. - Create milestones
Sprint 1throughSprint 4: Issues → Milestones - Create a Project board (Kanban) and link it: Projects tab → Link a project
- Start
docs/proposal.mdon a branch:
git switch -c docs/proposal
# edit docs/proposal.md
git add docs/proposal.md
git commit -m "Draft proposal"
git push -u origin docs/proposal
gh pr create --fillNo installs needed beyond Node (npx runs the tools).
# Lint: fix every error before you open a PR
npx @redocly/cli lint docs/openapi.yaml
# Mock server: a fake API built from the contract, at http://127.0.0.1:4010
npx @stoplight/prism-cli mock docs/openapi.yaml
curl -H "Authorization: Bearer x" "http://127.0.0.1:4010/api/v1/workouts?page=0&size=20"
curl -i http://127.0.0.1:4010/api/v1/workouts # 401: no token
curl -H "Authorization: Bearer x" -H "Prefer: code=404" \
http://127.0.0.1:4010/api/v1/workouts/42 # force an error responseThe mock validates your requests and returns the example: values from the contract.
Nothing is saved: a POST followed by a GET returns the example, not what you posted. The
Android emulator reaches it at http://10.0.2.2:4010.
To see the contract rendered, paste docs/openapi.yaml into https://editor.swagger.io.
- Project 02 prompt and rubric: Canvas → Project 02 module
- OpenAPI 3.0 spec: https://spec.openapis.org/oas/v3.0.3
- Prism: https://docs.stoplight.io/docs/prism
- Mermaid ER diagrams: https://mermaid.js.org/syntax/entityRelationshipDiagram.html
- RFC 9457 Problem Details: https://www.rfc-editor.org/rfc/rfc9457