38 Commits

Author SHA1 Message Date
16cc3fb0ba 🔧 Remove obsolete version attribute from docker-compose.yml
- Remove 'version: 3.8' as it's no longer needed in modern Docker Compose
- Eliminates warning: 'the attribute version is obsolete, it will be ignored'
- Follows current Docker Compose best practices
2025-08-10 09:41:20 +03:00
dc7abe37c2 🧹 Remove old media files from Git tracking
- Remove user-generated GPX files, images, and thumbnails from Git
- These files are now properly excluded via .gitignore
- Files remain on filesystem but are no longer version controlled
- Follows .gitignore update in commit e5eef14
- Keeps repository clean while preserving functionality

Removed old post media from:
- July 2024 posts (post_*_20250724, post_*_20250727)
- User-uploaded GPX files and adventure images
- Auto-generated thumbnail files

These files continue to exist on the server for proper application function.
2025-08-10 09:40:26 +03:00
ske087
ee34215319 🗺️ Fix GPX Route Processing - Add Support for Route Points
Critical Fix for Post Creation:
 Added support for GPX route points (rtept) in addition to track points (trkpt)
 GPX statistics now automatically calculated during post creation
 Supports all GPX file types: tracks, routes, and waypoints

Results:
- Route distance: 347.89 km correctly calculated
- Track points: 16,161 route points processed
- Statistics display properly on post detail pages
- New posts will automatically show route information

Technical Changes:
- Enhanced extract_gpx_statistics() to parse <rte><rtept> elements
- Maintained backward compatibility with track and waypoint files
- Fixed route map card loading during post creation workflow

This resolves the issue where GPX statistics appeared as zeros for route-based GPX files, ensuring all motorcycle adventure routes display proper distance and point statistics immediately upon upload.
2025-08-10 09:35:00 +03:00
ske087
e5eef143fc 📝 Update .gitignore - Exclude user-generated media and data files
- Added app/static/media/posts/ to exclude user-uploaded GPX files and images
- Added data/ directory to exclude database and runtime data
- Cleaned up temporary backup files
- Ensures repository stays clean while preserving application functionality
2025-08-10 09:14:04 +03:00
ske087
5221cf3184 🔧 Fix GPX Statistics and Docker Volume Mapping
Critical Fixes:
🗺️ GPX Statistics Processing:
- Fixed Docker volume mapping from ./static/media to ./app/static/media
- GPX files now properly accessible in container for statistics calculation
- GPS route statistics (distance, elevation, track points) now display correctly
- Added fix_gpx_statistics.py utility script for reprocessing existing GPX files

🐛 Template Fixes:
- Fixed CSRF token undefined error in post_detail.html template
- Resolved 500 errors when accessing community post pages
- Template now uses form.csrf_token instead of csrf_token() function

�� Docker Improvements:
- Corrected volume mounting to ensure GPX file persistence
- Fixed path resolution for media files in containerized environment
- New posts will now properly save and process GPX files

 Verified Functionality:
- Community post pages load successfully (200 OK)
- GPS statistics display correctly (50.1 km distance, 2231 track points)
- Future posts will automatically calculate and display GPX statistics
- Docker container properly syncs with host filesystem

This update ensures the motorcycle adventure platform's GPS tracking and route statistics work reliably in production.
2025-08-10 09:12:19 +03:00
ske087
30bd4c62ad Major Feature Update: Modern Chat System & Admin Management
Features Added:
🔥 Modern Chat System:
- Real-time messaging with modern Tailwind CSS design
- Post-linked discussions for adventure sharing
- Chat categories (general, technical-support, adventure-planning)
- Mobile-responsive interface with gradient backgrounds
- JavaScript polling for live message updates

🎯 Comprehensive Admin Panel:
- Chat room management with merge capabilities
- Password reset system with email templates
- User management with admin controls
- Chat statistics and analytics dashboard
- Room binding to posts and categorization

�� Mobile API Integration:
- RESTful API endpoints at /api/v1/chat
- Session-based authentication for mobile apps
- Comprehensive endpoints for rooms, messages, users
- Mobile app compatibility (React Native, Flutter)

