-
Notifications
You must be signed in to change notification settings - Fork 0
chore: refresh docs and eslint plugin #160
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
Open
harley
wants to merge
1
commit into
main
Choose a base branch
from
codex/docs-refresh
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,38 @@ | ||
| # Supabase (required) | ||
| NEXT_PUBLIC_SUPABASE_URL=http://localhost:54321 | ||
| NEXT_PUBLIC_SUPABASE_ANON_KEY=get-from-supabase-status | ||
| SUPABASE_SERVICE_ROLE_KEY=get-from-supabase-start | ||
| RESEND_API_KEY=optional-for-prod | ||
| EMAIL_FROM=pulse@pulse.dev | ||
| SUPABASE_SERVICE_ROLE_KEY=get-from-supabase-status | ||
|
|
||
| # App | ||
| NEXT_PUBLIC_APP_URL=http://localhost:3000 | ||
| NEXT_PUBLIC_GOOGLE_CLIENT_ID=get-from-google-oauth-client-id | ||
| NEXT_PUBLIC_COMPANY_EMAIL_DOMAIN=yourcompany.com | ||
| HR_EMAIL=hr@yourcompany.com | ||
|
|
||
| # Auth / tokens | ||
| TEST_USER_PASSWORD=Test123! | ||
| JWT_SECRET=your-secure-secret | ||
| CRON_SECRET=your-secure-random-string | ||
| NEXT_PUBLIC_COMPANY_EMAIL_DOMAIN=yourcompany.com | ||
| BEDROCK_AWS_ACCESS_KEY_ID | ||
| BEDROCK_AWS_SECRET_ACCESS_KEY | ||
| ALLOWED_CORS_DOMAIN_SUFFIX=localhost,127.0.0.1 | ||
|
|
||
| RESEND_API_KEY=optional-for-prod | ||
| EMAIL_FROM=pulse@pulse.dev | ||
| NEXT_PUBLIC_ENABLE_EMAILS=false | ||
|
|
||
| # AI (AWS Bedrock) | ||
| BEDROCK_AWS_ACCESS_KEY_ID= | ||
| BEDROCK_AWS_SECRET_ACCESS_KEY= | ||
| BEDROCK_MODEL_ID=us.anthropic.claude-3-5-haiku-20241022-v1:0 | ||
| BEDROCK_AWS_REGION=us-east-1 | ||
|
|
||
| # LangSmith (optional) | ||
| LANGSMITH_TRACING=true | ||
| LANGSMITH_ENDPOINT="https://api.smith.langchain.com" | ||
| LANGSMITH_API_KEY= | ||
| LANGSMITH_PROJECT="weekly-pulse-app" | ||
| ALLOWED_CORS_DOMAIN_SUFFIX=localhost,127.0.0.1 | ||
| CODERPUSH_PULSE_SECRET_KEY=your-secret-key | ||
|
|
||
| # Integrations / misc | ||
| CODERPUSH_PULSE_SECRET_KEY=your-secret-key | ||
|
|
||
| # Analytics | ||
| NEXT_PUBLIC_GA_ID= | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,44 +1,50 @@ | ||
| # AGENTS Instructions | ||
|
|
||
| This repository contains a Next.js 15 web application called **Pulse**. It uses Supabase for authentication and database storage, Tailwind CSS for styling, and shadcn/ui components. | ||
|
|
||
| Codex should also read `CLAUDE.md` in the repository root for extended architecture and workflow details. | ||
| Pulse is a Next.js 15 App Router app (React 19, TypeScript, Tailwind 4) with Supabase and AI features via CopilotKit + AWS Bedrock. | ||
|
|
||
| ## Scope | ||
| These instructions apply to the entire repository. | ||
|
|
||
| ## Development Guidelines | ||
| - Use TypeScript for all source code. | ||
| - Prefer functional React components and hooks. | ||
| - Use the utility `cn` from `src/lib/utils.ts` to compose CSS class names. | ||
| - UI components should follow the shadcn/ui style (see `components.json`). | ||
| - Keep new code and tests within the `src/` directory structure. | ||
| - Start the development server with `pnpm dev` and build with `pnpm build`. | ||
| - Manage Supabase locally with: | ||
| - `supabase start` – start local instance | ||
| - `supabase stop` – stop local instance | ||
| - `supabase status` – check status | ||
| - `supabase db reset` – reset database **(destroys local data, confirm before running)** | ||
|
|
||
| ## Linting and Formatting | ||
| - Run `pnpm lint` before committing to ensure ESLint rules pass. | ||
|
|
||
| ## Testing | ||
| - Unit tests use **Vitest**. Run them with `pnpm test:run`. | ||
| - End-to-end tests use **Playwright** and require a local Supabase instance and the MCP server. Run them with `pnpm test:e2e`. | ||
| - Additional helpers: `pnpm test:e2e:debug` and `pnpm test:coverage`. | ||
| - If tests fail due to environment limitations (e.g. missing dependencies), note this in the PR. | ||
|
|
||
| ## Commit Messages | ||
| Use short descriptive commit messages, for example: | ||
| ``` | ||
| feat: add weekly submission API | ||
| docs: update README with setup steps | ||
| ``` | ||
|
|
||
| ## Additional Notes | ||
| - E2E tests must drive the browser via the MCP server as described in `docs/prompt-work-with-playwright-mcp.md`. | ||
| - For Supabase-related tests, see `docs/supabase-in-test.md` for the hybrid approach using mocks and a local instance. | ||
| - Consult `docs/test-plan.md` and `docs/implementation.md` for deeper explanations. | ||
| - `CLAUDE.md` contains extended documentation for human contributors. | ||
| - Keep documentation updates in the `docs/` directory when adding new features. | ||
| Applies to the entire repository. | ||
|
|
||
| ## Commands | ||
| - `pnpm dev` (Turbopack) | ||
| - `pnpm build` | ||
| - `pnpm lint` | ||
| - `pnpm test:run` (Vitest) | ||
| - `pnpm test:e2e` (Playwright) | ||
| - `pnpm test:e2e:install` (Playwright browsers) | ||
|
|
||
| ## Supabase (local) | ||
| - `supabase start`, `supabase stop`, `supabase status` | ||
| - `supabase db reset` is destructive, confirm first. | ||
| - Local services: API `http://localhost:54321`, Studio `http://localhost:54323`, Inbucket `http://localhost:54324` (SMTP `54325`). | ||
| - Fill `NEXT_PUBLIC_SUPABASE_URL`, `NEXT_PUBLIC_SUPABASE_ANON_KEY`, `SUPABASE_SERVICE_ROLE_KEY` from `supabase status`. | ||
|
|
||
| ## Env | ||
| - Copy `.env.example` and `supabase/.env.example`. | ||
| - Required for auth: `NEXT_PUBLIC_SUPABASE_URL`, `NEXT_PUBLIC_SUPABASE_ANON_KEY`, `SUPABASE_SERVICE_ROLE_KEY`, `SUPABASE_AUTH_GOOGLE_CLIENT_ID`, `SUPABASE_AUTH_GOOGLE_SECRET`. | ||
| - Company domain: `NEXT_PUBLIC_COMPANY_EMAIL_DOMAIN`. | ||
| - AI (optional): `BEDROCK_AWS_ACCESS_KEY_ID`, `BEDROCK_AWS_SECRET_ACCESS_KEY`, `BEDROCK_MODEL_ID`, optional `BEDROCK_AWS_REGION`. | ||
| - Auth/admin: `JWT_SECRET`, `TEST_USER_PASSWORD`. | ||
| - Cron/admin: `CRON_SECRET`, `NEXT_PUBLIC_APP_URL`. | ||
| - Email: `RESEND_API_KEY`, `EMAIL_FROM`, optional `NEXT_PUBLIC_ENABLE_EMAILS` (local uses Inbucket). | ||
| - Optional: `HR_EMAIL`, `LANGSMITH_*`, `ALLOWED_CORS_DOMAIN_SUFFIX`, `CODERPUSH_PULSE_SECRET_KEY`, `NEXT_PUBLIC_GA_ID`. | ||
|
|
||
| ## Code Conventions | ||
| - TypeScript only. Prefer functional React components and hooks. | ||
| - Use `cn` from `src/lib/utils.ts` for class names. | ||
| - shadcn/ui style rules in `components.json`. | ||
| - Keep new code and tests in `src/`. | ||
|
|
||
| ## Key Locations | ||
| - `src/app/(authenticated)` user routes: daily-pulse, daily-tasks, submissions, history, leaderboard, profile. | ||
| - `src/app/admin` admin UI. | ||
| - `src/app/api` API routes: daily tasks, submissions, questions, comments, leaderboard, monthly reports, cron. | ||
| - Supabase clients: `src/utils/supabase/{server,client,api,middleware}.ts`. | ||
| - Email: `src/lib/email.ts` (Inbucket in dev, Resend in prod). | ||
|
|
||
| ## Testing Notes | ||
| - E2E tests require local Supabase and the Playwright MCP workflow. See `docs/prompt-work-with-playwright-mcp.md`. | ||
| - For Supabase testing strategy, see `docs/supabase-in-test.md` and verify against current code. | ||
|
|
||
| ## Docs | ||
| - `CLAUDE.md` has extra context; treat `docs/` as design notes and verify against code. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 example
TEST_USER_PASSWORDis a concrete but weak password. This is inconsistent with other secrets in this file which use placeholders likeyour-secure-secret. Using a weak default password encourages poor security practices, as it might be copied for local or staging environments. It's better to use a placeholder to prompt the developer to set a secure password.