mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2026-02-05 07:45:18 -05:00
lol
This commit is contained in:
73
.agent/MEMORY/migration_source.md
Normal file
73
.agent/MEMORY/migration_source.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# Migration Source: thrillwiki-87
|
||||
|
||||
The React project at `/Volumes/macminissd/Projects/thrillwiki-87` is the **authoritative source** for ThrillWiki features and functionality.
|
||||
|
||||
## Core Principle
|
||||
|
||||
**thrillwiki-87 is LAW.** When migrating features, the React implementation defines:
|
||||
- What features must exist
|
||||
- How they should behave
|
||||
- What data structures are required
|
||||
- What UI patterns to follow
|
||||
|
||||
## Source Project Structure
|
||||
|
||||
```
|
||||
thrillwiki-87/
|
||||
├── src/
|
||||
│ ├── components/ # React components (44 directories)
|
||||
│ ├── pages/ # Route pages (39 files)
|
||||
│ ├── hooks/ # React hooks (80+ files)
|
||||
│ ├── types/ # TypeScript definitions (63 files)
|
||||
│ ├── contexts/ # React contexts
|
||||
│ ├── lib/ # Utilities
|
||||
│ └── integrations/ # External service integrations
|
||||
├── docs/ # Feature documentation (78 files)
|
||||
│ ├── SITE_OVERVIEW.md
|
||||
│ ├── DESIGN_SYSTEM.md
|
||||
│ ├── COMPONENTS.md
|
||||
│ ├── PAGES.md
|
||||
│ └── USER_FLOWS.md
|
||||
└── supabase/ # Backend schemas and functions
|
||||
```
|
||||
|
||||
## Technology Translation
|
||||
|
||||
| React (Source) | Nuxt 4 (Target) |
|
||||
|----------------|-----------------|
|
||||
| React component | Vue SFC (.vue) |
|
||||
| useState | ref() / reactive() |
|
||||
| useEffect | watch() / onMounted() |
|
||||
| useContext | provide() / inject() or Pinia |
|
||||
| React Router | Nuxt file-based routing |
|
||||
| React Query | useAsyncData / useFetch |
|
||||
| shadcn-ui | Nuxt UI |
|
||||
| Supabase client | Django REST API via useApi() |
|
||||
| Edge Functions | Django views |
|
||||
|
||||
## Backend Translation
|
||||
|
||||
| Supabase (Source) | Django (Target) |
|
||||
|-------------------|-----------------|
|
||||
| Table | Django Model |
|
||||
| RLS policies | DRF permissions |
|
||||
| Edge Functions | Django views/viewsets |
|
||||
| Realtime | SSE / WebSockets |
|
||||
| Auth | django-allauth + JWT |
|
||||
| Storage | Cloudflare R2 |
|
||||
|
||||
## Migration Workflow
|
||||
|
||||
1. **Find source** in thrillwiki-87
|
||||
2. **Read the docs** in thrillwiki-87/docs/
|
||||
3. **Check existing** Nuxt implementation
|
||||
4. **Port missing features** to achieve parity
|
||||
5. **Verify behavior** matches source
|
||||
|
||||
## Key Source Files to Reference
|
||||
|
||||
When porting a feature, always check:
|
||||
- `thrillwiki-87/docs/` for specifications
|
||||
- `thrillwiki-87/src/types/` for data structures
|
||||
- `thrillwiki-87/src/hooks/` for business logic
|
||||
- `thrillwiki-87/src/components/` for UI patterns
|
||||
83
.agent/MEMORY/source_mapping.md
Normal file
83
.agent/MEMORY/source_mapping.md
Normal file
@@ -0,0 +1,83 @@
|
||||
# Source Mapping: React → Nuxt
|
||||
|
||||
Quick reference for mapping thrillwiki-87 paths to thrillwiki_django_no_react paths.
|
||||
|
||||
## Directory Mappings
|
||||
|
||||
| React (thrillwiki-87) | Nuxt (thrillwiki_django_no_react) |
|
||||
|----------------------|-----------------------------------|
|
||||
| `src/components/` | `frontend/app/components/` |
|
||||
| `src/pages/` | `frontend/app/pages/` |
|
||||
| `src/hooks/` | `frontend/app/composables/` |
|
||||
| `src/types/` | `frontend/app/types/` |
|
||||
| `src/lib/` | `frontend/app/utils/` |
|
||||
| `src/contexts/` | `frontend/app/stores/` (Pinia) |
|
||||
| `docs/` | `source_docs/` |
|
||||
| `supabase/migrations/` | `backend/apps/*/models.py` |
|
||||
|
||||
## Component Mappings (shadcn-ui → Nuxt UI)
|
||||
|
||||
| shadcn-ui | Nuxt UI |
|
||||
|-----------|---------|
|
||||
| `<Button>` | `<UButton>` |
|
||||
| `<Card>` | `<UCard>` |
|
||||
| `<Dialog>` | `<UModal>` |
|
||||
| `<Input>` | `<UInput>` |
|
||||
| `<Select>` | `<USelect>` / `<USelectMenu>` |
|
||||
| `<Tabs>` | `<UTabs>` |
|
||||
| `<Table>` | `<UTable>` |
|
||||
| `<Badge>` | `<UBadge>` |
|
||||
| `<Avatar>` | `<UAvatar>` |
|
||||
| `<Tooltip>` | `<UTooltip>` |
|
||||
| `<Sheet>` | `<USlideover>` |
|
||||
| `<AlertDialog>` | `<UModal>` + confirm pattern |
|
||||
| `<Skeleton>` | `<USkeleton>` |
|
||||
| `<Textarea>` | `<UTextarea>` |
|
||||
| `<Checkbox>` | `<UCheckbox>` |
|
||||
| `<RadioGroup>` | `<URadioGroup>` |
|
||||
| `<Switch>` | `<UToggle>` |
|
||||
| `<DropdownMenu>` | `<UDropdown>` |
|
||||
| `<Command>` | `<UCommandPalette>` |
|
||||
| `<Popover>` | `<UPopover>` |
|
||||
|
||||
## Page Mappings
|
||||
|
||||
| React Page | Nuxt Page |
|
||||
|------------|-----------|
|
||||
| `Index.tsx` | `pages/index.vue` |
|
||||
| `Parks.tsx` | `pages/parks/index.vue` |
|
||||
| `ParkDetail.tsx` | `pages/parks/[park_slug]/index.vue` |
|
||||
| `Rides.tsx` | `pages/rides/index.vue` |
|
||||
| `RideDetail.tsx` | `pages/parks/[park_slug]/rides/[ride_slug].vue` |
|
||||
| `Manufacturers.tsx` | `pages/manufacturers/index.vue` |
|
||||
| `ManufacturerDetail.tsx` | `pages/manufacturers/[slug].vue` |
|
||||
| `Designers.tsx` | `pages/designers/index.vue` |
|
||||
| `DesignerDetail.tsx` | `pages/designers/[slug].vue` |
|
||||
| `Operators.tsx` | `pages/operators/index.vue` |
|
||||
| `OperatorDetail.tsx` | `pages/operators/[slug].vue` |
|
||||
| `ParkOwners.tsx` | `pages/owners/index.vue` |
|
||||
| `PropertyOwnerDetail.tsx` | `pages/owners/[slug].vue` |
|
||||
| `Auth.tsx` | `pages/auth/login.vue`, `pages/auth/signup.vue` |
|
||||
| `Profile.tsx` | `pages/profile/index.vue` |
|
||||
| `Search.tsx` | `pages/search.vue` |
|
||||
| `AdminDashboard.tsx` | `pages/admin/index.vue` |
|
||||
|
||||
## Hook → Composable Mappings
|
||||
|
||||
| React Hook | Vue Composable |
|
||||
|------------|----------------|
|
||||
| `useAuth.tsx` | `useAuth.ts` |
|
||||
| `useSearch.tsx` | `useSearchHistory.ts` |
|
||||
| `useModerationQueue.ts` | `useModeration.ts` |
|
||||
| `useProfile.tsx` | (inline in pages) |
|
||||
| `useLocations.ts` | `useParksApi.ts` |
|
||||
| `useUnitPreferences.ts` | `useUnits.ts` |
|
||||
|
||||
## API Endpoint Translation
|
||||
|
||||
| Supabase RPC/Query | Django API |
|
||||
|--------------------|------------|
|
||||
| `supabase.from('parks')` | `GET /api/v1/parks/` |
|
||||
| `supabase.rpc('search_*')` | `GET /api/v1/search/` |
|
||||
| `supabase.auth.*` | `/api/v1/auth/*` |
|
||||
| Edge Functions | Django views in `backend/apps/*/views.py` |
|
||||
Reference in New Issue
Block a user