- Replace Next.js/React implementation with Python Flask - Add colorful blue-purple-teal gradient theme replacing red design - Integrate logo and Transalpina panoramic background image - Implement complete authentication system with Flask-Login - Add community features for stories and tracks sharing - Create responsive design with Tailwind CSS - Add error handling with custom 404/500 pages - Include Docker deployment configuration - Add favicon support and proper SEO structure - Update content for Pensiune BuonGusto accommodation - Remove deprecated Next.js files and dependencies Features: ✅ Landing page with hero section and featured content ✅ User registration and login system ✅ Community section for adventure sharing ✅ Admin panel for content management ✅ Responsive mobile-first design ✅ Docker containerization with PostgreSQL ✅ Email integration with Flask-Mail ✅ Form validation with WTForms ✅ SQLAlchemy database models ✅ Error pages and favicon handling
4.5 KiB
4.5 KiB
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
-
Clone the repository
git clone <repository-url> cd motorcycle-adventure-community -
Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install dependencies
pip install -r requirements.txt -
Set environment variables
export FLASK_APP=run.py export FLASK_ENV=development export SECRET_KEY="your-secret-key-here" export DATABASE_URL="sqlite:///motorcycle_adventures.db" -
Initialize database
flask db init flask db migrate -m "Initial migration" flask db upgrade -
Run the application
python run.py
Docker Deployment
-
Build and run with Docker Compose
docker-compose up --build -
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, productionSECRET_KEY: Flask secret key for sessionsDATABASE_URL: Database connection stringMAIL_SERVER: SMTP server for emailMAIL_USERNAME: Email usernameMAIL_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
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - 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