Skip to content

akhilyad/Antova11

Repository files navigation

 █████╗ ███╗   ██╗████████╗ ██████╗ ██╗   ██╗ █████╗
██╔══██╗████╗  ██║╚══██╔══╝██╔═══██╗██║   ██║██╔══██╗
███████║██╔██╗ ██║   ██║   ██║   ██║██║   ██║███████║
██╔══██║██║╚██╗██║   ██║   ██║   ██║╚██╗ ██╔╝██╔══██║
██║  ██║██║ ╚████║   ██║   ╚██████╔╝ ╚████╔╝ ██║  ██║
╚═╝  ╚═╝╚═╝  ╚═══╝   ╚═╝    ╚═════╝   ╚═══╝  ╚═╝  ╚═╝

Sustainable Supply Chain Intelligence — where data meets decarbonisation.

Node React Python FastAPI PostgreSQL Vite License: MIT


◈ What is Antova?

Antova is a full-stack enterprise SaaS platform that unifies carbon accounting, AI route optimisation, supplier ESG management, and spend analytics into one sleek dashboard. Think Watershed + EcoVadis + project44 + Sievo — collapsed into a single codebase.

┌─────────────────────────────────────────────────────────────┐
│                        ANTOVA PLATFORM                      │
│                                                             │
│   ┌──────────────┐  ┌──────────────┐  ┌──────────────┐    │
│   │   REACT 18   │  │  EXPRESS API │  │  ML ENGINE   │    │
│   │   + Recharts │◄─┤  Node 18 +  ├─►│  FastAPI     │    │
│   │   + Lucide   │  │  JWT + CORS │  │  scikit-learn│    │
│   └──────┬───────┘  └──────┬───────┘  └──────────────┘    │
│          │  Vite proxy     │                                │
│          │  /api ──────────┘                               │
│          │                 │                                │
│          └─────────────────┼────────────────────────────── │
│                            ▼                                │
│                   ┌────────────────┐                        │
│                   │  PostgreSQL 14 │                        │
│                   │  (Supabase)    │                        │
│                   └────────────────┘                        │
└─────────────────────────────────────────────────────────────┘

◈ Feature Matrix

Module What it does Inspired by
Carbon Analytics Scope 1/2/3, GLEC, ISO 14083, trend charts Watershed · Cozero · BigMile
Route Optimisation AI multi-modal: carbon ↔ cost ↔ time Searoutes · project44
Supplier Management 4-pillar ESG scoring, risk badges, CSV export EcoVadis
Spend Analytics Procurement intelligence, cost-per-CO₂ Sievo
Performance KPIs Live targets vs actuals, progress bars
Reports & Exports CSV downloads for emissions / suppliers / shipments
Compliance GHG Protocol, GLEC, CDP, ISO 14064, SBTi, EU CSRD
Data Sources Climatiq live factors, Supabase, ML engine status

◈ Tech Stack

Frontend

React 18          — UI framework with hooks
Vite 5            — lightning-fast dev server + HMR
Recharts          — area, bar, pie, radar, line charts
Lucide React      — icon system
Custom CSS-in-JS  — zero external CSS framework

Backend (Node)

Express 4         — REST API server
bcryptjs          — password hashing
jsonwebtoken      — JWT auth
express-rate-limit— DOS protection
helmet            — security headers
pg                — PostgreSQL client

ML Engine (Python)

FastAPI           — async HTTP API
scikit-learn      — RandomForest, GradientBoosting, KMeans
pandas / numpy    — data wrangling
httpx             — async Climatiq API calls
uvicorn           — ASGI server

Infrastructure

PostgreSQL 14+    — primary datastore (Supabase-ready)
Supabase          — managed Postgres + auth layer
Climatiq API      — live emission factor lookup

◈ Quick Start

Prerequisites

  • Node.js 18+
  • Python 3.9+
  • PostgreSQL 14+ (or a Supabase project)

1 — Clone & configure

git clone https://github.com/akhilyad/Antova11.git
cd Antova11

# Copy env template and fill in your values
cp .env.example .env

Key values to set in .env:

DB_HOST=your-db-host
DB_PASSWORD=your-db-password
JWT_SECRET=a-long-random-string
CLIMATIQ_API_KEY=your-climatiq-key
ALLOWED_ORIGINS=http://localhost:5173

2 — Database

psql -U postgres -d antova -f schema.sql

3 — Backend API

# From project root
npm install
node server.js
# → http://localhost:3001

4 — ML Engine

# From project root
pip install -r requirements.txt
python -m uvicorn api_server:app --host 0.0.0.0 --port 5000 --reload
# → http://localhost:5000

5 — Frontend

cd frontend
npm install
npm run dev
# → http://localhost:5173

◈ Project Structure

Antova11/
├── server.js              ← Express REST API
├── schema.sql             ← PostgreSQL schema
├── carbon_optimizer.py    ← ML engine core
├── api_server.py          ← FastAPI wrapper for ML engine
├── requirements.txt       ← Python deps
├── package.json           ← Node deps (backend)
├── .env.example           ← Environment template (safe to commit)
├── .env                   ← Your secrets (gitignored)
└── frontend/
    ├── index.html
    ├── vite.config.js     ← Dev server + /api proxy → :3001
    ├── package.json
    └── src/
        ├── main.jsx
        └── App.jsx        ← Entire frontend (single-file SPA)

◈ API Reference

Auth

POST /api/auth/register
POST /api/auth/login

Emissions

GET  /api/emissions/overview?timeRange=month
POST /api/emissions/calculate

Suppliers

GET  /api/suppliers?search=&minScore=0
POST /api/suppliers

Routes

POST /api/routes/optimize
     body: { origin, destination, weight, transportModes, optimizeFor }

Analytics

GET  /api/analytics/dashboard?timeRange=quarter

Reports

GET  /api/reports/export?type=emissions&format=csv
GET  /api/reports/export?type=suppliers&format=csv
GET  /api/reports/export?type=shipments&format=csv

◈ Environment Variables

Variable Required Description
PORT No Node server port (default 3001)
JWT_SECRET Yes Secret for signing JWTs
ALLOWED_ORIGINS Yes Comma-separated CORS origins
DB_HOST Yes PostgreSQL host
DB_PORT No PostgreSQL port (default 5432)
DB_NAME Yes Database name
DB_USER Yes Database user
DB_PASSWORD Yes Database password
CLIMATIQ_API_KEY Yes Climatiq emission factors API
ML_ENGINE_URL No Python ML engine URL (default http://localhost:5000)

Never commit .env — it's in .gitignore. Use .env.example as the reference template.


◈ Security

  • JWT authentication on all protected endpoints
  • bcrypt password hashing (salt rounds: 12)
  • Rate limiting (100 req / 15 min per IP)
  • Helmet.js security headers
  • Parameterised SQL queries (no raw interpolation)
  • CORS restricted to explicit origin allowlist

◈ Roadmap

[✓] Core dashboard with live API data
[✓] JWT auth (register / login / session restore)
[✓] Carbon Analytics — Scope 1/2/3, GLEC
[✓] Route Optimisation — multi-modal AI engine
[✓] Supplier ESG — 4-pillar radar + CSV export
[✓] Reports — CSV export per data type
[✓] Compliance tracker — GHG / CDP / SBTi / CSRD
[ ] Real-time shipment map (Leaflet / Mapbox)
[ ] Carbon offset marketplace
[ ] Mobile app (React Native)
[ ] Blockchain supply chain tracing
[ ] Multi-language support

◈ License

MIT © 2025 Akhil Yadav


Make every shipment count.

Optimise · Track · Sustain

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors