mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 02:31:08 -05:00
[Documentation] Create context documentation system
- 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
This commit is contained in:
60
cline_docs/activeContext.md
Normal file
60
cline_docs/activeContext.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# Active Context
|
||||
|
||||
## Current Focus
|
||||
- Moderation system development and enhancement
|
||||
- Dashboard interface improvements
|
||||
- Submission review workflow
|
||||
|
||||
## Recent Changes
|
||||
Working on moderation system components:
|
||||
- Dashboard interface
|
||||
- Submission list views
|
||||
- Moderation navigation
|
||||
- Content review workflow
|
||||
|
||||
## Active Files
|
||||
|
||||
### Moderation System
|
||||
- moderation/models.py
|
||||
- moderation/urls.py
|
||||
- moderation/views.py
|
||||
- templates/moderation/dashboard.html
|
||||
- templates/moderation/partials/
|
||||
- submission_list.html
|
||||
- moderation_nav.html
|
||||
- dashboard_content.html
|
||||
|
||||
## Next Steps
|
||||
1. Review and enhance moderation dashboard functionality
|
||||
2. Implement remaining submission review workflows
|
||||
3. Test moderation system end-to-end
|
||||
4. Document moderation patterns and guidelines
|
||||
|
||||
## Current Development State
|
||||
- Using Django for backend framework
|
||||
- HTMX for dynamic interactions
|
||||
- AlpineJS for client-side functionality
|
||||
- Tailwind CSS for styling
|
||||
- Python manage.py tailwind runserver for development
|
||||
|
||||
## Testing Requirements
|
||||
- Verify all moderation workflows
|
||||
- Test submission review process
|
||||
- Validate user role permissions
|
||||
- Check notification systems
|
||||
|
||||
## Deployment Notes
|
||||
- Site runs at http://thrillwiki.com
|
||||
- Changes must be committed to git and pushed to main
|
||||
- HTMX templates located in partials folders by model
|
||||
|
||||
## Active Issues/Considerations
|
||||
- Ensure proper separation of moderation partials
|
||||
- Maintain consistent HTMX patterns
|
||||
- Follow established Git workflow
|
||||
- Keep documentation updated
|
||||
|
||||
## Recent Decisions
|
||||
- Using partial templates for modular HTMX components
|
||||
- Implementing dedicated moderation dashboard
|
||||
- Structured submission review process
|
||||
199
cline_docs/developmentWorkflow.md
Normal file
199
cline_docs/developmentWorkflow.md
Normal file
@@ -0,0 +1,199 @@
|
||||
# Development Workflow
|
||||
|
||||
## Development Process
|
||||
|
||||
### Local Development
|
||||
1. Server Management
|
||||
```bash
|
||||
python manage.py tailwind runserver # Required command for local development
|
||||
```
|
||||
|
||||
2. URL Access
|
||||
- Production: http://thrillwiki.com
|
||||
- Avoid using localhost
|
||||
|
||||
### Code Organization
|
||||
|
||||
1. Template Structure
|
||||
- Base templates in templates/
|
||||
- HTMX partials in model-specific partials/ folders
|
||||
- Consistent naming conventions
|
||||
- Reusable components
|
||||
|
||||
2. Feature Development
|
||||
- Model changes
|
||||
- URL configuration
|
||||
- View implementation
|
||||
- Template creation
|
||||
- HTMX/AlpineJS integration
|
||||
|
||||
### Git Workflow
|
||||
|
||||
1. Version Control
|
||||
- All changes must be committed
|
||||
- Detailed commit messages required
|
||||
- Push directly to main branch
|
||||
- Regular commits for trackability
|
||||
|
||||
2. Commit Message Format
|
||||
```
|
||||
[Component] Brief description of change
|
||||
|
||||
- Detailed bullet points of changes
|
||||
- Impact on other components
|
||||
- Testing performed
|
||||
```
|
||||
|
||||
## Testing Patterns
|
||||
|
||||
### Test Structure
|
||||
- tests/ directory for test files
|
||||
- Coverage tracking (.coverage)
|
||||
- README.md in tests/ for documentation
|
||||
- test_runner.py for custom configurations
|
||||
|
||||
### Testing Requirements
|
||||
1. Functionality Testing
|
||||
- Core features
|
||||
- Edge cases
|
||||
- Error conditions
|
||||
- User workflows
|
||||
|
||||
2. Integration Testing
|
||||
- Cross-component functionality
|
||||
- External service integration
|
||||
- Database operations
|
||||
- Cache behavior
|
||||
|
||||
3. UI Testing
|
||||
- HTMX interactions
|
||||
- AlpineJS functionality
|
||||
- Responsive design
|
||||
- Browser compatibility
|
||||
|
||||
### Testing Guidelines
|
||||
- Write tests for new features
|
||||
- Update tests for modifications
|
||||
- Maintain test coverage
|
||||
- Document test scenarios
|
||||
|
||||
## Release Process
|
||||
|
||||
### Pre-Release Checklist
|
||||
1. Code Quality
|
||||
- All tests passing
|
||||
- Coverage maintained
|
||||
- Linting clean
|
||||
- Documentation updated
|
||||
|
||||
2. Feature Verification
|
||||
- Core functionality tested
|
||||
- HTMX interactions verified
|
||||
- AlpineJS behavior confirmed
|
||||
- Cross-browser testing
|
||||
|
||||
### Deployment Steps
|
||||
1. Code Preparation
|
||||
- Commit all changes
|
||||
- Push to main branch
|
||||
- Verify build success
|
||||
|
||||
2. Post-Deployment
|
||||
- Verify site functionality
|
||||
- Check error logs
|
||||
- Monitor performance
|
||||
- Validate new features
|
||||
|
||||
## Project Standards
|
||||
|
||||
### Code Style
|
||||
1. Python
|
||||
- Follow PEP 8
|
||||
- Use type hints
|
||||
- Document functions
|
||||
- Clear variable names
|
||||
|
||||
2. Templates
|
||||
- Consistent indentation
|
||||
- Organized partial templates
|
||||
- Clear component structure
|
||||
- Documented HTMX attributes
|
||||
|
||||
3. JavaScript
|
||||
- AlpineJS best practices
|
||||
- Clean function names
|
||||
- Documented interactions
|
||||
- Minimal complexity
|
||||
|
||||
### Documentation Requirements
|
||||
1. Code Documentation
|
||||
- Docstrings for Python code
|
||||
- Comment complex logic
|
||||
- Update README files
|
||||
- Maintain context files
|
||||
|
||||
2. Template Documentation
|
||||
- Document HTMX patterns
|
||||
- Explain AlpineJS usage
|
||||
- Note partial dependencies
|
||||
- Document data requirements
|
||||
|
||||
### Best Practices
|
||||
1. HTMX Usage
|
||||
- Partial templates in dedicated folders
|
||||
- Clear target attributes
|
||||
- Documented triggers
|
||||
- Error handling
|
||||
|
||||
2. AlpineJS Integration
|
||||
- Minimal state management
|
||||
- Clear x-data structures
|
||||
- Documented behaviors
|
||||
- Progressive enhancement
|
||||
|
||||
3. Django Patterns
|
||||
- Clear view logic
|
||||
- Optimized queries
|
||||
- Proper model relationships
|
||||
- Efficient template inheritance
|
||||
|
||||
## Quality Assurance
|
||||
|
||||
### Code Review Process
|
||||
1. Self-Review
|
||||
- Test coverage
|
||||
- Documentation
|
||||
- Code standards
|
||||
- Performance impact
|
||||
|
||||
2. Testing Requirements
|
||||
- Local verification
|
||||
- Production testing
|
||||
- Error handling
|
||||
- Edge cases
|
||||
|
||||
### Performance Standards
|
||||
1. Page Load
|
||||
- Optimize queries
|
||||
- Minimize requests
|
||||
- Efficient templates
|
||||
- Proper caching
|
||||
|
||||
2. Interaction Speed
|
||||
- Quick HTMX responses
|
||||
- Smooth transitions
|
||||
- Responsive UI
|
||||
- Error feedback
|
||||
|
||||
### Maintenance
|
||||
1. Regular Tasks
|
||||
- Update dependencies
|
||||
- Review error logs
|
||||
- Monitor performance
|
||||
- Update documentation
|
||||
|
||||
2. Code Health
|
||||
- Refactor as needed
|
||||
- Remove unused code
|
||||
- Update patterns
|
||||
- Maintain standards
|
||||
215
cline_docs/operationalContext.md
Normal file
215
cline_docs/operationalContext.md
Normal file
@@ -0,0 +1,215 @@
|
||||
# Operational Context
|
||||
|
||||
## System Runtime
|
||||
|
||||
### Production Environment
|
||||
- Production URL: http://thrillwiki.com
|
||||
- Django-based web application
|
||||
- WSGI deployment
|
||||
- Static file serving via staticfiles/
|
||||
|
||||
### Development Environment
|
||||
- Command: python manage.py tailwind runserver
|
||||
- Local development setup
|
||||
- Debug mode configurations
|
||||
- Development-specific settings
|
||||
|
||||
## Error Handling Patterns
|
||||
|
||||
### Application Errors
|
||||
1. Django Error Pages
|
||||
- 404.html for not found
|
||||
- 500.html for server errors
|
||||
- Custom error templates
|
||||
- User-friendly messages
|
||||
|
||||
2. HTMX Error Handling
|
||||
- Partial template errors
|
||||
- Response status codes
|
||||
- Error feedback in UI
|
||||
- Graceful degradation
|
||||
|
||||
3. Form Validation
|
||||
- Server-side validation
|
||||
- Client-side checks
|
||||
- Error message display
|
||||
- Field-level feedback
|
||||
|
||||
### System Monitoring
|
||||
1. Error Tracking
|
||||
- Django logging
|
||||
- Error reporting
|
||||
- Performance monitoring
|
||||
- User feedback collection
|
||||
|
||||
2. Performance Metrics
|
||||
- Page load times
|
||||
- Database query performance
|
||||
- Media processing speed
|
||||
- API response times
|
||||
|
||||
## Infrastructure Details
|
||||
|
||||
### File Storage
|
||||
1. Media Handling
|
||||
- Upload directory structure
|
||||
- Media processing pipeline
|
||||
- Storage backend configuration
|
||||
- File type validation
|
||||
|
||||
2. Static Files
|
||||
- Collected to staticfiles/
|
||||
- CSS organization
|
||||
- JavaScript structure
|
||||
- Image optimization
|
||||
|
||||
### Database Operations
|
||||
1. Query Optimization
|
||||
- Indexed fields
|
||||
- Efficient joins
|
||||
- Cached queries
|
||||
- Bulk operations
|
||||
|
||||
2. Data Integrity
|
||||
- Foreign key constraints
|
||||
- Validation rules
|
||||
- Transaction management
|
||||
- Backup procedures
|
||||
|
||||
### Caching Strategy
|
||||
1. Template Caching
|
||||
- Fragment caching
|
||||
- Page caching
|
||||
- Query caching
|
||||
- Cache invalidation
|
||||
|
||||
2. Static Asset Caching
|
||||
- Browser caching
|
||||
- CDN configuration
|
||||
- Cache headers
|
||||
- Version control
|
||||
|
||||
## Performance Requirements
|
||||
|
||||
### Response Times
|
||||
1. Page Load
|
||||
- Initial load < 2s
|
||||
- HTMX updates < 500ms
|
||||
- API responses < 200ms
|
||||
- Media loading optimized
|
||||
|
||||
2. Interactive Elements
|
||||
- UI feedback < 100ms
|
||||
- Form submission < 1s
|
||||
- Search results < 500ms
|
||||
- Media upload feedback
|
||||
|
||||
### Resource Usage
|
||||
1. Server Resources
|
||||
- CPU utilization
|
||||
- Memory management
|
||||
- Disk space monitoring
|
||||
- Network bandwidth
|
||||
|
||||
2. Client Resources
|
||||
- JavaScript performance
|
||||
- DOM updates
|
||||
- Memory usage
|
||||
- Network requests
|
||||
|
||||
### Scalability Considerations
|
||||
1. Database Scaling
|
||||
- Connection pooling
|
||||
- Query optimization
|
||||
- Index management
|
||||
- Partition strategy
|
||||
|
||||
2. Application Scaling
|
||||
- Request handling
|
||||
- Worker processes
|
||||
- Cache distribution
|
||||
- Load balancing
|
||||
|
||||
## Security Implementation
|
||||
|
||||
### Authentication
|
||||
1. User Management
|
||||
- Django authentication
|
||||
- Session handling
|
||||
- Password policies
|
||||
- Account recovery
|
||||
|
||||
2. Access Control
|
||||
- Permission system
|
||||
- Role-based access
|
||||
- View restrictions
|
||||
- API security
|
||||
|
||||
### Data Protection
|
||||
1. Input Validation
|
||||
- Form validation
|
||||
- File upload checks
|
||||
- XSS prevention
|
||||
- CSRF protection
|
||||
|
||||
2. Data Privacy
|
||||
- User data handling
|
||||
- Content visibility
|
||||
- Access logging
|
||||
- Data retention
|
||||
|
||||
## Maintenance Procedures
|
||||
|
||||
### Regular Tasks
|
||||
1. System Updates
|
||||
- Security patches
|
||||
- Dependency updates
|
||||
- Feature deployments
|
||||
- Configuration changes
|
||||
|
||||
2. Monitoring
|
||||
- Error tracking
|
||||
- Performance metrics
|
||||
- User activity
|
||||
- Resource usage
|
||||
|
||||
### Backup Procedures
|
||||
1. Data Backups
|
||||
- Database dumps
|
||||
- Media files
|
||||
- Configuration
|
||||
- User content
|
||||
|
||||
2. Recovery Plans
|
||||
- Restore procedures
|
||||
- Failover options
|
||||
- Emergency contacts
|
||||
- Incident response
|
||||
|
||||
## Integration Points
|
||||
|
||||
### External Services
|
||||
1. Email Service
|
||||
- Sending configuration
|
||||
- Template management
|
||||
- Queue handling
|
||||
- Delivery tracking
|
||||
|
||||
2. Analytics
|
||||
- Data collection
|
||||
- Event tracking
|
||||
- Performance monitoring
|
||||
- User behavior analysis
|
||||
|
||||
### Internal Services
|
||||
1. Media Processing
|
||||
- Upload handling
|
||||
- Image processing
|
||||
- File validation
|
||||
- Storage management
|
||||
|
||||
2. Search System
|
||||
- Index management
|
||||
- Query optimization
|
||||
- Result ranking
|
||||
- Filter implementation
|
||||
86
cline_docs/productContext.md
Normal file
86
cline_docs/productContext.md
Normal file
@@ -0,0 +1,86 @@
|
||||
# Product Context
|
||||
|
||||
## Why We're Building This
|
||||
ThrillWiki is a comprehensive platform for theme park enthusiasts to:
|
||||
- Discover and explore theme parks and rides worldwide
|
||||
- Share and access authentic reviews and experiences
|
||||
- Track ride and park information
|
||||
- Contribute to a moderated, high-quality knowledge base
|
||||
|
||||
## Core User Problems/Solutions
|
||||
|
||||
### For Park Enthusiasts
|
||||
Problem: Difficulty finding accurate, comprehensive theme park information
|
||||
Solution: Centralized, moderated platform with verified park/ride data
|
||||
|
||||
### For Reviewers
|
||||
Problem: No dedicated platform for sharing detailed ride experiences
|
||||
Solution: Structured review system with rich media support
|
||||
|
||||
### For Park Operators
|
||||
Problem: Limited channels for authentic presence and information
|
||||
Solution: Verified company profiles and official park information
|
||||
|
||||
## Key Workflows
|
||||
|
||||
1. Park Discovery & Information
|
||||
- Browse parks by location
|
||||
- View detailed park information
|
||||
- Access operating hours and details
|
||||
|
||||
2. Ride Management
|
||||
- Comprehensive ride database
|
||||
- Technical specifications
|
||||
- Historical information
|
||||
- Designer attribution
|
||||
|
||||
3. Review System
|
||||
- User-generated reviews
|
||||
- Media attachments
|
||||
- Rating system
|
||||
- Moderation workflow
|
||||
|
||||
4. Content Moderation
|
||||
- Submission review process
|
||||
- Quality control
|
||||
- Content verification
|
||||
- User management
|
||||
|
||||
5. Location Services
|
||||
- Geographic search
|
||||
- Park proximity
|
||||
- Regional categorization
|
||||
|
||||
## Product Direction and Priorities
|
||||
|
||||
### Current Focus
|
||||
1. Content Quality
|
||||
- Strong moderation system
|
||||
- Verified information
|
||||
- Rich media support
|
||||
|
||||
2. User Trust
|
||||
- Review authenticity
|
||||
- Company verification
|
||||
- Expert contributions
|
||||
|
||||
3. Data Completeness
|
||||
- Comprehensive park coverage
|
||||
- Detailed ride information
|
||||
- Historical records
|
||||
|
||||
### Future Priorities
|
||||
1. Community Engagement
|
||||
- Enhanced user profiles
|
||||
- Contribution recognition
|
||||
- Expert designations
|
||||
|
||||
2. Analytics Integration
|
||||
- Usage patterns
|
||||
- Content quality metrics
|
||||
- User engagement tracking
|
||||
|
||||
3. Media Enhancement
|
||||
- Improved image handling
|
||||
- Video integration
|
||||
- Virtual tours
|
||||
183
cline_docs/projectBoundaries.md
Normal file
183
cline_docs/projectBoundaries.md
Normal file
@@ -0,0 +1,183 @@
|
||||
# Project Boundaries
|
||||
|
||||
## Technical Constraints
|
||||
|
||||
### Framework Constraints
|
||||
1. Django Framework
|
||||
- MVT architecture
|
||||
- ORM limitations
|
||||
- Template system bounds
|
||||
- URL routing patterns
|
||||
|
||||
2. Frontend Technologies
|
||||
- HTMX for dynamic updates
|
||||
- AlpineJS for UI state
|
||||
- No React/Vue allowed
|
||||
- Progressive enhancement
|
||||
|
||||
### Development Constraints
|
||||
1. Version Control
|
||||
- Direct pushes to main branch
|
||||
- Git-based workflow
|
||||
- Detailed commit messages
|
||||
- No branch strategy
|
||||
|
||||
2. Testing Requirements
|
||||
- Test coverage maintenance
|
||||
- Integration testing
|
||||
- UI verification
|
||||
- Performance testing
|
||||
|
||||
## Scale Requirements
|
||||
|
||||
### Data Scale
|
||||
1. Content Volume
|
||||
- Park entries
|
||||
- Ride listings
|
||||
- User reviews
|
||||
- Media assets
|
||||
- Historical records
|
||||
|
||||
2. User Scale
|
||||
- Concurrent users
|
||||
- Active sessions
|
||||
- Authentication load
|
||||
- Permission checks
|
||||
|
||||
### Performance Scale
|
||||
1. Response Times
|
||||
- Page load limits
|
||||
- HTMX update speed
|
||||
- API response times
|
||||
- Media loading
|
||||
|
||||
2. Resource Usage
|
||||
- Database connections
|
||||
- Memory utilization
|
||||
- CPU boundaries
|
||||
- Storage limits
|
||||
|
||||
## Hard Limitations
|
||||
|
||||
### Technical Limitations
|
||||
1. Frontend
|
||||
- No client-side routing
|
||||
- Server-side rendering required
|
||||
- HTMX/AlpineJS only
|
||||
- No additional JS frameworks
|
||||
|
||||
2. Backend
|
||||
- Django ORM constraints
|
||||
- Template rendering limits
|
||||
- Request/response cycle
|
||||
- Authentication flow
|
||||
|
||||
### Infrastructure Limitations
|
||||
1. Deployment
|
||||
- Single production URL
|
||||
- Static file handling
|
||||
- Media storage bounds
|
||||
- Cache limitations
|
||||
|
||||
2. Processing
|
||||
- Query complexity
|
||||
- Batch processing
|
||||
- Background tasks
|
||||
- Concurrent operations
|
||||
|
||||
## Non-Negotiables
|
||||
|
||||
### Development Standards
|
||||
1. Code Organization
|
||||
- HTMX partials in model folders
|
||||
- Clear file structure
|
||||
- Documentation requirements
|
||||
- Testing standards
|
||||
|
||||
2. Process Requirements
|
||||
- Production URL usage
|
||||
- Tailwind development server
|
||||
- Git commit standards
|
||||
- Documentation updates
|
||||
|
||||
### Technical Requirements
|
||||
1. Frontend Implementation
|
||||
- Server-side rendering
|
||||
- HTMX for dynamics
|
||||
- AlpineJS for state
|
||||
- Tailwind for styling
|
||||
|
||||
2. Backend Implementation
|
||||
- Django views
|
||||
- Model organization
|
||||
- URL structure
|
||||
- Template hierarchy
|
||||
|
||||
### Quality Standards
|
||||
1. Code Quality
|
||||
- Test coverage
|
||||
- Documentation
|
||||
- Performance metrics
|
||||
- Error handling
|
||||
|
||||
2. User Experience
|
||||
- Response times
|
||||
- Error feedback
|
||||
- UI consistency
|
||||
- Accessibility
|
||||
|
||||
## Implementation Boundaries
|
||||
|
||||
### Feature Limitations
|
||||
1. Content Management
|
||||
- Moderation workflow
|
||||
- Media handling
|
||||
- User permissions
|
||||
- Version control
|
||||
|
||||
2. User Interaction
|
||||
- Authentication flow
|
||||
- Review system
|
||||
- Rating limits
|
||||
- Content creation
|
||||
|
||||
### Security Boundaries
|
||||
1. Authentication
|
||||
- Session management
|
||||
- Password requirements
|
||||
- Access control
|
||||
- Role limitations
|
||||
|
||||
2. Data Protection
|
||||
- Input validation
|
||||
- Content filtering
|
||||
- Privacy controls
|
||||
- Data access
|
||||
|
||||
## Growth Limitations
|
||||
|
||||
### Scalability Bounds
|
||||
1. Database Growth
|
||||
- Table size limits
|
||||
- Index boundaries
|
||||
- Query complexity
|
||||
- Connection pools
|
||||
|
||||
2. Content Expansion
|
||||
- Storage capacity
|
||||
- Media limitations
|
||||
- Archive strategy
|
||||
- Backup constraints
|
||||
|
||||
### Feature Expansion
|
||||
1. Integration Limits
|
||||
- External services
|
||||
- API endpoints
|
||||
- Third-party tools
|
||||
- Plugin system
|
||||
|
||||
2. Functionality Bounds
|
||||
- Core features
|
||||
- Extension points
|
||||
- Module limits
|
||||
- Plugin architecture
|
||||
143
cline_docs/systemPatterns.md
Normal file
143
cline_docs/systemPatterns.md
Normal file
@@ -0,0 +1,143 @@
|
||||
# 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
|
||||
254
cline_docs/techContext.md
Normal file
254
cline_docs/techContext.md
Normal file
@@ -0,0 +1,254 @@
|
||||
# Technical Context
|
||||
|
||||
## Core Technologies
|
||||
|
||||
### Backend Framework
|
||||
1. Django
|
||||
- MVT architecture
|
||||
- ORM for data management
|
||||
- Template system
|
||||
- URL routing
|
||||
- Form handling
|
||||
- Authentication
|
||||
- Admin interface
|
||||
|
||||
2. Python
|
||||
- Version requirements
|
||||
- Core libraries
|
||||
- Package management
|
||||
- Virtual environments
|
||||
|
||||
### Frontend Technologies
|
||||
1. HTMX
|
||||
- Dynamic updates
|
||||
- Partial rendering
|
||||
- Server-side processing
|
||||
- Progressive enhancement
|
||||
|
||||
2. AlpineJS
|
||||
- UI state management
|
||||
- Component behavior
|
||||
- Event handling
|
||||
- DOM manipulation
|
||||
|
||||
3. Tailwind CSS
|
||||
- Utility-first styling
|
||||
- Component design
|
||||
- Responsive layouts
|
||||
- Custom configuration
|
||||
|
||||
## Integration Patterns
|
||||
|
||||
### Template System
|
||||
1. Base Structure
|
||||
- Base templates
|
||||
- Partial templates by model
|
||||
- Component reuse
|
||||
- Template inheritance
|
||||
|
||||
2. HTMX Integration
|
||||
- Partial updates
|
||||
- Server triggers
|
||||
- Event handling
|
||||
- Response processing
|
||||
|
||||
### Data Flow
|
||||
1. Model Layer
|
||||
- Django ORM
|
||||
- Database schema
|
||||
- Relationships
|
||||
- Validation rules
|
||||
|
||||
2. View Layer
|
||||
- Class-based views
|
||||
- Function views
|
||||
- Mixins
|
||||
- Decorators
|
||||
|
||||
3. Template Layer
|
||||
- Django templates
|
||||
- HTMX partials
|
||||
- AlpineJS components
|
||||
- Tailwind styles
|
||||
|
||||
## Key Libraries/Frameworks
|
||||
|
||||
### Django Extensions
|
||||
1. Core Apps
|
||||
- django.contrib.auth
|
||||
- django.contrib.admin
|
||||
- django.contrib.sessions
|
||||
- django.contrib.messages
|
||||
|
||||
2. Third-Party
|
||||
- django-tailwind
|
||||
- django-htmx
|
||||
- Additional dependencies
|
||||
|
||||
### Frontend Libraries
|
||||
1. CSS Framework
|
||||
- Tailwind CSS
|
||||
- Custom plugins
|
||||
- Theme configuration
|
||||
- Utility classes
|
||||
|
||||
2. JavaScript
|
||||
- AlpineJS core
|
||||
- HTMX library
|
||||
- Utility functions
|
||||
- Custom components
|
||||
|
||||
## Infrastructure Choices
|
||||
|
||||
### Development Environment
|
||||
1. Local Setup
|
||||
- Python environment
|
||||
- Django configuration
|
||||
- Tailwind setup
|
||||
- Development server
|
||||
|
||||
2. Tools
|
||||
- VSCode
|
||||
- Git
|
||||
- Package managers
|
||||
- Development utilities
|
||||
|
||||
### Production Environment
|
||||
1. Hosting
|
||||
- Server requirements
|
||||
- Domain configuration
|
||||
- SSL/TLS setup
|
||||
- Static/media serving
|
||||
|
||||
2. Services
|
||||
- Database hosting
|
||||
- File storage
|
||||
- Email service
|
||||
- Monitoring tools
|
||||
|
||||
## Technical Constraints
|
||||
|
||||
### Development Rules
|
||||
1. Code Standards
|
||||
- Python style guide
|
||||
- Django best practices
|
||||
- Frontend patterns
|
||||
- Documentation requirements
|
||||
|
||||
2. Process Requirements
|
||||
- Git workflow
|
||||
- Testing standards
|
||||
- Review process
|
||||
- Deployment steps
|
||||
|
||||
### Technology Limitations
|
||||
1. Frontend
|
||||
- HTMX/AlpineJS only
|
||||
- No additional frameworks
|
||||
- Browser compatibility
|
||||
- Performance requirements
|
||||
|
||||
2. Backend
|
||||
- Django version constraints
|
||||
- Database limitations
|
||||
- API restrictions
|
||||
- Security requirements
|
||||
|
||||
## Development Environment
|
||||
|
||||
### Local Setup
|
||||
1. Required Software
|
||||
- Python
|
||||
- pip
|
||||
- Git
|
||||
- Node.js (for Tailwind)
|
||||
|
||||
2. Configuration
|
||||
- Environment variables
|
||||
- Development settings
|
||||
- Database setup
|
||||
- Media handling
|
||||
|
||||
### Development Tools
|
||||
1. Editor Setup
|
||||
- VSCode configuration
|
||||
- Extensions
|
||||
- Linting
|
||||
- Formatting
|
||||
|
||||
2. Testing Tools
|
||||
- Django test runner
|
||||
- Coverage tools
|
||||
- Browser testing
|
||||
- Performance testing
|
||||
|
||||
## Version Control
|
||||
|
||||
### Git Configuration
|
||||
1. Repository Structure
|
||||
- Main branch workflow
|
||||
- Commit standards
|
||||
- Push requirements
|
||||
- Version tracking
|
||||
|
||||
2. Process
|
||||
- Commit messages
|
||||
- Code review
|
||||
- Documentation
|
||||
- Deployment
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Python Packages
|
||||
1. Core Dependencies
|
||||
- Django
|
||||
- Database adapters
|
||||
- Utility packages
|
||||
- Testing tools
|
||||
|
||||
2. Development Dependencies
|
||||
- Debug tools
|
||||
- Testing utilities
|
||||
- Documentation generators
|
||||
- Linting tools
|
||||
|
||||
### Frontend Dependencies
|
||||
1. Required Packages
|
||||
- Tailwind CSS
|
||||
- AlpineJS
|
||||
- HTMX
|
||||
- Development tools
|
||||
|
||||
2. Build Tools
|
||||
- Node.js
|
||||
- npm/yarn
|
||||
- Build scripts
|
||||
- Asset compilation
|
||||
|
||||
## Documentation Standards
|
||||
|
||||
### Code Documentation
|
||||
1. Python
|
||||
- Docstrings
|
||||
- Type hints
|
||||
- Comments
|
||||
- README files
|
||||
|
||||
2. Templates
|
||||
- Component documentation
|
||||
- HTMX attributes
|
||||
- AlpineJS directives
|
||||
- Style classes
|
||||
|
||||
### Technical Documentation
|
||||
1. System Documentation
|
||||
- Architecture overview
|
||||
- Setup guides
|
||||
- Deployment process
|
||||
- Maintenance procedures
|
||||
|
||||
2. Developer Guides
|
||||
- Getting started
|
||||
- Best practices
|
||||
- Common patterns
|
||||
- Troubleshooting
|
||||
Reference in New Issue
Block a user