Files
thrillwiki_django_no_react/BACKEND_STRUCTURE.md

1.9 KiB

Backend Structure Plan

Apps Overview

1. apps.core

  • Responsibility: Base classes, shared utilities, history tracking.
  • Existing: SluggedModel, TrackedModel, pghistory.

2. apps.accounts

  • Responsibility: User authentication and profiles.
  • Existing: User, UserProfile, UserDeletionRequest, UserNotification.
  • Missing: RideCredit (although UserProfile has aggregate stats, individual credits are needed).

3. apps.parks

  • Responsibility: Park management.
  • Existing: Park, ParkArea.

4. apps.rides

  • Responsibility: Ride data (rides, coasters, credits), Companies.
  • Existing: RideModel, RideModelVariant, RideModelPhoto, Ride (with FSM status).
  • Proposed Additions:
    • RideCredit (M2M: User <-> Ride). Attributes: count, first_ridden_at, notes, rating. Constraint: Unique(user, ride).

5. apps.moderation

  • Responsibility: Content pipeline.
  • Existing: Check apps/moderation (likely Submission).
  • Constraint: Status State Machine (Pending -> Claimed -> Approved).

6. apps.media

  • Responsibility: Photos and Videos.
  • Existing: Photo (GenericFK).

7. apps.reviews

  • Responsibility: User reviews.
  • Proposed: Review model (User, Entity GenericFK, rating 1-5, text, helpful votes).

8. apps.lists

  • Responsibility: User Rankings/Lists.
  • Existing: TopList, TopListItem (in apps.accounts currently? Or should move to apps.lists?). accounts/models.py has TopList.
  • Proposal: Move TopList to apps.lists for better separation if it grows, or keep in accounts if tightly coupled. Spec suggests "11. USER LISTS" is a major feature.

9. apps.blog

  • Responsibility: Blog posts.
  • Proposed: Post, Tag.

10. apps.support

  • Responsibility: Contact form.
  • Proposed: Ticket.