mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-27 02:47:04 -05:00
5.4 KiB
5.4 KiB
ThrillWiki Implementation Plan
User Review Required
Important
Measurement Unit System: The backend will store all values in Metric. The Frontend (
useUnitscomposable) will handle conversion to Imperial based on user preference. Sacred Pipeline Enforcement: All user edits createSubmissionrecords (stored as JSON). No direct database edits are allowed for non-admin users.
Proposed Changes
Backend (Django + DRF)
1. Core & Auth Infrastructure
apps.core: ImplementTrackedModelusingpghistoryfor all core entities to support Edit History and Versioning (Section 15).apps.accounts:User&UserProfilemodels (Bio, Location, Home Park).- Settings Support: Endpoints for changing Email, Password, MFA, and Sessions (Section 9.1-9.2).
- Privacy: Fields for
public_profile,show_location, etc. (Section 9.3). - Data Export: Endpoint to generate JSON dump of all user data (Section 9.6).
- Account Deletion:
UserDeletionRequestmodel with 7-day grace period (Section 9.6).
2. Entity Models & Logic ("Live" Data)
apps.parks:Park(with Operator/Owner FKs, Geolocation).apps.rides:Ride(Status FSM),RideModel,Manufacturer,Designer.apps.rides(Credits):RideCreditThrough-Model withcount,rating,date,notes. Constraint: Unique(user, ride).apps.companies:Companymodel with types (Manufacturer,Designer,Operator,Owner).apps.lists:UserList(Ranking System) andUserListItem.apps.reviews:Reviewmodel (GenericFK) with Aggregation Logic.
3. The Sacred Pipeline (apps.moderation)
- Submission Model: Stores
changes(JSON),status(State Machine),moderator_note. - Submission Serializers: Handle validation of "Proposed Data" vs "Live Data".
- Queue Endpoints:
list_pending,claim,approve,reject,activity_log,stats. - Reports:
Reportmodel and endpoints.
Frontend (Nuxt 4)
1. Initial Setup & Core
- Composables:
useUnits(Metric/Imperial),useAuth(MFA, Session),useApi. - Layouts: Standard Layout (Hero, Tabs), Auth Layout.
2. Discovery & Search (Section 1 & 6)
- Global Search: Hero Search with Autocomplete (Parks, Rides, Companies).
- Discovery Tabs (11 Sections):
- Trending Parks / Rides
- New Parks / Rides
- Top Parks / Rides
- Opening Soon / Recently Opened
- Closing Soon / Recently Closed
- Recent Changes Feed
3. Content Pages (Read-Only Views)
- Park Detail: Tabs (Overview, Rides, Reviews, Photos, History).
- Ride Detail: Tabs (Overview, Specifications, Reviews, Photos, History).
- Company Pages: Manufacturer, Designer, Operator, Property Owner details.
- Maps: Interactive "Parks Nearby" map.
4. The Sacred Submission Pipeline (Write Views)
- Submission Forms (Multi-step Wizards):
- Park Form: Location, Dates, Media, Relations.
- Ride Form: Specs (with Unit Toggle), Relations, Park selection.
- Company Form: Type selection, HQ, details.
- Photo Upload: Bulk upload, captioning, crop.
- Editing: Load existing data into form -> Submit as JSON Diff.
5. Moderation Interface (Section 16)
- Dashboard: Queue stats, Assignments.
- Queues:
- Pending Queue: Filter by Type, Submitter, Date.
- Reports Queue.
- Audit Log.
- Review Workspace:
- Diff Viewer: Visual Old vs New comparison.
- Actions: Claim, Approve, Reject (with reason), Edit.
6. User Experience & Settings
- User Profile: Activity Feed, Credits Tab, Lists Tab, Reviews Tab.
- Ride Credits Management: Add/Edit Credit (Date, Count, Notes).
- Settings Area (6 Tabs):
- Account & Profile (Edit generic info).
- Security (MFA setup, Active Sessions).
- Privacy (Visibility settings).
- Notifications.
- Location & Info (Timezone, Home Park).
- Data & Export (JSON Download, Delete Account).
7. Lists System
- List Management: Create/Edit Lists (Public/Private).
- List Editor: Search items, Add to list, Drag-and-drop reorder, Add notes.
Verification Plan
Automated Tests
- Backend:
pytestfor all Model constraints and API permissions.- Test Submission State Machine:
Pending -> Claimed -> Approved. - Test Versioning: Ensure
pghistorytracks changes on approval.
- Test Submission State Machine:
- Frontend:
vitestfor Unit Tests (Composables).
Manual Verification Flows
-
Sacred Pipeline Flow:
- User: Submit a change to "Top Thrill 2" (add stats).
- Moderator: Go to Queue -> Claim -> Verify Diff -> Approve.
- Public: Verify "Top Thrill 2" page shows new stats and "Last Updated" is now.
- History: Verify "History" tab shows the update event.
-
Ride Credits:
- Go to "Iron Gwazi" page.
- Click "Add to Credits" -> Enter
Count: 5,Rating: 4.5. - Go to Profile -> Ride Credits. Verify Iron Gwazi is listed with correct data.
-
Data Privacy & Export:
- Go to Settings -> Privacy -> Toggle "Private Profile".
- Open Profile URL in Incognito -> Verify 404 or "Private" message.
- Go to Settings -> Data -> "Download Data" -> Verify JSON structure.