feat: complete Web (Weather App) and Mobile (Library Management) challenges#6
Open
abdelrzz9 wants to merge 1 commit into
Open
feat: complete Web (Weather App) and Mobile (Library Management) challenges#6abdelrzz9 wants to merge 1 commit into
abdelrzz9 wants to merge 1 commit into
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.
Overview
This Pull Request includes the completion of two main challenges: a Weather Web Application and a Library Management System (Dart/Mobile).
🌤️ Weather CLI App — Backend Challenge #1
📋 Description
A Node.js command-line application that fetches real-time weather data for any city using the OpenWeatherMap API and displays it in a clean console format.
✅ Challenge Requirements Completed
npm init.envasync/awaittry/catch🔧 What Was Built
index.js.envpackage.jsonREADME.md🧠 Functions Overview
validateApiKey().envgetCity()fetchWeather()displayWeather()main()❌ Errors Handled
🧪 How to Test
npm install node index.js London node index.js Riyadh node index.js "New York"📤 Expected Output
🎯 Library Management System - Dart Workshop Challenge
Pull Request
feat: Complete Library Management System with all 17 Dart concepts
✅ Requirements Met (17/17)
✓ Variables: var, final, const, nullable (String?), ??, !
✓ Collections: List, Set, Map with .where(), .map(), .reduce(), .forEach()
✓ Functions: named params, optional params, arrow, anonymous, higher-order
✓ Constructors: default, named, optional (3 types in each model class)
✓ Abstract class: LibraryItem with abstract methods
✓ Inheritance: extends, override, super
✓ Interface: implements Borrowable
✓ Mixins: Timestampable, Searchable with
withkeyword✓ Enums: BookStatus, MemberTier with switch statements
✓ Async: All DB operations return Future with await
✓ Stream: Broadcast StreamController for real-time activity log
✓ Isolate: Search runs in separate isolate with SendPort/ReceivePort
✓ Exceptions: 3 custom classes with try/catch/finally
✓ Unicode Runes: '\u{1F4DA}', '\u2713', '\u2717'
✓ Demo Data: 7 books, 5 members, 3 active loans pre-loaded
🏗️ Architecture
Single file (~2,000 lines): library_management.dart
Structure:
📊 Components
Book Class
Member Class
Loan Class
LibraryManager
🔧 Key Features
Defensive Programming
Collection Operations
Isolate Search
Stream Broadcasting
🌱 Demo Data
Pre-loaded with:
📱 UI
Console menu system:
🚀 Run
Output:
📏 Metrics
🎯 Design Highlights
✓ Separation of concerns (each class handles own validation)
✓ Type safety (no dynamic types)
✓ Defensive programming (double validation)
✓ DRY principle (mixins for shared behavior)
✓ Performance (Map for O(1) lookup, Isolate for heavy operations)
✓ Real-time feedback (Stream for activity log)
✓ Comprehensive error handling (custom exceptions + try/catch everywhere)
📝 Notes for Reviewer
Status: Ready for Review ✅