How osmhu/osmhu-website works
Main Components
a. Frontend Layer:
• Main JavaScript modules organization:
• Handling (/js/map/)
• POI (Points of Interest) management (/js/poi/)
• Search functionality (/js/search/)
• Direction services (/js/directions/)
• UI Components (/js/popup/, /js/common/)
b. Backend Layer:
• PHP-based server components
• Query handlers (/query/)
• Configuration management (/config/)
c. Database Layer:
• Dual database support (MySQL and PostgreSQL)
• GIS functionality (especially for PostgreSQL)
Key Architectural Elements
[Client Browser]
• ↓↑
[Frontend Layer]
• Map Components
• Search Interface
• POI Management
• Direction Services
• UI Components
• ↓↑
[Backend API Layer]
• Query Handlers
• Configuration Management
• ↓↑
[Database Layer]
• MySQL/PostgreSQL
• GIS Extensions
Important Details
a. External Services Integration:
• OpenStreetMap Data Services
• Nominatim Search Integration
• Overpass API Integration
b. Asset Management:
• CSS Structure (/css/)
• Static Resources (/kepek/)
• Build Pipeline (webpack, gulp)
Specific Implementation Notes
• Blue: Frontend components
• Green: Backend services
• Yellow: Database systems
• Gray: External services
• Clear data flow paths:
• User interactions
• API calls
• Database queries
• External service requests
Technical Stack Highlights
• Frontend: JavaScript (ES6+), CSS3
• Backend: PHP
• Databases: MySQL/PostgreSQL with GIS support
• Build Tools: Webpack, Gulp
• Testing: Jest
Development Environment
A separate section showing:
• Docker container setup
• Apache configuration
• Development tools and scripts
Key Architectural Patterns to Highlight
• Component-based frontend architecture
• Service-oriented backend structure
• MVC-like pattern in the frontend organization
• Worker-based processing for popup HTML creation