mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 15:51:08 -05:00
4.2 KiB
4.2 KiB
System Architecture Documentation
Overview
ThrillWiki is a Django-based web platform built with a modular architecture focusing on theme park information management, user reviews, and content moderation.
Technology Stack
Backend
- Framework: Django 5.1.6
- API: Django REST Framework 3.15.2
- WebSocket Support: Channels 4.2.0 with Redis
- Authentication: django-allauth, OAuth Toolkit
- Database: PostgreSQL with django-pghistory
Frontend
- Templating: Django Templates
- CSS Framework: Tailwind CSS
- Enhancement: HTMX, JavaScript
- Asset Management: django-webpack-loader
Infrastructure
- Static Files: WhiteNoise 6.9.0
- Media Storage: Local filesystem with custom storage backends
- Caching: Redis (shared with WebSocket layer)
System Components
Core Applications
-
Parks Module
- Park information management
- Geographic data handling
- Operating hours tracking
- Integration with location services
-
Rides Module
- Ride specifications
- Manufacturer/Designer attribution
- Historical data tracking
- Technical details management
-
Reviews System
- User-generated content
- Media attachments
- Rating framework
- Integration with moderation
-
Moderation System
- Content review workflow
- Quality control mechanisms
- User management
- Verification processes
-
Companies Module
- Company profiles
- Verification system
- Official update management
- Park operator features
Service Layer
-
Authentication Service
# Key authentication flows User Authentication → JWT Token → Protected Resources Social Auth → Profile Creation → Platform Access -
Media Service
# Media handling workflow Upload → Processing → Storage → Delivery -
Analytics Service
# Analytics pipeline User Action → Event Tracking → Processing → Insights
Data Flow Architecture
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Client │ ──→ │ Django │ ──→ │ Database │
│ Browser │ ←── │ Server │ ←── │ (Postgres) │
└─────────────┘ └──────────────┘ └─────────────┘
↑ ↓
┌──────────────┐
│ Services │
│ (Redis/S3) │
└──────────────┘
Security Architecture
-
Authentication Flow
- JWT-based authentication
- Social authentication integration
- Session management
- Permission-based access control
-
Data Protection
- Input validation
- XSS prevention
- CSRF protection
- SQL injection prevention
Deployment Model
Production Environment
├── Application Server (Daphne/ASGI)
├── Database (PostgreSQL)
├── Cache/Message Broker (Redis)
├── Static Files (WhiteNoise)
└── Media Storage (Filesystem/S3)
Development Environment
├── Local Django Server
├── Local PostgreSQL
├── Local Redis
└── Local File Storage
Monitoring and Scaling
-
Performance Monitoring
- Page load metrics
- Database query analysis
- Cache hit rates
- API response times
-
Scaling Strategy
- Horizontal scaling of web servers
- Database read replicas
- Cache layer expansion
- Media CDN integration
Integration Points
-
External Services
- Email service (ForwardEmail.net)
- Social authentication providers
- Geographic data services
- Media processing services
-
Internal Services
- WebSocket notifications
- Background tasks
- Media processing
- Analytics processing
System Requirements
Minimum Requirements
- Python 3.11+
- PostgreSQL 13+
- Redis 6+
- Node.js 18+ (for frontend builds)
Development Tools
- black (code formatting)
- flake8 (linting)
- pytest (testing)
- tailwind CLI (CSS processing)