How hari930531/calculator-3tier-app works
The product is a browser-based calculator with a Flask API and MySQL-backed calculation history. Users submit arithmetic through the frontend; the API validates and computes the result, saves it when the database is available, and serves recent history back to the frontend. The README also documents container orchestration, Jenkins deployment to EC2, and CloudWatch/SNS monitoring. Those operational links are documented capabilities; their implementation details were not sampled, so they are shown at a high level.
Main entry points: app.py Flask API · script.js Calculator client · docker-compose.yml Container stack · Jenkinsfile Deployment pipeline
Components 13
User interface
- Web interface
frontend/index.html - Calculator client
frontend/script.js
Calculator API
- Flask API
backend/app.py - Arithmetic
backend/app.py - History endpoint
backend/app.py
Persistent data
- MySQL history
Operations
- Container stack
docker-compose.yml - Deployment pipeline
Jenkinsfile - Docker Hub
- AWS EC2
- CloudWatch alarms
- SNS notifications
Other components
- Browser user
Connections 14
- Browser user → Web interface: opens
README.MD - Web interface → Calculator client: hosts
README.MD - Calculator client → Flask API: requests API
frontend/script.js - Flask API → Arithmetic: dispatches
backend/app.py - Flask API → MySQL history: writes results
backend/app.py - History endpoint → MySQL history: reads history
backend/app.py - Flask API → History endpoint: routes history
backend/app.py - Calculator client → History endpoint: requests history
frontend/script.js - Container stack → Flask API: runs service
README.MD - Container stack → MySQL history: runs service
README.MD - Deployment pipeline → Docker Hub: pushes images
README.MD - Deployment pipeline → AWS EC2: deploys services
README.MD - AWS EC2 → CloudWatch alarms: monitored by
README.MD - CloudWatch alarms → SNS notifications: triggers alerts
README.MD