🛠️ Technical Improvements:
- Enhanced database models with ChatRoom categories
- Password reset token system with email verification
- Template synchronization fixes for Docker deployment
- Migration scripts for database schema updates
- Improved error handling and validation

🎨 UI/UX Enhancements:
- Modern card-based layouts matching app design
- Consistent styling across chat and admin interfaces
- Mobile-optimized touch interactions
- Professional gradient designs and glass morphism effects

📚 Documentation:
- Updated README with comprehensive API documentation
- Added deployment instructions for Docker (port 8100)
- Configuration guide for production environments
- Mobile integration examples and endpoints

This update transforms the platform into a comprehensive motorcycle adventure community with modern chat capabilities and professional admin management tools.
2025-08-10 00:22:33 +03:00
ske087
1661f5f588 feat: Complete chat system implementation and password reset enhancement
- Add comprehensive chat system with modern UI design
- Implement admin-based password reset system
- Fix template syntax errors and 500 server errors
- Add chat routes, API endpoints, and database models
- Enhance user interface with Tailwind CSS card-based design
- Implement community guidelines and quick action features
- Add responsive design for mobile and desktop compatibility
- Create support chat functionality with admin integration
- Fix JavaScript inheritance in base template
- Add database migration for chat system tables

Features:
 Modern chat interface with room management
 Admin-based password reset workflow
 Real-time chat with mobile app support
 Professional UI with gradient cards and hover effects
 Community guidelines and safety features
 Responsive design for all devices
 Error-free template rendering
2025-08-09 20:44:25 +03:00
ske087
d1e2b95678 Implement data persistence for safe app updates
- Add external volume mounting for database, uploads, and media files
- Update Dockerfile to conditionally initialize database only if it doesn't exist
- Move database to external /data volume for persistence across rebuilds
- Configure production environment with proper FLASK_CONFIG
- Add volume mappings for complete data persistence:
  * ./data:/data - Database persistence
  * ./uploads:/opt/moto_site/uploads - File uploads persistence
  * ./static/media:/opt/moto_site/static/media - Media files persistence
- Create init script that skips database creation if DB already exists
- Enable safe app updates without losing users, posts, or tracks

This ensures all user data persists across Docker container rebuilds and app updates.
2025-08-09 16:40:49 +03:00
ske087
343b7389e7 Fix GPX route processing to support GPX routes (not just tracks)
- Updated create_map_route_from_gpx function to parse GPX routes
- Added support for <rte> and <rtept> elements in addition to tracks
- This fixes the map not showing routes from GPX files that contain route data instead of track data
- Routes from applications like gpxplanner.app now work correctly
2025-08-09 15:49:26 +03:00
ske087
f2530a1c5b Update edit_post.html to match modern gradient design of new_post.html
- Applied consistent gradient background styling
- Updated form layout to match new_post design
- Modernized UI components with backdrop blur effects
- Enhanced JavaScript functionality for file uploads
- Improved preview modal styling
- Updated button styling to match site theme
2025-08-09 15:34:40 +03:00
ske087
5897ed1cbc Update Dockerfile and docker-compose for /opt/moto_site structure and reliable Docker deployment 2025-07-29 02:16:43 +03:00
ske087
869a032051 Final project state: all changes and cleanup complete 2025-07-27 02:28:02 +03:00
ske087
3775462476 Map: Use standard Leaflet green/red pin icons for GPX route start/end markers in map_iframe_single.html 2025-07-27 02:03:30 +03:00
ske087
a64e206fc8 Map: Use standard Leaflet green/red pin icons for GPX route start/end markers in map_iframe_single.html 2025-07-27 01:29:12 +03:00
ske087
cee3711fd8 Move config.py, create_admin.py, manage_media.py, manage_routes.py to app/utils/ for better organization 2025-07-27 00:29:26 +03:00
ske087
c0739f24a7 Cleanup: Remove unused root static folder and confirm latest auth.py changes 2025-07-27 00:22:48 +03:00
ske087
56c691c330 Cleanup: Remove unused root static folder and confirm latest auth.py changes 2025-07-27 00:19:55 +03:00
ske087
c9c3c80f4f Fix: Gmail SMTP guidance, registration form field, and conditional admin auto-refresh 2025-07-27 00:15:39 +03:00
ske087
377e379883 Finalize mail settings admin UI and Mailrise compatibility 2025-07-26 18:50:42 +03:00
ske087
2a5b5ee468 Fix: ensure deleting a Post cascades to MapRoute, clean up relationships 2025-07-26 16:56:43 +03:00
ske087
5ddde4bd9b Fix: Clean up map_iframe_single.html, remove debug overlay, ensure clean map rendering. 2025-07-26 15:19:52 +03:00
ske087
187254beca feat: Add interactive map functionality with Leaflet.js
- Implemented interactive map card with expand functionality
- Added Leaflet.js integration with OpenStreetMap tiles
- Created expandable map modal (80% screen coverage)
- Fixed cover image display on community page
- Enhanced post detail page with interactive route visualization
- Added proper error handling and fallback content
- Cleaned up JavaScript structure and removed duplicate code
- Updated community index template to use cover images
- Added GPX file processing utilities
- Fixed indentation error in run.py

