How jishnusetia/bioloopai works
BioLoop AI is a farm-to-industry biomass marketplace: farm and industry managers register, maintain supply or demand profiles, discover potential exchanges, and propose and manage collaborations. Its optimization service estimates matches and economic/environmental impact, with optional AI explanations; the dashboard presents this information through tables, maps, charts, and insights. The README documents these product capabilities, while sampled source confirms key frontend requests and optimization calls. Some route and UI implementation details were not excerpted, so those relationships are omitted or shown only where documented.
Main entry points: index.js Express API · db.js Prisma client · dashboard.js Dashboard workflows · pythonRunner.js Python runner
Components 29
Marketplace dashboard
- Dashboard
dashboard.html - Sign-in and signup
js/auth.js - API client
js/api.js - Dashboard workflows
js/dashboard.js - Marketplace map
js/map.js - Impact charts
js/charts.js - AI insights panel
js/ai-insights.js
API and identity
- Express API
backend/src/index.js - Authentication routes
backend/src/routes/auth.js - JWT verification
backend/src/middleware/auth.js
Marketplace operations
- Farm profiles
backend/src/routes/farms.js - Industry profiles
backend/src/routes/industries.js - Marketplace directory
backend/src/routes/directory.js - Match discovery
backend/src/routes/matches.js - Collaborations
backend/src/routes/collaborations.js
Matching and insights
- Optimization endpoint
backend/src/routes/optimize.js - AI endpoint
backend/src/routes/ai.js - Optimization service
backend/src/services/optimizeService.js - Python runner
backend/src/services/pythonRunner.js - Biomass optimizer
backend/python/optimizer.py - AI explainer
backend/python/ai_explainer.py - AI match review
backend/python/ai_match_review.py - Distance calculation
backend/python/haversine.py
Persistent data
- Prisma client
backend/src/db.js - Marketplace database
backend/prisma/schema.prisma
Other components
- Farm manager
- Industry manager
- Ollama service
- OSRM routing
Connections 35
- Farm manager → Sign-in and signup: signs in
README.md - Industry manager → Sign-in and signup: signs in
README.md - Sign-in and signup → API client: requests auth
js/auth.js - Dashboard → Dashboard workflows: loads
README.md - Dashboard workflows → API client: requests data
js/dashboard.js - Dashboard workflows → Marketplace map: uses map
js/dashboard.js - Dashboard workflows → Impact charts: uses charts
js/dashboard.js - Dashboard workflows → AI insights panel: uses insights
js/dashboard.js - API client → Express API: sends HTTP requests
README.md - Marketplace map → OSRM routing: requests routes
js/map.js - Express API → Authentication routes: mounts routes
backend/src/index.js - Express API → Farm profiles: mounts routes
backend/src/index.js - Express API → Industry profiles: mounts routes
backend/src/index.js - Express API → Marketplace directory: mounts routes
backend/src/index.js - Express API → Match discovery: mounts routes
backend/src/index.js - Express API → Collaborations: mounts routes
backend/src/index.js - Express API → Optimization endpoint: mounts routes
backend/src/index.js - Express API → AI endpoint: mounts routes
backend/src/index.js - Authentication routes → Prisma client: reads and writes users
backend/src/routes/auth.js - Authentication routes → JWT verification: protects profile lookup
backend/src/routes/auth.js - Farm profiles → Prisma client: accesses farm data
backend/src/routes/farms.js - Industry profiles → Prisma client: accesses industry data
backend/src/routes/industries.js - Marketplace directory → Prisma client: reads directory data
backend/src/routes/directory.js - Collaborations → Prisma client: accesses collaborations
backend/src/routes/collaborations.js - Match discovery → Prisma client: reads profiles
backend/src/routes/matches.js - Match discovery → Optimization service: runs optimization
backend/src/routes/matches.js - Optimization endpoint → Optimization service: runs optimization
backend/src/routes/optimize.js - AI endpoint → Python runner: runs Python service
backend/src/routes/ai.js - Optimization service → Python runner: runs scripts
backend/src/services/optimizeService.js - Python runner → Biomass optimizer: executes script
- Python runner → AI explainer: executes script
- Biomass optimizer → Distance calculation: uses distance helper
backend/python/optimizer.py - Prisma client → Marketplace database: queries
- AI explainer → Ollama service: generates explanations
- AI match review → Ollama service: may use AI service