Web/SeM2x/Weather CLI Challenge#19
Open
SeM2x wants to merge 7 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Design Decisions
Since I’m already comfortable with the basics of Node.js, I wanted to make this challenge more interesting by going beyond the minimum requirements.
Instead of building a simple one command script, I added:
An interactive REPL mode for continuous querying
An in-memory cache with TTL (time to live) to reduce redundant API calls
A structured, modular architecture
Optional IP-based city auto-detection
The goal was to challenge myself from a design perspective, not just make it work, but make it scalable and maintainable.
So I intentionally approached this project using object-oriented principles, focusing on:
Clear separation of concerns (CLI, services, providers, utilities)
Interface-driven design (
ICacheService, provider abstractions)Dependency inversion where appropriate
Extensibility
I also chose TypeScript even though this could have been written in plain JavaScript, using TypeScript helped formalize DTOs, interfaces, and service boundaries in a more production like way.
This project was as much about architecture and clean design as it was about fetching weather data.