Skip to content

Web/SeM2x/Weather CLI Challenge#19

Open
SeM2x wants to merge 7 commits into
MicroClub-USTHB:webfrom
SeM2x:web/SeM2x/weather-api-cli-app
Open

Web/SeM2x/Weather CLI Challenge#19
SeM2x wants to merge 7 commits into
MicroClub-USTHB:webfrom
SeM2x:web/SeM2x/weather-api-cli-app

Conversation

@SeM2x

@SeM2x SeM2x commented Feb 27, 2026

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant