Repository navigation
Repo organization: doc fixes, scripting, scaffolding for testing, linting, etc. #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
19db34f
b68727d
a53f275
d81b149
c3c76a2
7e8b28f
0eae3f2
ed1f5c7
88c1a65
86c1fb9
0449842
d361da1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: Repo Checks | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| checks: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "20" | ||
| cache: "npm" | ||
| cache-dependency-path: frontend/package-lock.json | ||
| - name: Run checks | ||
| run: npm run gitcheck | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,8 @@ | |
| .next | ||
| out | ||
| node_modules | ||
| coverage | ||
| .vercel | ||
|
|
||
| # OS/Editor cruft | ||
| .DS_Store | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| node_modules | ||
| .next | ||
| out | ||
| .supabase | ||
| coverage | ||
| **/package-lock.json |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "printWidth": 100, | ||
| "singleQuote": false, | ||
|
||
| "semi": true | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -20,6 +20,62 @@ Students struggle to find consolidated, high‑quality, course‑specific study | |||||||||||||||||||||||||||||
| - [Wieland Rodriguez](https://www.linkedin.com/in/wieland-rodriguez) - Developer | ||||||||||||||||||||||||||||||
| - [Emma Walker](https://www.linkedin.com/) - Developer | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ## Getting Started | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| The fastest way to get up and running is the setup script. It checks your local | ||||||||||||||||||||||||||||||
| dependencies, verifies environment variables, installs packages, and then starts | ||||||||||||||||||||||||||||||
| the dev server only when everything looks good. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||
| npm run setup | ||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ### What the setup script checks | ||||||||||||||||||||||||||||||
| - Node.js is installed and prints the version. | ||||||||||||||||||||||||||||||
| - Supabase CLI is installed (or it will tell you how to install it). | ||||||||||||||||||||||||||||||
| - Required environment variables exist in `frontend/.env.local`. | ||||||||||||||||||||||||||||||
| - Frontend dependencies are installed. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ### Supabase CLI install (Windows) | ||||||||||||||||||||||||||||||
| Run this in PowerShell: | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ```powershell | ||||||||||||||||||||||||||||||
| Set-ExecutionPolicy -Scope CurrentUser RemoteSigned | ||||||||||||||||||||||||||||||
| iwr -useb get.scoop.sh | iex | ||||||||||||||||||||||||||||||
| scoop install supabase | ||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ### Supabase CLI install (macOS) | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||
| brew install supabase/tap/supabase | ||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ### Required environment variables | ||||||||||||||||||||||||||||||
| Create `frontend/.env.local` and include: | ||||||||||||||||||||||||||||||
| - `NEXT_PUBLIC_SUPABASE_URL` | ||||||||||||||||||||||||||||||
| - `NEXT_PUBLIC_SUPABASE_ANON_KEY` | ||||||||||||||||||||||||||||||
| - `SUPABASE_SERVICE_ROLE_KEY` | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ### Start the dev server | ||||||||||||||||||||||||||||||
| If you want to skip the full checks and just start after installing updates: | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||||||
| npm run start | ||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ### Auth flow | ||||||||||||||||||||||||||||||
| Open `/auth`, enter your `@calpoly.edu` email, and use the one-time code to log in. | ||||||||||||||||||||||||||||||
| After that, you will be routed to onboarding or the dashboard. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ## Documentation | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - Product requirements: `docs/PRD.md` | ||||||||||||||||||||||||||||||
| - Tech stack: `docs/Note_Sharer_Tech_Stack.md` | ||||||||||||||||||||||||||||||
| - Project charter: `docs/project-charter.md` | ||||||||||||||||||||||||||||||
| - Contributing: `docs/contributing.md` | ||||||||||||||||||||||||||||||
| - PR review guide: `docs/PR_REVIEW_GUIDE.md` | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ## Contributing | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| Visit [contributing.md](docs/contributing.md) on info for how to contribute to this repo. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
| Visit [contributing.md](docs/contributing.md) on info for how to contribute to this repo. | |
| Visit [contributing.md](docs/contributing.md) for info on how to contribute to this repo. |
Copilot
AI
Jan 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation references "docs/contributing.md" and "docs/PR_REVIEW_GUIDE.md" but these files are not included in this PR. Ensure these files exist in the repository or will be added in a follow-up PR to avoid broken documentation links.
| - Contributing: `docs/contributing.md` | |
| - PR review guide: `docs/PR_REVIEW_GUIDE.md` | |
| ## Contributing | |
| Visit [contributing.md](docs/contributing.md) on info for how to contribute to this repo. | |
| - Contributing guidelines: (to be added in `docs/contributing.md`) | |
| - PR review guide: (to be added in `docs/PR_REVIEW_GUIDE.md`) | |
| ## Contributing | |
| Contributions are welcome. Please open an issue or pull request with your proposed changes; formal contributing guidelines will be added to `docs/contributing.md` in a future update. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,13 @@ | ||||||
| import { generateRandomNickname, generateRandomNicknames } from "@/lib/nicknames"; | ||||||
|
|
||||||
| describe("nicknames", () => { | ||||||
| it("generates a nickname with letters and digits", () => { | ||||||
| const nickname = generateRandomNickname(); | ||||||
| expect(nickname).toMatch(/^[A-Za-z]+[A-Za-z]+[0-9]{1,2}$/); | ||||||
|
||||||
| expect(nickname).toMatch(/^[A-Za-z]+[A-Za-z]+[0-9]{1,2}$/); | |
| expect(nickname).toMatch(/^[A-Za-z]{2,}[0-9]{1,2}$/); |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,13 @@ | ||||||||
| const nextJest = require("next/jest"); | ||||||||
|
|
||||||||
| const createJestConfig = nextJest({ dir: "./" }); | ||||||||
|
|
||||||||
| const customJestConfig = { | ||||||||
| testEnvironment: "node", | ||||||||
| moduleNameMapper: { | ||||||||
| "^@/(.*)$": "<rootDir>/$1", | ||||||||
| }, | ||||||||
| testPathIgnorePatterns: ["<rootDir>/.next/", "<rootDir>/node_modules/"], | ||||||||
|
||||||||
| testPathIgnorePatterns: ["<rootDir>/.next/", "<rootDir>/node_modules/"], | |
| testPathIgnorePatterns: ["<rootDir>/.next/", "<rootDir>/node_modules/"], | |
| extensionsToTreatAsEsm: [".ts", ".tsx"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI workflow runs
npm run gitcheckwhich executes the setup script with--skip-supabase --skip-env --no-startflags, followed by linting and testing. However, the setup script will still runnpm installin the frontend directory at line 131. Since the workflow already has Node.js set up with caching, consider adding an explicitnpm cistep in the workflow before running checks to ensure dependencies are installed, or document that the gitcheck script handles this.