Map features:
- Country-level positioning (Romania default)
- Zoom controls and interactive navigation
- Test marker with popup functionality
- Expandable full-screen view with X button
- Clean console logging for debugging
- Responsive design with Tailwind CSS styling
2025-07-24 21:36:42 +03:00
ske087
58e5d1b83d feat: Improve adventure story text parsing and keyword extraction
Text Processing Improvements:
- Better separation of keywords from actual story text
- Extract standalone keywords before <br><br> patterns
- Remove keywords from main text display to show only story content
- Handle both **keyword** patterns and standalone keyword lines
- Clean up multiple <br> tags for better formatting

User Experience:
- Keywords now display as tags above story sections
- Story text shows only the narrative content without keyword clutter
- Example: 'Transalpina Ciungetu Stana lui stefan <br><br> Așa am pornit...'
  now shows keywords as tags and only 'Așa am pornit...' as story text
- Better visual separation between metadata and story content

Technical:
- Improved Jinja2 template logic for text parsing
- Added text length and word count heuristics for keyword detection
- Enhanced text cleaning and formatting
- Fixed template syntax errors from previous edits
2025-07-24 19:06:21 +03:00
ske087
f9fcec83d5 fix: Resolve template syntax error in post detail page
- Fix Jinja2 template syntax error on line 180
- Remove duplicate closing div tags that caused template compilation failure
- Clean up HTML structure for proper blog-style layout
- Add test media files for verifying multiple image upload functionality

Blog Layout Features:
- Sequential sections with keywords, text, and images
- Compact photo gallery in sidebar
- Proper section separation with visual hierarchy
- Keywords extracted from **bold** text displayed as tags
- Continuous narrative flow for better storytelling

Technical Fix:
- Resolved 'Encountered unknown tag endif' Jinja2 error
- Fixed mismatched block structure in template
- Ensured proper template compilation and rendering
2025-07-24 17:56:37 +03:00
ske087
d5c8ec1dc2 feat: Redesign post detail page as blog-style adventure story
Major UI/UX improvements for better storytelling:

Story Layout:
- Convert adventure story into blog-style sequential sections
- Extract keywords from **bold** text and display as highlight tags
- Show sections with keywords → text → images flow
- Create continuous narrative experience with section separators

Photo Gallery Enhancement:
- Move photo gallery to compact sidebar widget
- Reduce gallery size to focus attention on story
- Show 2x2 grid with hover effects and cover indicators
- Add 'click to view gallery' hint for better UX

Features:
- Parse content sections separated by double newlines
- Extract **keyword** patterns as section highlights
- Distribute section images across story sections
- Maintain image modal functionality
- Clean, readable typography with proper spacing
- Visual hierarchy that guides reader through adventure

This creates a much more engaging blog-post experience where the story takes center stage and images support the narrative rather than competing for attention.
2025-07-24 17:52:01 +03:00
ske087
8691a6cd2d debug: Add enhanced logging to admin post deletion
- Add detailed logging before and after post deletion
- Track which posts exist before/after deletion operation
- Add error handling and logging for deletion failures
- Investigate reported issue where deleting one post deletes multiple posts
2025-07-24 17:31:27 +03:00
ske087
4fea7a6f49 test: Add sample media files for testing multiple image uploads
- Test post media files to verify image upload functionality
- Includes sample GPX files and images with thumbnails
- Validates the fixed multiple image upload feature
2025-07-24 16:06:33 +03:00
ske087
73b90eafbc fix: Multiple images not saving in new post creation
Problem:
- Only cover image was being saved when creating posts
- Section images were shown in preview but not sent to backend
- File inputs were not preserved after section saving

