🧊 Temperature Converter Micro-Service
User Story
As an office teammate who frequently needs to check whether beverages are at the right serving temperature,
I want a tiny “Temperature Converter” micro-service
so that I can instantly convert a value between Celsius and Fahrenheit from any device.
Acceptance Criteria
| # |
Requirement |
Details |
| 1 |
Source Control |
• Repository created on GitHub. • Development on a dedicated feature branch. • Changes merged via Pull Request. |
| 2 |
API Endpoint |
• Framework: FastAPI. • Route: GET /convert. • Query params: • value – numeric temperature. • scale – either C or F. • Returns JSON containing the converted temperature. |
| 3 |
Performance |
• Service started locally with Uvicorn. • Must respond in ≤ 200 ms for typical inputs. |
| 4 |
Web Demo |
• index.html + vanilla JavaScript lives in the repo. • Uses fetch() to call the API. • Displays both the original and converted values. |
| 5 |
API Examples |
• Postman collection included showing: 1. Celsius → Fahrenheit. 2. Fahrenheit → Celsius. |
| 6 |
Testing |
• pytest unit test covers at least the happy-path conversion logic. |
| 7 |
Documentation (README) |
Explains how to: 1. Clone the repo. 2. Create a virtual environment & install dependencies. 3. Run the API. 4. Open the demo page. 5. Execute the tests. |
| 8 |
Project Tracking |
• Story tracked in ClickUp. • Checklist items mirror these acceptance criteria. • All items marked Done before demo. |
Handy Commands
# 1. Clone
git clone https://github.com/<your-org>/temperature-converter.git
cd temperature-converter
# 2. Virtual env & dependencies
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
# 3. Run the API
uvicorn app.main:app --reload
# 4. Tests
pytest
JSON Response Example
GET /convert?value=100&scale=C
{
"input": {
"value": 100,
"scale": "C"
},
"converted": {
"value": 212,
"scale": "F"
}
}
Stretch Ideas (Optional)
- Add Kelvin support.
- Dockerize the service for easier deployment.
- Enable CORS so the API can be called from any origin.
- Automatic CI workflow (e.g., GitHub Actions) to run tests and lint on every PR.
🧊 Temperature Converter Micro-Service
User Story
Acceptance Criteria
• Development on a dedicated feature branch.
• Changes merged via Pull Request.
• Route:
GET /convert.• Query params:
•
value– numeric temperature.•
scale– either C or F.• Returns JSON containing the converted temperature.
• Must respond in ≤ 200 ms for typical inputs.
index.html+ vanilla JavaScript lives in the repo.• Uses
fetch()to call the API.• Displays both the original and converted values.
1. Celsius → Fahrenheit.
2. Fahrenheit → Celsius.
1. Clone the repo.
2. Create a virtual environment & install dependencies.
3. Run the API.
4. Open the demo page.
5. Execute the tests.
• Checklist items mirror these acceptance criteria.
• All items marked Done before demo.
Handy Commands
JSON Response Example
Stretch Ideas (Optional)