← Back to Projects
Completed
Data Science

Nebluna Analytics

Demand forecasting from daily sales: a Prophet model behind a FastAPI service on GCP Cloud Run, with a Streamlit dashboard.

Streamlit demo: if nobody has opened it in a while, it takes a moment to wake up.

Nebluna Analytics

Main result

7–90

days ahead, forecast with 95% confidence bands

Date

August 3, 2026

Prototype of the demand forecast for Nebluna Inventory & Sales

Theme

Inventory planning for a coffee roastery

Objective

Test demand forecasting before building it into Nebluna's operations system.

Takes a daily sales CSV, generates the forecast and reports MAE, MAPE and RMSE on a held-out tail of the series.

Challenges

  1. 01Daily sales mix weekly seasonality with a slower annual trend
  2. 02A forecast without an error estimate is not actionable for ordering stock
  3. 03NumPy/Pandas C extensions break when conda and pip packages mix

How it was solved

  1. 01Prophet with weekly and yearly seasonality, separating day-of-week effects from trend
  2. 02Error metrics on held-out data shown with every forecast
  3. 03Conda for local development, pip wheels only inside the Docker image

Results

  • API deployed on GCP Cloud Run and dashboard on Streamlit Cloud
  • OpenAPI docs generated from Pydantic request and response schemas
  • pytest suite covering data processing and every API endpoint

Overview

The Streamlit dashboard uploads a CSV with date and sales columns and shows the history, the forecast and the error metrics. It is a client of a REST API that trains and serves the model.

Technical Implementation

Data Processing

DataProcessor checks the required columns, rejects short, negative or constant series, fills gaps and drops outliers beyond three standard deviations.

Model

DemandForecaster wraps Prophet with additive weekly and yearly seasonality. It trains on all but the last 30 days, scores on that tail and generates the future dates.

API

FastAPI exposes health, CSV upload and training, forecast and dataset statistics endpoints. Invalid data returns a 400 with the failed check.

Features

  • Historical, Forecast and Metrics tabs with interactive Plotly charts
  • Forecast horizon slider and confidence interval toggle
  • Validation messages for malformed or insufficient data
  • Exploratory analysis notebook

Technologies

  • Prophet
  • FastAPI
  • Streamlit
  • Pandas
  • Plotly
  • Pydantic
  • Docker
  • GCP Cloud Run
  • Python 3.12

Impact

Showed that a demand forecast with its error margin can be served from a browser, without writing code: the piece that will later be built into Nebluna Inventory & Sales.

Ask my portfolio

AI

I answer from what's published on this site and link the project each answer comes from. If you'd rather talk to Fer, tell me and I'll pass on your details.