3.4 KiB
3.4 KiB
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
3000to avoid conflicts with Signet tooling.
Commands
From /Users/averyfelts/Desktop/DevSmokeWebsite:
bun install
bun run d1:migrate
bun run build:worker
bun run dev:worker
Expected URL:
http://localhost:3000
Key Local Changes Made
package.json
- Updated script:
dev:workerfromwrangler devtowrangler dev --port 3000
.gitignore
- Added
.dev.varsso local worker env secrets are not tracked.
src/app/logo-black.png/route.ts
- Added compatibility route to stop
GET /logo-black.png 404. - Route redirects
/logo-black.pngto/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-nextoutput. - 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.
Latest Session Changes
Product and UX
- Reworked mobile dashboard into dedicated swipe pages:
- Mood (+ Daily Inspiration)
- Quit Journey Plan
- Usage Stats
- Health Recovery
- Achievements
- Savings
- Usage Calendar
- Removed mobile side arrow buttons; swipe + dots are now primary navigation.
- Moved floating
Log Usagebutton above the mobile swipe indicator and centered it on mobile. - Updated profile menu to top-right and moved quick actions (notifications/install/theme) into menu.
- Expanded Quit Journey Plan sections (no dropdown collapse), showing both nicotine and weed plans.
- Replaced old theme token set with updated light/dark OKLCH theme variables in
src/app/globals.css.
Reliability and Auth
- Added explicit dashboard/substance data load error handling and retry surface.
- Fixed hourly reminders edge cases for overnight windows.
- Added reminder API input validation for time/frequency values.
- Implemented real password reset initiation via WorkOS endpoint and UI wiring in login/settings.
Achievements
- Added inline unlock guidance text under each achievement tile.
- Added completed/locked status treatment directly in the tile.
- Added unlock safeguards to avoid duplicate global
first_dayunlock behavior:first_daynow normalizes tosubstance: both- dedupe normalization in achievements API GET
- API validation for badge/substance input
INSERT OR IGNOREsafety in D1 write path
Validation Commands Used
bun run build
bun run build:worker
bun run dev:worker
Quick Troubleshooting
-
If UI changes do not appear in worker mode:
bun run build:workerbun run dev:worker- hard refresh browser (
Cmd + Shift + R)
-
If mobile swipe feels off:
- swipe behavior is controlled in
src/app/globals.cssunder.swipe-containerand.swipe-item.
- swipe behavior is controlled in