CoffePrice is a full-stack SaaS platform built to bring price transparency and market intelligence to Colombia’s coffee supply chain. It gives productores (farmers) real-time FNC reference prices, machine-learning–powered price predictions, weather context, and instant alerts — while giving compradores (buyers) a public directory and profile pages that make them discoverable. An admin layer keeps data quality high and the community safe. Whether you grow coffee in Huila or source it from across the Eje Cafetero, CoffePrice puts the information you need at your fingertips.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JaiderT/CoffeePrice/llms.txt
Use this file to discover all available pages before exploring further.
Architecture Overview
CoffePrice is organized into three independent tiers that communicate through well-defined interfaces.| Tier | Technology | Hosting |
|---|---|---|
| Frontend | React 19, Vite 5, Tailwind CSS 4, react-router-dom 7 | Netlify |
| Backend | Express 5, Mongoose 9, Passport, node-cron 4 | Railway |
| Database | MongoDB Atlas | MongoDB Cloud |
| ML Pipeline | Python 3.11, Prophet, XGBoost | GitHub Actions |
VITE_API_URL environment variable. The ML pipeline is fully headless — it runs on a schedule, commits refreshed prediction artefacts to the repo, and the Railway/Netlify auto-deploy picks up the changes automatically.
User Roles
CoffePrice has three distinct roles, each with its own dashboard and set of capabilities.Productor (Farmer)
A productor registers with their farm details and immediately gains access to:- Live FNC reference prices updated daily by the price cron job
- 30-day price predictions generated by the Prophet + XGBoost hybrid model
- Personal price alerts (push + email) triggered when the FNC price crosses a threshold they configure
- News feed curated from multiple Colombian coffee industry sources
- Weather data relevant to their growing region
- Access to the buyer map so they can identify local compradores
Comprador (Buyer)
A comprador creates a public profile that productores can browse. They also have access to:- Their own profile management page (
/api/comprador) - Visibility on the interactive buyer map (Mapbox + MapTiler)
- Price history and prediction data
- Platform reviews from other users
Admin
An admin has elevated privileges across all platform sections:- Full user management (promote, suspend, delete)
- Manual control over news curation and refresh cycles
- Access to activity logs (
/api/actividad) - Platform-wide configuration (
/api/configuracion) - Ability to trigger and review ML prediction runs
Key Features
Real-Time Prices
Daily FNC reference prices fetched automatically by a node-cron job. Full historical price chart with data from
/api/precios and /api/historial-precios.ML Price Predictions
A Prophet + XGBoost hybrid model re-trains every weekday and writes the next business-day prediction to
/api/predicciones. Confidence intervals included.Buyer Map
Interactive Mapbox + MapTiler map surfacing registered compradores by region. Productores can filter by department and view buyer profiles in a sidebar.
Price Alerts
Productores set upper/lower price thresholds. The backend evaluates them on every price update and fires email + in-app notifications via
/api/alertas.News Feed
A multi-source news pipeline (NewsAPI, GNews, TheNewsAPI) curates Colombian coffee industry articles. The cron job runs deduplication, freshness scoring, and inventory management automatically.
AI Chatbot
An OpenAI-powered assistant available at
/api/chatbot answers questions about prices, predictions, and market trends in natural language — in Spanish.Tech Stack
| Layer | Package / Service | Version |
|---|---|---|
| Frontend framework | React | 19.2 |
| Build tool | Vite | 5.4 |
| CSS framework | Tailwind CSS | 4.2 |
| Routing | react-router-dom | 7.13 |
| Charts | Recharts | 3.8 |
| Maps | Mapbox GL JS + react-map-gl | 3.21 / 7.1 |
| HTTP client | Axios | 1.15 |
| Backend framework | Express | 5.2 |
| ODM | Mongoose | 9.2 |
| Auth | Passport + passport-google-oauth20 | 0.7 / 2.0 |
| JWT | jsonwebtoken | 9.0 |
| Scheduler | node-cron | 4.2 |
| Nodemailer | 8.0 | |
| AI | OpenAI Node SDK | 6.34 |
| ML — time series | Prophet | — |
| ML — boosting | XGBoost | — |
| ML runtime | Python | 3.11 |
| CI/CD | GitHub Actions | — |
| Backend hosting | Railway | — |
| Frontend hosting | Netlify | — |
| Database | MongoDB Atlas | — |