Solution:
- Store section files in global JavaScript storage
- Send all section images in FormData during form submission
- Update backend to process section_image_* files
- Add is_cover flag distinction between cover and section images
- Preserve file references throughout the editing process

Features:
- Multiple images per post section now work correctly
- Cover image marked with is_cover=True
- Section images marked with is_cover=False
- Proper file cleanup when images are removed
- Enhanced logging for debugging image uploads
2025-07-24 16:03:38 +03:00
ske087
5a6dbc46eb feat: Hide Share Adventure button for admin users
- Remove 'Share Adventure' button from desktop navigation for admin users
- Remove 'New Post' button from mobile menu for admin users
- Admins can still access post creation via admin panel
- Streamlines admin interface to focus on moderation tasks
2025-07-24 15:24:51 +03:00
ske087
1d12a882c1 feat: Remove 'Landing' tab from navigation header
- Remove 'Landing' navigation link from desktop menu
- Streamline navigation to focus on Adventures and Accommodation
- Improve user experience with cleaner navigation structure
2025-07-24 15:20:16 +03:00
ske087
7018ae13f0 feat: Add comprehensive admin user management system
- Add user status toggle (activate/deactivate) functionality
- Add user deletion with post/comment transfer to admin
- Implement safety checks for admin protection
- Add interactive JavaScript for user management actions
- Update admin users interface with action buttons
- Add confirmation dialogs for destructive operations
- Update README with new admin features and capabilities
- Add database migration utility for future updates

Features:
- Toggle user active/inactive status
- Delete users with content preservation
- Transfer all posts/comments to admin on user deletion
- Prevent admin self-modification and deletion
- AJAX-powered interface with real-time feedback
- Comprehensive error handling and user notifications
2025-07-24 03:07:52 +03:00
ske087
60ef02ced9 Major UI/UX redesign and feature enhancements
🎨 Complete Tailwind CSS conversion
- Redesigned post detail page with modern gradient backgrounds
- Updated profile page with consistent design language
- Converted from Bootstrap to Tailwind CSS throughout

 New Features & Improvements
- Enhanced community post management system
- Added admin panel with analytics dashboard
- Improved post creation and editing workflows
- Interactive GPS map integration with Leaflet.js
- Photo gallery with modal view and hover effects
- Adventure statistics and metadata display
- Like system and community engagement features

🔧 Technical Improvements
- Fixed template syntax errors and CSRF token issues
- Updated database models and relationships
- Enhanced media file management
- Improved responsive design patterns
- Added proper error handling and validation

📱 Mobile-First Design
- Responsive grid layouts
- Touch-friendly interactions
- Optimized for all screen sizes
- Modern card-based UI components

🏍️ Adventure Platform Features
- GPS track visualization and statistics
- Photo uploads with thumbnail generation
- GPX file downloads for registered users
- Community comments and discussions
- Post approval workflow for admins
- Difficulty rating system with star indicators
2025-07-24 02:44:25 +03:00
ske087
540eb17e89 Implement organized media folder structure for community posts
- Add media_folder field to Post model for organized file storage
- Create MediaConfig class for centralized media management settings
- Update community routes to use post-specific media folders
- Add thumbnail generation for uploaded images
- Implement structured folder layout: app/static/media/posts/{post_folder}/
- Add utility functions for image and GPX file handling
- Create media management script for migration and maintenance
- Add proper file validation and MIME type checking
- Include routes for serving images, thumbnails, and GPX files
- Maintain backward compatibility with existing uploads
- Add comprehensive documentation and migration tools

Each post now gets its own media folder with subfolders for:
- images/ (with thumbnails/ subfolder)
- gpx/

