Live Application: carbonflow.net
CarbonFlow is a marketplace that connects carbon capture technology producers with industrial consumers. It ranks matches using vector-based scoring over engineered feature vectors and generates environmental and economic impact reports for each pairing.
- Vector-Based Matching: Cosine similarity over engineered feature vectors (32 producer dimensions, 28 consumer dimensions)
- Interactive Dashboard: Real-time visualization of carbon capture opportunities
- Impact Analysis: Comprehensive environmental and economic impact reporting
- Geospatial Mapping: Location-based matching with distance calculations
- Smart Caching: Session-based report caching for improved user experience
- JWT-based Authentication: Secure user registration and login
- Role-based Access: Producer and consumer user types
- Session Management: Persistent login with secure token handling
- Partnership Impact Reports: Detailed analysis of carbon reduction potential
- Financial Modeling: Cost-benefit analysis with ROI calculations
- Logistics Planning: Transportation and infrastructure considerations
- Watchlist Management: Save and track potential partnerships
- Vector Statistics: Real-time matching system performance metrics
- Responsive Design: Optimized for desktop, tablet, and mobile
- Viewport-Locked Dashboard: Immersive full-screen experience
- Progressive Web App: Fast loading with offline capabilities
- Intuitive Navigation: Clean, modern interface design
- Visual Match Scores: Progress bars showing compatibility factors
- React 18 - Modern UI framework with hooks
- Vite - Fast build tool and development server
- Leaflet - Interactive mapping and geolocation
- CSS3 - Custom styling with responsive design
- Vercel - Production deployment and hosting
- Python Flask - Lightweight web framework
- NumPy & SciPy - Vector calculations and scientific computing
- Scikit-learn - Machine learning utilities
- Azure OpenAI - AI-powered analysis and matching
- Geopy - Geographic calculations and geocoding
- JWT - Authentication and authorization
- bcrypt - Password hashing and security
- Railway - Production deployment and hosting
- JSON-based Storage - Lightweight data persistence
- Vector Cache System - Pickle-based vector storage
- Session Storage - Client-side caching
- Local Storage - User preferences and watchlists
frontend/
├── src/
│ ├── components/ # Reusable UI components
│ │ ├── MapView.jsx # Interactive Leaflet map
│ │ ├── Sidebar.jsx # Analysis results panel with vector scores
│ │ ├── ProducerList.jsx # Producer selection interface
│ │ └── ImpactModal.jsx # Report visualization
│ ├── pages/ # Route-based page components
│ │ ├── HomePage.jsx # Main dashboard
│ │ ├── LandingPage.jsx # Marketing landing page
│ │ └── AnalyticsPage.jsx # Analytics dashboard
│ ├── utils/ # Utility functions
│ │ ├── auth.js # Authentication helpers
│ │ └── reportCache.js # Session caching system
│ └── api.js # API communication layer
backend/
├── app.py # Main Flask application
├── auth.py # Authentication logic
├── vector_engine.py # Vector generation and similarity calculations
├── matching_engine.py # Advanced matching algorithms
├── database.json # Data storage
├── vectors/ # Vector cache storage
│ ├── producer_vectors.pkl # Producer embeddings
│ └── consumer_vectors.pkl # Consumer embeddings
└── requirements.txt # Python dependencies
# Run automated deployment script
./deploy.sh- Create Railway account at railway.app
- Connect your GitHub repository
- Set environment variables:
JWT_SECRET_KEY(required)AZURE_OPENAI_ENDPOINT(optional)AZURE_OPENAI_API_KEY(optional)
- Deploy automatically from Git
- Create Vercel account at vercel.com
- Connect your GitHub repository
- Set environment variables:
VITE_API_BASE_URL(your Railway backend URL)
- Deploy automatically from Git
- Frontend: https://carbonflow.net
- Backend: https://carbonflow-production.up.railway.app
- Frontend Hosting: Vercel with automatic deployments
- Backend Hosting: Railway with continuous deployment
- CDN: Vercel Edge Network for global distribution
- SSL: Automatic HTTPS with Let's Encrypt
- SPA Routing: Configured for client-side routing
- Vector Storage: Railway persistent disk for vector caching
- Node.js 18+ and npm
- Python 3.9+ and pip
- Git
# Clone the repository
git clone https://github.com/MikeZenko/carbonflow.git
cd carbonflow/frontend
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build# Navigate to backend directory
cd backend
# Install Python dependencies
pip install -r requirements.txt
# Set environment variables
export AZURE_OPENAI_ENDPOINT="your-endpoint"
export AZURE_OPENAI_API_KEY="your-api-key"
export JWT_SECRET_KEY="your-secret-key"
# Run development server
python app.pyCreate a .env file in the backend directory (copy from env.example):
# Required for authentication
JWT_SECRET_KEY=your-secure-jwt-secret-key
# Optional for AI features
AZURE_OPENAI_ENDPOINT=https://your-resource-name.openai.azure.com/
AZURE_OPENAI_API_KEY=your-api-key-here
AZURE_OPENAI_DEPLOYMENT_NAME=gpt-4
# System configuration
FLASK_DEBUG=False
DATABASE_FILE=database.json
VECTOR_CACHE_DIR=./vectorsPOST /api/register- User registrationPOST /api/login- User authenticationGET /api/profile- Get user profile (protected)
GET /api/producers- List all producersGET /api/consumers- List all consumersGET /api/matches- Vector-based matching with scoresPOST /api/analyze-matches- AI-powered analysis
POST /api/rebuild-vectors- Rebuild vector cacheGET /api/matching-stats- Vector system statistics
POST /api/impact-model- Generate partnership impact reportGET /api/analytics- Get analytics data
# Test backend vector system
cd backend
python -c "from vector_engine import VectorEngine; from matching_engine import AdvancedMatcher; print('Vector system working')"
# Test frontend build
cd frontend
npm run build# Test vector matching
curl "https://your-app.up.railway.app/api/matches?producer_id=prod_001"
# Test system statistics
curl "https://your-app.up.railway.app/api/matching-stats"- Vector Generation: 32-dimensional producer vectors, 28-dimensional consumer vectors
- Matching Speed: O(n) complexity with numpy optimizations
- Storage: File-based vector caching for Railway compatibility
- Memory Usage: Optimized for Railway's resource constraints
- Match Quality: 65% average match score with differentiated rankings
- Vectors automatically rebuild when data changes
- Use
/api/rebuild-vectorsto manually refresh - Monitor
/api/matching-statsfor system health
- Backend: Push to Git → Railway auto-deploys
- Frontend: Push to Git → Vercel auto-deploys
- DEPLOYMENT.md - Complete deployment guide
- VECTOR_SYSTEM_README.md - Vector system documentation
- INSTALLATION.md - Development setup guide
Built with for a sustainable future
