How abduldayyan1/my-works works
Project type and purpose
• From the README, this repo bundles two full-stack assignments:
a) A Rule Engine service (Flask + PostgreSQL + React) that parses and evaluates user-defined logical rules via an AST.
b) A Weather Monitoring System (Flask + OpenWeatherMap API + React) that fetches, processes, stores, and visualizes real-time weather data.
File structure
• The two core apps live conceptually under:
• backend/ (Flask apps)
• frontend/ (React UIs)
• weather-app/ (Node baseline or reference implementation)
• Key configuration and dependency files: pyproject.toml, package.json, database schema SQL, requirements.txt, and package-lock.json.
README for architectural details
• Rule Engine:
• REST API endpoints (/api/rules, /api/evaluate) on Flask
• PostgreSQL for rule storage and audit
• React frontend calling those endpoints
• Weather Monitoring:
• Flask service with weather.py modules fetching from OpenWeatherMap
• (Optional) PostgreSQL for historical storage
• React components for charts and UI
Main components and interactions
• User’s Web Browser (UI)
• React Frontend (two apps or a combined UI)
• Flask Backend(s) (Rule Engine service; Weather service)
• PostgreSQL Database (for Rule Engine; optionally for Weather)
• External OpenWeatherMap API
b. Relationships and data flows:
• Browser → HTTP(S) → React Frontend
• Frontend → HTTP(S) → Flask Backend(s)
• Flask → SQL → PostgreSQL
• Weather service → HTTPS → OpenWeatherMap
• Flask → Response → Frontend → Browser
c. Architectural patterns
• Separation of Concerns: clear front/back split, each service in its own module
• Micro-service flavor: two independent services (Rule Engine vs Weather)
• RESTful API communication
• AST Pattern internally for rule parsing (annotate as an internal library component)
d. Relevant technologies
• Python + Flask + psycopg2
• React + Node (npm)
• PostgreSQL
• External HTTP API