107 lines
7.4 KiB
Markdown
107 lines
7.4 KiB
Markdown
# Session Handoff: Nuxt Migration — Phases 1 & 2 Complete
|
||
**Date:** 2026-03-19
|
||
**Session Duration:** ~2 hours
|
||
**Session Focus:** Framework selection, migration planning, and execution of Phases 1 & 2 of Quasar → Nuxt 3 migration
|
||
**Context Usage at Handoff:** ~60%
|
||
|
||
## What Was Accomplished
|
||
|
||
1. Framework analysis (React Native vs Flutter vs Next/Nuxt) → decision: Nuxt 3 + Capacitor (deferred) + FullCalendar
|
||
2. Migration plan created → `docs/summaries/handoff-2026-03-18-nuxt-migration-plan.md` (now the active plan reference)
|
||
3. Phase 1 — Foundation complete → `/home/ptoal/Dev/mobile-projects/bab-app-nuxt/`
|
||
4. Phase 2 — Appwrite plugin + types complete → `app/utils/`, `app/plugins/`
|
||
5. Integration tests written and passing (11/11) → `tests/appwrite-connection.test.ts`
|
||
6. Task feature parked → removed from AppwriteIds and tests
|
||
|
||
## Exact State of Work in Progress
|
||
|
||
- **Migration plan**: 10-phase plan in `docs/summaries/handoff-2026-03-18-nuxt-migration-plan.md`. Phases 1–2 marked complete. Phase 3 (Auth) is next.
|
||
- **New project**: `/home/ptoal/Dev/mobile-projects/bab-app-nuxt/` — scaffolded and running. Dev server confirmed clean on `localhost:3000`.
|
||
- **Old project**: `/home/ptoal/Dev/mobile-projects/bab-app/` — untouched, still operational. Do not delete until Phase 6 is complete.
|
||
|
||
## Decisions Made This Session
|
||
|
||
- **Nuxt 3 + nuxt-quasar-ui** — keeps all Quasar (`q-*`) components working; avoids big-bang UI rewrite. CONFIRMED.
|
||
- **FullCalendar non-commercial license** — key `CC-Attribution-NonCommercial-NoDerivatives` confirmed valid. OYS is Ontario not-for-profit #000082982. CONFIRMED.
|
||
- **PWA only initially** — Capacitor deferred until native camera/GPS features are actively needed. CONFIRMED.
|
||
- **Static output** — `nuxt generate` → `.output/public/` served via nginx. Consistent with existing Ansible deploy. CONFIRMED.
|
||
- **TestFlight/App Store deferred** — revisit when PWA hits UX or capability limits. CONFIRMED.
|
||
- **Auth: magic link + email OTP only** — password auth and Google (`vue3-google-login`) removed. CONFIRMED.
|
||
- **Task feature parked** — collections `task`, `taskTags`, `skillTags` absent from `bab_prod`. Not migrated until Appwrite collections are created. CONFIRMED.
|
||
|
||
## Key Numbers Generated or Discovered This Session
|
||
|
||
- **11/11 tests passing** — backend connection verified
|
||
- **4 collections confirmed reachable** — `boat`, `reservation`, `interval`, `intervalTemplate` (return 401 unauthenticated = exist and require auth)
|
||
- **3 collections absent** — `task`, `taskTags`, `skillTags` return 404 from `bab_prod`
|
||
- **Appwrite project ID**: `65ede55a213134f2b688`
|
||
- **Appwrite endpoint**: `https://appwrite.toal.ca/v1`
|
||
- **Database ID**: `bab_prod`
|
||
- **~12 days** total estimated migration effort (unchanged)
|
||
- **Nuxt version**: 4.4.2 (installed as `nuxt@^4.4.2`)
|
||
- **nuxt-quasar-ui version**: 3.0.1
|
||
- **fontIcons config** must be an array `['material-icons']`, not a string — bug if passed as string (iterates characters)
|
||
|
||
## Conditional Logic Established
|
||
|
||
- IF task feature is needed, THEN create collections `task`, `taskTags`, `skillTags` in Appwrite dashboard first, THEN migrate `stores/task.ts`, `components/task/*`, `pages/task/*`
|
||
- IF Capacitor is added later, THEN change `nuxt.config.ts` `webDir` to `.output/public` and run `npx cap add ios && npx cap add android`
|
||
- IF App Store publishing is pursued, THEN use TestFlight (iOS) + Play Store internal testing track, NOT full public store listing (30–50 user club app)
|
||
|
||
## Files Created or Modified
|
||
|
||
| File Path | Action | Description |
|
||
|-----------|--------|-------------|
|
||
| `/home/ptoal/Dev/mobile-projects/bab-app-nuxt/` | Created | New Nuxt 4.4.2 project root |
|
||
| `bab-app-nuxt/nuxt.config.ts` | Created | ssr:false, nuxt-quasar-ui, @pinia/nuxt, @vite-pwa/nuxt, PWA manifest, runtimeConfig |
|
||
| `bab-app-nuxt/.env.local` | Created | `NUXT_PUBLIC_APPWRITE_ENDPOINT`, `NUXT_PUBLIC_APPWRITE_PROJECT_ID` |
|
||
| `bab-app-nuxt/public/icons/` | Created | Copied from old project — all PWA icon sizes |
|
||
| `bab-app-nuxt/app/utils/appwrite.ts` | Created | Appwrite client + services + AppwriteIds (task collections excluded) |
|
||
| `bab-app-nuxt/app/utils/boat.types.ts` | Created | `Boat` interface (extracted so schedule.ts can depend on it without the store) |
|
||
| `bab-app-nuxt/app/utils/schedule.types.ts` | Created | `Interval`, `Reservation`, `IntervalTemplate`, `TimeTuple` |
|
||
| `bab-app-nuxt/app/utils/misc.ts` | Created | `getNewId()`, `LoadingTypes` |
|
||
| `bab-app-nuxt/app/utils/schedule.ts` | Created | Schedule utilities; `date` from quasar kept; imports updated to `~/utils/*` |
|
||
| `bab-app-nuxt/app/plugins/appwrite.client.ts` | Created | Stub plugin; auth store init wired in Phase 3 |
|
||
| `bab-app-nuxt/vitest.config.ts` | Created | Vitest with `loadEnv` to pick up `.env.local` |
|
||
| `bab-app-nuxt/tests/appwrite-connection.test.ts` | Created | 11 integration tests verifying backend connectivity |
|
||
| `bab-app-nuxt/package.json` | Modified | Added `test` and `test:watch` scripts |
|
||
| `docs/summaries/handoff-2026-03-18-nuxt-migration-plan.md` | Modified | Added confirmed decisions, updated Phase 1 complete, task parked in Phase 7 |
|
||
|
||
## What the NEXT Session Should Do
|
||
|
||
1. **First**: Read `docs/summaries/handoff-2026-03-18-nuxt-migration-plan.md` for the full 10-phase plan and current state
|
||
2. **Then**: Execute **Phase 3 — Auth**
|
||
- Migrate `src/stores/auth.ts` → `bab-app-nuxt/app/stores/auth.ts`
|
||
- Strip password auth methods; keep magic link + email OTP only
|
||
- Remove `vue3-google-login` from `bab-app-nuxt/package.json`
|
||
- Create `app/middleware/auth.global.ts` (replaces old router navigation guard in `src/router/index.ts`)
|
||
- Create `app/pages/auth/callback.vue` — handles magic link redirect `?userId=&secret=` params
|
||
- Wire `authStore.init()` call into `app/plugins/appwrite.client.ts`
|
||
3. **Then**: Execute **Phase 4 — Remaining Stores** (all are near-verbatim Pinia ports)
|
||
- `stores/boat.ts` — import `Boat` from `~/utils/boat.types` instead of defining inline
|
||
- `stores/reservation.ts`, `interval.ts`, `intervalTemplate.ts`, `reference.ts`, `realtime.ts`, `memberProfile.ts`
|
||
- Skip `stores/task.ts` (parked)
|
||
|
||
## Open Questions Requiring User Input
|
||
|
||
- [ ] **Appwrite `task`/`taskTags`/`skillTags` collections** — will these ever be created in `bab_prod`? Determines whether task feature gets migrated at all, or is permanently dropped.
|
||
|
||
## Assumptions That Need Validation
|
||
|
||
- ASSUMED: `nuxt generate` (static) is sufficient — no SSR/server-side rendering needed. Validate: all Appwrite calls are client-side only (no server routes needed).
|
||
- ASSUMED: `LeftDrawer.vue` exists in `src/components/` (referenced in codebase exploration but not confirmed by direct file read). Verify before Phase 6.
|
||
|
||
## What NOT to Re-Read
|
||
|
||
- `src/boot/appwrite.ts` — fully migrated; summarized above
|
||
- `src/utils/misc.ts`, `src/utils/schedule.ts`, `src/stores/schedule.types.ts` — fully migrated; summarized above
|
||
- `templates/claude-templates.md` — not needed next session
|
||
|
||
## Files to Load Next Session
|
||
|
||
- `docs/summaries/handoff-2026-03-18-nuxt-migration-plan.md` — active migration plan with all phases
|
||
- `bab-app-nuxt/app/utils/appwrite.ts` — current AppwriteIds shape (needed for store migration)
|
||
- `bab-app-nuxt/app/plugins/appwrite.client.ts` — needs auth init wired in Phase 3
|
||
- `src/stores/auth.ts` — source for Phase 3 migration (read once, then discard)
|
||
- `src/router/index.ts` — source for middleware logic (read once, then discard)
|