How keyinglol/alibabahack2025 works
Project type and purpose
• This is a full-stack, cloud-powered inventory management system for F&B businesses.
• Frontend: an Angular single-page application delivering dashboards and chat-style “Smart Q” insights.
• Backend/pipeline: Python-based ML scripts (notebooks, pickled models, cron jobs) that forecast T+2 sales.
• Cloud services: Alibaba Cloud ECS for compute, PAI DSW for data processing, ApsaraDB RDS for storage, Quick BI & Smart Q for visualization and LLM analytics.
File structure
• Top level:
• inventory-assistant-frontend/ – Angular project with src/app pages, shared components, services, models.
• inventory-assistant-backend/ – Data science artifacts: Jupyter notebooks (.ipynb), CSV data, pickled model files (.pkl), and Python scripts (predict_t_plus_2.py).
• No monolithic REST server; instead, a scheduled Python script on ECS drives prediction and persists results.
• Configuration & build: angular.json, package.json in frontend; no backend build script implies pure script-based pipeline.
README for additional insights
• Confirms Angular.js UI with embedded Quick BI dashboards and Smart Q LLM queries.
• Describes data pipeline on PAI DSW: validation → feature engineering → cleaned data storage.
• Cron on ECS runs predictions daily, writes to ApsaraDB RDS.
• Frontend likely uses store.service.ts to embed or fetch BI/Smart Q endpoints.
Main components
a. User devices / Web browser
b. Angular frontend (hosted on ECS or CDN)
c. Alibaba Cloud Quick BI & Smart Q services (external BI & LLM)
d. Data storage: ApsaraDB RDS
e. Data pipeline: PAI DSW (validation & feature engineering)
f. Compute: Alibaba Cloud ECS running:
• Prediction cron job (predict_t_plus_2.py)
• Model artifacts (sales_forecast_model.pkl, categorical_columns.pkl)
g. Raw data sources (daily CSV uploads or ingested sales data)
Relationships and data flows
• Raw sales/inventory data → ingested into PAI DSW
• PAI DSW → cleans & transforms → writes to ApsaraDB RDS
• ECS cron → reads today’s data from RDS + loaded ML model → writes T+2 forecasts back to RDS
• Quick BI dashboards & Smart Q → read from RDS → serve visualizations and LLM analyses to Angular frontend
• End user → interacts with Angular app → triggers BI/Smart Q embed queries → views insights
Architectural patterns / design principles
• Clear separation of concerns:
• Frontend: presentation & user interaction
• Backend compute: ML pipeline & batch prediction
• Data layer: RDS for OLTP/analytics store
• Analytics services: managed PAI & Quick BI/Smart Q
• Batch processing via cron jobs; event-driven if extended with Lambda-style triggers.
• Modular ML artifacts for easy retraining and redeployment.
• Stateless frontend + external BI/LLM services minimize custom API load.
Technologies / frameworks to annotate
• Angular (Typescript, store.service.ts, app.routes.ts)
• Python (Jupyter notebooks, predict_t_plus_2.py, scikit-learn pickles)
• Alibaba Cloud ECS, PAI DSW, ApsaraDB RDS
• Alibaba Cloud Quick BI & Smart Q
• Data formats: CSV, pickled models
Final checklist for the engineer
• Break system into: frontend, batch compute, data store, analytics services, and user.
• Data flows and triggers (cron schedule).
• ML artifacts and notebooks as part of the pipeline.
• Hosting boundaries: ECS vs. PAI vs. SaaS.
• Essential components without over-complicating.