mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 17:31:09 -05:00
- Created comprehensive documentation structure - Added productContext.md for product understanding - Added activeContext.md for current development status - Added systemPatterns.md for architecture patterns - Added developmentWorkflow.md for process standards - Added operationalContext.md for runtime details - Added projectBoundaries.md for technical constraints - Added techContext.md for technology stack - Documented all major aspects of the system - Established foundation for maintaining context
144 lines
2.9 KiB
Markdown
144 lines
2.9 KiB
Markdown
# System Patterns
|
|
|
|
## High-Level Architecture
|
|
|
|
### Backend Architecture
|
|
- Django-based MVT (Model-View-Template) architecture
|
|
- Modular app structure for domain separation
|
|
- HTMX for dynamic server-side rendering
|
|
- AlpineJS for client-side interactivity
|
|
|
|
### Core Apps
|
|
1. Parks & Rides
|
|
- parks/ - Park management
|
|
- rides/ - Ride information
|
|
- designers/ - Ride designer profiles
|
|
- companies/ - Park operator profiles
|
|
|
|
2. User Content
|
|
- reviews/ - User reviews
|
|
- media/ - Media management
|
|
- moderation/ - Content moderation
|
|
|
|
3. Supporting Systems
|
|
- accounts/ - User management
|
|
- analytics/ - Usage tracking
|
|
- location/ - Geographic services
|
|
- email_service/ - Communication
|
|
- history_tracking/ - Change tracking
|
|
|
|
## Core Technical Patterns
|
|
|
|
### Data Flow
|
|
1. Request Handling
|
|
- Django URL routing
|
|
- View processing
|
|
- HTMX partial updates
|
|
- Template rendering
|
|
|
|
2. Content Management
|
|
- Moderated submission flow
|
|
- Media processing pipeline
|
|
- Review validation system
|
|
- History tracking
|
|
|
|
3. User Interactions
|
|
- HTMX for dynamic updates
|
|
- AlpineJS for UI state
|
|
- Partial template loading
|
|
- Progressive enhancement
|
|
|
|
### Database Patterns
|
|
- Django ORM for data access
|
|
- Related models for complex relationships
|
|
- Signals for cross-model updates
|
|
- History tracking for changes
|
|
|
|
## Key Technical Decisions
|
|
|
|
### Frontend Strategy
|
|
1. Server-Side Rendering
|
|
- Django templates as base
|
|
- HTMX for dynamic updates
|
|
- Partial templates by model
|
|
- AlpineJS for client state
|
|
|
|
2. Styling
|
|
- Tailwind CSS
|
|
- Component-based design
|
|
- Responsive layouts
|
|
|
|
### Backend Organization
|
|
1. App Separation
|
|
- Domain-driven design
|
|
- Clear responsibility boundaries
|
|
- Modular functionality
|
|
- Reusable components
|
|
|
|
2. Code Structure
|
|
- Models for data definition
|
|
- Views for business logic
|
|
- Templates for presentation
|
|
- URLs for routing
|
|
- Signals for cross-cutting concerns
|
|
|
|
### Integration Patterns
|
|
1. External Services
|
|
- Email service integration
|
|
- Media storage handling
|
|
- Analytics tracking
|
|
- Location services
|
|
|
|
2. Internal Communication
|
|
- Django signals
|
|
- Context processors
|
|
- Middleware
|
|
- Template tags
|
|
|
|
## Data Flow Patterns
|
|
|
|
### Content Creation
|
|
1. User Input
|
|
- Form submission
|
|
- Media upload
|
|
- Review creation
|
|
- Park/ride updates
|
|
|
|
2. Processing
|
|
- Validation
|
|
- Moderation queue
|
|
- Media processing
|
|
- History tracking
|
|
|
|
3. Publication
|
|
- Approval workflow
|
|
- Public visibility
|
|
- Notification system
|
|
- Cache updates
|
|
|
|
### Query Patterns
|
|
1. Efficient Loading
|
|
- Select related
|
|
- Prefetch related
|
|
- Cached queries
|
|
- Optimized indexes
|
|
|
|
2. Search Operations
|
|
- Location-based queries
|
|
- Full-text search
|
|
- Filtered results
|
|
- Sorted listings
|
|
|
|
## Error Handling
|
|
- Django middleware
|
|
- Custom error pages
|
|
- Logging system
|
|
- User notifications
|
|
|
|
## Security Patterns
|
|
- Django authentication
|
|
- Permission mixins
|
|
- CSRF protection
|
|
- XSS prevention
|
|
- Input validation
|