# Motorcycle Adventure Community A Flask-based web application for motorcycle enthusiasts featuring adventure stories, route sharing, and accommodation recommendations. ## Features - **Landing Page**: Hero section with call-to-action, featured adventures, and accommodation promotion - **User Authentication**: Registration and login system with Flask-Login - **Community Section**: Share stories, tracks, and experiences - **Admin Panel**: Content management for administrators - **Responsive Design**: Built with Tailwind CSS for mobile-first design - **Error Handling**: Custom 404 and 500 error pages ## Technology Stack - **Backend**: Python Flask 3.0.0 - **Database**: SQLAlchemy with PostgreSQL support - **Authentication**: Flask-Login - **Email**: Flask-Mail - **Forms**: WTForms with validation - **Styling**: Tailwind CSS (CDN) - **Deployment**: Docker with Gunicorn ## Project Structure ``` / ├── app/ │ ├── __init__.py # Flask app factory │ ├── models.py # Database models │ ├── forms.py # WTForm definitions │ ├── routes/ # Route blueprints │ │ ├── main.py # Main routes (index, about) │ │ ├── auth.py # Authentication routes │ │ └── community.py # Community features │ ├── templates/ # Jinja2 templates │ │ ├── base.html # Base template │ │ ├── index.html # Landing page │ │ ├── auth/ # Auth templates │ │ └── errors/ # Error pages │ └── static/ # Static assets │ ├── favicon.ico │ └── images/ ├── config.py # Application configuration ├── requirements.txt # Python dependencies ├── run.py # Application entry point ├── Dockerfile # Docker configuration └── docker-compose.yml # Docker Compose setup ``` ## Quick Start ### Local Development 1. **Clone the repository** ```bash git clone cd motorcycle-adventure-community ``` 2. **Create virtual environment** ```bash python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate ``` 3. **Install dependencies** ```bash pip install -r requirements.txt ``` 4. **Set environment variables** ```bash export FLASK_APP=run.py export FLASK_ENV=development export SECRET_KEY="your-secret-key-here" export DATABASE_URL="sqlite:///motorcycle_adventures.db" ``` 5. **Initialize database** ```bash flask db init flask db migrate -m "Initial migration" flask db upgrade ``` 6. **Run the application** ```bash python run.py ``` ### Docker Deployment 1. **Build and run with Docker Compose** ```bash docker-compose up --build ``` 2. **Access the application** - Web application: http://localhost:5000 - PostgreSQL database: localhost:5432 ## Configuration The application supports multiple environments through environment variables: - `FLASK_ENV`: development, testing, production - `SECRET_KEY`: Flask secret key for sessions - `DATABASE_URL`: Database connection string - `MAIL_SERVER`: SMTP server for email - `MAIL_USERNAME`: Email username - `MAIL_PASSWORD`: Email password ## Features Overview ### Landing Page - Hero section with stunning mountain panorama background - Call-to-action for adventure community - Featured adventures showcase - Pensiune BuonGusto accommodation promotion ### Authentication System - User registration with email validation - Secure login/logout functionality - Password hashing with Werkzeug - Session management with Flask-Login ### Community Features - Story and track sharing - User profiles - Image uploads for adventures - GPX file support for route sharing - Comment system - Like/rating system ### Admin Panel - User management - Content moderation - Analytics dashboard - System configuration ## Contributing 1. Fork the repository 2. Create a feature branch (`git checkout -b feature/amazing-feature`) 3. Commit your changes (`git commit -m 'Add some amazing feature'`) 4. Push to the branch (`git push origin feature/amazing-feature`) 5. Open a Pull Request ## License This project is licensed under the MIT License - see the LICENSE file for details. ## Acknowledgments - Beautiful Transalpina panorama background image - Tailwind CSS for responsive design - Flask community for excellent documentation - Bootstrap icons for UI elements