How meet-jethwa/devops-project works
This repository is an educational sugarcane irrigation advisory lab: one farmer-facing chat workflow shown in monolithic, three-tier, and microservice deployments. The microservice flow is documented as browser → nginx → gateway → NLP → recommendation → advisory, with feedback stored separately; the monolith and three-tier versions provide parallel implementations. Source excerpts verify key monolith and microservice calls, but not every service boundary or the three-tier wiring, so undocumented arrows are omitted. Sensor and weather inputs are simulated, not a real controller.
Main entry points: gateway/main.py API gateway · api.py Monolith API · chat.js Chat frontend · advisory-service/main.py Advisory service
Components 19
Farmer interface
- Chat frontend
app/static/chat.js
Monolith runtime
- Monolith API
1-monolith/api.py - Query pipeline
1-monolith/pipeline.py - Slot extraction
1-monolith/gazetteer.py - Advisory templates
1-monolith/templates.py - Gemini helper
1-monolith/gemini.py - Feedback log
1-monolith/api.py
Three-tier runtime
- Logic API
2-three-tier/logic/main.py - Feedback database
2-three-tier/data/init.sql
Microservice runtime
- Nginx proxy
3-microservices/nginx/nginx.conf - API gateway
3-microservices/services/gateway/main.py - NLP service
3-microservices/services/nlp-service/main.py - Recommendation service
3-microservices/services/recommendation-service/main.py - Advisory service
3-microservices/services/advisory-service/main.py - Feedback service
3-microservices/services/feedback-service/main.py - Feedback database
3-microservices/docker-compose.yml
External services
- Gemini API
- PostgreSQL
Other components
- Farmer
Connections 21
- Farmer → Chat frontend: asks question
README.md - Chat frontend → API gateway: submits chat
README.md - API gateway → NLP service: analyzes query
README.md - API gateway → Recommendation service: requests recommendation
README.md - API gateway → Advisory service: requests advisory
README.md - API gateway → Feedback service: forwards feedback
README.md - Feedback service → Feedback database: stores feedback
README.md - Nginx proxy → API gateway: proxies requests
README.md - Farmer → Chat frontend: uses chat
- Chat frontend → Monolith API: posts chat
- Monolith API → Query pipeline: processes query
1-monolith/api.py - Query pipeline → Slot extraction: extracts slots
1-monolith/pipeline.py - Monolith API → Gemini helper: generates advisory
1-monolith/api.py - Monolith API → Feedback log: appends feedback
1-monolith/api.py - Logic API → Feedback database: stores feedback
README.md - Logic API → Gemini helper: generates advisory
2-three-tier/logic/main.py - Advisory service → Advisory templates: renders text
3-microservices/services/advisory-service/main.py - Advisory service → Gemini API: requests generation
3-microservices/services/advisory-service/main.py - Gemini helper → Gemini API: requests generation
1-monolith/gemini.py - Feedback database → PostgreSQL: runs on
README.md - Feedback database → PostgreSQL: runs on
README.md