# 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 and server interactions
   - Partial rendering and progressive enhancement
   - Server-side processing and form handling
   - See frontendArchitecture.md for detailed implementation

2. AlpineJS
   - UI state management and reactivity
   - Component behavior and lifecycle
   - Event handling and DOM manipulation
   - See frontendArchitecture.md for component patterns

3. Tailwind CSS
   - Utility-first styling with custom configuration
   - Component design system
   - Responsive layouts and dark mode support
   - See frontendArchitecture.md for styling guide

## 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 with custom configuration
   - Theme system with light/dark mode support
   - Component-specific style patterns
   - See frontendArchitecture.md for complete styling guide

2. JavaScript
   - AlpineJS for reactive components
   - HTMX for server interactions
   - Location autocomplete system
   - Alert and modal components
   - See frontendArchitecture.md for component documentation

3. UI Components
   - Form elements and validation
   - Navigation and menus
   - Status indicators and badges
   - Modal and alert system
   - See frontendArchitecture.md for implementation details

## 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 React/Vue/Angular)
   - Progressive enhancement approach required
   - Must support latest 2 versions of major browsers
   - See frontendArchitecture.md for detailed browser support
   - Performance targets:
     * First contentful paint < 1.5s
     * Time to interactive < 2s
     * Core Web Vitals compliance

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