Post content remains in database for optimal query performance while
media files are organized in dedicated folders for better management.
2025-07-23 18:03:03 +03:00
ske087
6a0548b880 Final cleanup: Complete Flask motorcycle adventure app
- Removed all Node.js/Next.js dependencies and files
- Cleaned up project structure to contain only Flask application
- Updated .gitignore to exclude Python cache files, virtual environments, and development artifacts
- Complete motorcycle adventure community website with:
  * Interactive Romania map with GPX route plotting
  * Advanced post creation with cover images, sections, highlights
  * User authentication and authorization system
  * Community features with likes and comments
  * Responsive design with blue-purple-teal gradient theme
  * Docker and production deployment configuration
  * SQLite database with proper models and relationships
  * Image and GPX file upload handling
  * Modern UI with improved form layouts and visual feedback

Technical stack:
- Flask 3.0.0 with SQLAlchemy, Flask-Login, Flask-Mail, Flask-WTF
- Jinja2 templates with Tailwind CSS styling
- Leaflet.js for interactive mapping
- PostgreSQL/SQLite database support
- Docker containerization with Nginx reverse proxy
- Gunicorn WSGI server for production

Project is now production-ready Flask application focused on motorcycle adventure sharing in Romania.
2025-07-23 17:20:52 +03:00
ske087
fc463dc69a Migrate from Next.js to Flask: Complete motorcycle adventure community website
- 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
2025-07-23 14:42:40 +03:00
ske087
282cd0dfcb Complete website redesign based on requirements
NEW LANDING PAGE:
- Full-screen responsive design for phone and desktop
- Three main sections: About, Accommodation, Community
- About section explains site purpose and customer connection
- Accommodation section promotes Pensiunea Buongusto Sibiu
- Community section showcases Stories & Tracks features

COMMUNITY SYSTEM:
- Complete login/register system with email, password, nickname
- Password recovery functionality via email
- Post creation template with all required features:
  * Title and subtitle fields
  * Rich text content area
  * Photo upload with descriptions
  * GPX file upload capability
  * 1-5 difficulty rating system
  * Preview mode before publishing
- GPX map preview component (placeholder for Leaflet integration)

ADMIN PANEL:
- Comprehensive admin dashboard
- User management (view, activate/deactivate users)
- Post management (approve, edit, delete posts)
- Frontend management (edit homepage, site settings)
- Backend management (database, security, logs)
- Statistics and analytics overview

TECHNICAL INFRASTRUCTURE:
- Prisma database schema with complete data models
- Environment configuration template
- Additional dependencies for email and authentication
- Proper component structure and organization
- Mobile-responsive design throughout

FEATURES IMPLEMENTED:
 Full-screen landing page with 3 sections
 Pensiunea Buongusto promotion section
 Community Stories & Tracks area
 Email/password/nickname authentication
 Password recovery system
 Complete post creation template
 Photo upload with descriptions
 GPX file upload
 Difficulty rating (1-5 stars)
 Admin panel for frontend/backend management
 Database schema and models
 Mobile and desktop responsive design

Ready for database setup and authentication implementation.
2025-07-23 13:06:55 +03:00
ske087
d1337b4b77 Implement core website structure and pages
- Create responsive homepage with hero section, features, and animations
- Add adventures page with filterable adventure grid
- Add routes page with downloadable GPX route library
- Implement Header component with responsive navigation
- Set up Tailwind CSS with custom adventure theme
- Fix Next.js configuration and add Unsplash image support
- Add Framer Motion animations throughout
- Install and configure all dependencies successfully

Features added:
- Modern UI with gradient backgrounds and glass morphism
- Mobile-responsive design
- Interactive animations and hover effects
- Adventure browsing and filtering
- Route discovery and download system
- Professional motorcycle adventure branding
2025-07-23 12:38:37 +03:00
ske087
5a18ec9e87 Initial commit: Next.js motorcycle adventure website setup
- Configure Next.js 14 with TypeScript and App Router
- Set up Tailwind CSS for styling
- Add comprehensive dependencies for motorcycle adventure features
- Configure authentication with NextAuth.js
- Set up map integration with React Leaflet
- Add GPX file support for route tracking
- Configure image processing and file uploads
- Set up forms, charts, and animations
- Add ESLint and development tooling
2025-07-23 12:20:20 +03:00