Adds a reusable DEV_SETUP guide, prevents accidental secret commits with .dev.vars ignore, sets worker dev to port 3000 to avoid local tool conflicts, and includes a compatibility route for /logo-black.png.
64 lines
1.6 KiB
Markdown
64 lines
1.6 KiB
Markdown
# Dev Setup Notes (Local)
|
|
|
|
This file captures the local development setup used in this session so future work can resume quickly.
|
|
|
|
## Project Location
|
|
|
|
- Main working copy: `/Users/averyfelts/Desktop/DevSmokeWebsite`
|
|
- Old typo folder exists but unused: `/Users/averyfelts/Desktop/DevSmokWebsite`
|
|
|
|
## Runtime Choice
|
|
|
|
- Use Cloudflare Worker dev flow (not plain `next dev`) for D1-backed features.
|
|
- Dev server is pinned to port `3000` to avoid conflicts with Signet tooling.
|
|
|
|
## Commands
|
|
|
|
From `/Users/averyfelts/Desktop/DevSmokeWebsite`:
|
|
|
|
```bash
|
|
bun install
|
|
bun run d1:migrate
|
|
bun run build:worker
|
|
bun run dev:worker
|
|
```
|
|
|
|
Expected URL:
|
|
|
|
- `http://localhost:3000`
|
|
|
|
## Key Local Changes Made
|
|
|
|
1. `package.json`
|
|
- Updated script:
|
|
- `dev:worker` from `wrangler dev` to `wrangler dev --port 3000`
|
|
|
|
2. `.gitignore`
|
|
- Added `.dev.vars` so local worker env secrets are not tracked.
|
|
|
|
3. `src/app/logo-black.png/route.ts`
|
|
- Added compatibility route to stop `GET /logo-black.png 404`.
|
|
- Route redirects `/logo-black.png` to `/icons/icon-192.png`.
|
|
|
|
## Env File Notes
|
|
|
|
- Local app env file: `.env.local`
|
|
- Local wrangler env file: `.dev.vars`
|
|
- Both are intended for local development.
|
|
- Keep secrets out of git.
|
|
|
|
## Cloudflare/D1
|
|
|
|
- Wrangler auth verified for this machine.
|
|
- Local D1 migrations were applied via `bun run d1:migrate`.
|
|
|
|
## Known Warnings
|
|
|
|
- Wrangler/OpenNext may print duplicate object key warnings from generated `.open-next` output.
|
|
- These warnings did not block startup in this session.
|
|
|
|
## Session Preferences to Preserve
|
|
|
|
- Keep file reads tightly scoped to explicit paths when requested.
|
|
- Avoid broad folder crawling unless asked.
|