# Kobelly Base website A professional Flask-based website that will be used to create websites for small businesses. This is the base set of files all websites will build off. Features multilanguage support (English, Dutch, French, German) with a simple JSON-based translation system and is fully dockerized for easy deployment. ## Features - π **Multilanguage Support**: English (EN), Dutch (NL), French (FR), German (DE) with JSON-based translations - π± **Responsive Design**: Modern, mobile-friendly interface - π¨ **Professional UI**: Clean, modern design with Bootstrap 5 - π³ **Docker Support**: Easy containerization and deployment - β‘ **Fast Performance**: Optimized for speed and performance with minified assets - π§ **No Database Required**: Simple, lightweight setup - π **Asset Optimization**: CSS/JS minification with cache busting - π§ **Contact Form**: Fully functional email contact form - πΊοΈ **SEO Optimized**: Sitemap generation and robots.txt ## Pages - **Home**: Hero section and other elements to promote a business - **Services**: Detailed service offerings with pricing information - **About**: Company story, team, and values - **Contact**: Contact form and business information ## Quick Start ### Local Development (Recommended) 1. **Install Python dependencies:** ```bash pip install -r requirements.txt ``` 2. **Build assets (optional, for production-like experience):** ```bash make build ``` 3. **Run the application:** ```bash python app.py ``` 4. **Access the website:** Open your browser and go to `http://localhost:5000` ### Using Make Commands The project includes a Makefile for common tasks: ```bash make help # Show all available commands make install # Install dependencies make build # Build minified assets make clean # Clean old assets make run # Run development server make run-prod # Run production server make deploy # Clean and build assets make dev-setup # Setup development environment # Docker commands make docker-run # Run production Docker container make docker-run-dev # Run development Docker container make docker-stop # Stop production container make docker-stop-dev # Stop development container make docker-logs # View production logs make docker-logs-dev # View development logs ``` ### Docker Deployment #### Production Mode (Default) 1. **Build and run with Docker Compose:** ```bash docker-compose up --build ``` 2. **Or build and run manually:** ```bash docker build -t kobelly-website . docker run -p 5000:5000 kobelly-website ``` #### Development Mode For local development with Docker (with live reload and debug mode): 1. **Build and run development container:** ```bash docker-compose -f docker-compose.dev.yml up --build ``` 2. **Or use Make commands:** ```bash make docker-run-dev # Start development container make docker-logs-dev # View development logs make docker-stop-dev # Stop development container ``` **Development vs Production:** - **Development**: Debug mode enabled, live code reloading, unminified assets - **Production**: Debug disabled, minified assets, optimized performance ## Project Structure ``` Kobelly/ βββ app.py # Main Flask application βββ requirements.txt # Python dependencies βββ Dockerfile # Docker configuration βββ docker-compose.yml # Docker Compose configuration βββ docker-compose.dev.yml # Development Docker Compose βββ Makefile # Build and deployment commands βββ build_assets.py # Asset minification script βββ translation_manager.py # JSON-based translation system βββ test_translations.py # Translation testing script βββ robots.txt # Search engine configuration βββ static/ # Static assets β βββ css/ # CSS files β β βββ main.css # Main stylesheet β β βββ main.min.css # Minified CSS (generated) β βββ js/ # JavaScript files β β βββ main.js # Main script β β βββ main.min.js # Minified JS (generated) β βββ images/ # Images and icons βββ templates/ # HTML templates β βββ base.html # Base template with navigation β βββ index.html # Homepage β βββ services.html # Services page β βββ about.html # About page β βββ contact.html # Contact page β βββ components/ # Reusable template components β βββ hero_section.html β βββ cta_section.html βββ translations/ # JSON translation files βββ en.json # English translations βββ nl.json # Dutch translations βββ fr.json # French translations βββ de.json # German translations ``` ## Multilanguage Support The website supports four languages using a simple JSON-based translation system: - πΊπΈ **English** (EN) - Default - π³π± **Dutch** (NL) - π«π· **French** (FR) - π©πͺ **German** (DE) Users can switch languages using the language selector in the navigation bar or URL parameters (`?lang=de`). The language preference is stored in the session. ### Translation System The project uses a custom JSON-based translation system that: - **No compilation needed** - Just edit JSON files directly - **Real-time updates** - Changes appear immediately after restart - **Simple maintenance** - Clear JSON structure - **Independent languages** - Edit English without breaking translations ### Adding New Translations 1. **Add the string to your template:** ```html