-
Flask Web Application (
app.py)- Main application entry point
- Route definitions and handlers
- User authentication logic
- Database models
- Form validation
-
AI Chatbot (
chatbot.py)- OpenAI integration
- Knowledge base management
- Conversational logic
- Car recommendation engine
-
Authentication (
google_auth.py)- Google OAuth integration
- User account management
-
Database (
instance/carhub.db)- SQLite database with SQLAlchemy ORM
- User, Car, Order, and other models
-
Templates (
templates/)- HTML templates with Jinja2 templating
- Modular components
-
Static Assets (
static/)- CSS styling
- JavaScript functionality
- Media files (videos, 3D models)
- id (Primary Key)
- username
- email (Unique)
- password_hash
- google_id (Optional)
- profile_picture (Optional)
- is_verified (Boolean)
- role (admin/user)
- Other profile fields
- id (Primary Key)
- name
- brand
- model
- year
- price
- category
- description
- image_path
- model_path (3D model)
- video_path
- id (Primary Key)
- user_id (Foreign Key)
- car_id (Foreign Key)
- status (pending/completed/cancelled)
- price
- payment_method
- created_at
- cancellation_fee (Optional)
- FinanceApplication
- UserActivity
- Parts
- Reviews
/- Homepage/cars- Car listing/about- About page/services- Services page/contact- Contact page/inventory- Inventory page
/login- User login/sign_up- User registration/logout- User logout/forgot_password- Password recovery/reset_password/<token>- Password reset/auth/google- Google OAuth
/car-details/<car_name>- Detailed car view/part-details/<part_id>- Detailed part view/product-details/<product_id>- Product details
/profile- User profile/dashboard- User dashboard/edit_profile- Edit user profile/my_orders- User orders
/buy/<car_name>- Initiate purchase/payment- Payment processing/payment-success/<int:order_id>- Payment confirmation/finance- Financing application/finance-success/<int:application_id>- Finance approval/download-invoice/<int:order_id>- Invoice PDF generation
/admin_panel- Admin dashboard/admin_users- User management/admin_orders- Order management/admin_activities- Activity logs
/api/chat- Chatbot conversation/api/chat/recommendations- Car recommendations/api/chat/car-details/<car_name>- Car information
- Password hashing with Werkzeug
- Login session management with Flask-Login
- Password reset via secure tokens
- Google OAuth integration with google-auth
- Flask-Mail integration
- HTML email templates
- Token-based verification
- Error handling
- Multi-step checkout flow
- Status tracking
- Cancellation logic with fee calculation
- PDF invoice generation with ReportLab
- OpenAI API integration
- Context-aware conversations
- Fallback responses when API unavailable
- User-specific personalization
- Three.js integration
- GLB model format
- Camera controls and lighting
- Mobile optimization
- Password hashing
- CSRF protection
- Secure session cookies
- OAuth token validation
- Input validation and sanitization
- SQL injection prevention via ORM
- XSS protection
- Sensitive data encryption
- Role-based permissions
- Route protection with login_required
- User ownership validation
- Base styling (
style.css) - Theme components (
theme.css) - Responsive design
- Dark mode support
- Form validation
- 3D model viewer
- Chatbot interface
- Theme toggling
- Video backgrounds
- 3D models
- Responsive images
- Lazy loading
- Secret key generation
- API keys management
- Email configuration
- Database connection strings
- Initial schema creation
- Migration strategy
- Backup procedures
- Static asset caching
- Database query optimization
- Video compression
- 3D model optimization
- Potential migration to PostgreSQL
- Static content CDN
- API rate limiting
- Clone repository
- Install dependencies
- Configure environment variables
- Initialize database
- Start development server
- PEP 8 Python conventions
- Consistent indentation (4 spaces)
- Descriptive variable names
- Function/class documentation
- Unit tests for core functionality
- Form validation testing
- API endpoint testing
- Authentication flow testing
- Payment gateway integration
- Multi-language support
- Enhanced admin analytics
- Mobile app integration
- Migration to PostgreSQL
- API rate limiting
- Front-end framework integration
- Containerization with Docker
- Image optimization pipeline
- Server-side rendering
- Database indexing
- Query optimization
*Created for CarHub development team *