How damaradiprabowo/ppp-calculator-flask works
Main Components
a. Client-Side Layer:
• Web Browser component
• Static Assets (CSS/JS)
• Main interface components (salary input, country selectors)
b. Server-Side Layer:
• Flask Application Server
• Route handlers
• PPP calculation logic
c. External Services Layer:
• World Bank API
• Rest Countries API
[Client Tier]
[Application Tier]
[External Services Tier]
Detailed Component Breakdown
Client Tier:
┌─ Web Browser ─────────────┐
• HTML (index.html) │
• CSS (styles.css) │
• JavaScript (script.js)│
• ┘
Application Tier:
┌─ Flask Server (app.py) ──┐
• Route Handlers │
• PPP Calculator Logic │
• API Integration │
• ┘
External Services:
┌─ External APIs ──────────┐
• World Bank API │
• Rest Countries API │
• ┘
Data Flow Representation
Following key interactions:
• Browser to Flask Server: HTTP requests for salary calculations
• Flask Server to External APIs: API calls for country data
• Server to Client: JSON responses with calculated results
Additional Elements
• Request/Response formats between components
• Key HTTP methods (GET/POST)
• Data transformation points
• Error handling paths
Specific Implementation Details
Notes about:
• Static file serving from Flask
• API endpoint structure
• Browser-server communication patterns
• Data caching possibilities (if implemented)