Files
thrillwiki_django_no_react/cline_docs/permanent_rules.md

2.5 KiB

Permanent Development Rules

API Organization Rules

MANDATORY NESTING ORGANIZATION

All API directory structures MUST match URL nesting patterns. No exceptions. If URLs are nested like /api/v1/rides/manufacturers/<slug>/, then the directory structure must be backend/apps/api/v1/rides/manufacturers/.

Data Model Rules

RIDE TYPES vs RIDE MODELS DISTINCTION

CRITICAL RULE: Ride Types and Ride Models are completely separate concepts that must never be conflated:

Ride Types (Operational Classifications)

  • Definition: How a ride operates or what experience it provides
  • Scope: Applies to ALL ride categories (not just roller coasters)
  • Examples:
    • Roller Coasters: "inverted", "suspended", "wing", "dive", "flying", "spinning", "wild mouse"
    • Dark Rides: "trackless", "boat", "omnimover", "simulator", "walk-through"
    • Flat Rides: "spinning", "swinging", "drop tower", "ferris wheel", "carousel"
    • Water Rides: "log flume", "rapids", "water coaster", "splash pad"
    • Transport: "monorail", "gondola", "train", "people mover"
  • Storage: Should be stored as type classifications for each ride category
  • Purpose: Describes the ride experience and operational characteristics

Ride Models (Manufacturer Products)

  • Definition: Specific designs/products manufactured by companies
  • Scope: Catalog of available ride designs that can be purchased and installed
  • Examples: "B&M Dive Coaster", "Vekoma Boomerang", "RMC I-Box", "Intamin Blitz", "Mack PowerSplash"
  • Storage: Stored in RideModel table with manufacturer relationships
  • Purpose: Product catalog for ride installations

Relationship

  • Individual ride installations reference BOTH:
    • The RideModel (what specific product/design was purchased)
    • The ride type classification (how it operates within its category)
  • A ride model can have a type, but they serve different purposes in the data structure
  • Example: "Silver Star at Europa-Park" is a "B&M Hyper Coaster" (model) that is a "sit-down" type roller coaster

Implementation Requirements

  • Ride types must be available for ALL ride categories, not just roller coasters
  • Current system only has roller coaster types in RollerCoasterStats.roller_coaster_type
  • Need to extend type classifications to all ride categories
  • Maintain clear separation between type (how it works) and model (what product it is)

Enforcement

These rules are MANDATORY and must be followed in all development work. Any violation should be immediately corrected.