CarbonFlow is a blockchain-powered platform that facilitates the buying, selling, and retiring of carbon credits, providing a transparent and efficient marketplace for environmental impact.
- Carbon Credit Marketplace: Browse and purchase verified carbon credits from various environmental projects
- Web3 Integration: Seamless blockchain integration for secure transactions
- Portfolio Management: Track your carbon credit holdings and their performance
- Real-time Analytics: Monitor market trends and portfolio statistics
- Transaction History: View detailed history of purchases and retirements
- Secure Authentication: Email and wallet-based authentication system
- Frontend: React, TypeScript, Tailwind CSS
- Blockchain: Ethereum (Web3)
- Backend: Supabase (PostgreSQL)
- Authentication: Supabase Auth
- State Management: React Query
- Web3 Libraries: wagmi, viem, ethers.js
- Node.js 18+
- npm or yarn
- MetaMask or compatible Web3 wallet
- Supabase account
Create a .env
file in the root directory:
VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
VITE_USDC_ADDRESS=usdc_contract_address
VITE_CARBON_MARKET_ADDRESS=market_contract_address
- Clone the repository:
git clone https://github.com/1995th/carbonflow.git
cd carbonflow
- Install dependencies:
npm install
- Start the development server:
npm run dev
The application uses Supabase as its database. The schema includes:
- Carbon credits table
- User portfolios table
- Transactions table
- Watchlist table
Database migrations are located in supabase/migrations/
.
carbonflow/
├── src/
│ ├── components/ # React components
│ ├── contexts/ # React contexts
│ ├── hooks/ # Custom hooks
│ ├── lib/ # Utility libraries
│ ├── pages/ # Page components
│ ├── types/ # TypeScript types
│ └── utils/ # Helper functions
├── public/ # Static assets
└── supabase/ # Database migrations
- Wallet connection using wagmi
- USDC token integration for purchases
- Smart contract interactions for carbon credit trading
- Email/password authentication
- Wallet connection requirement
- Protected routes and permissions
- Browse available credits
- Purchase with USDC
- Retire credits for offset
- Transaction history tracking
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License
- Supabase for backend infrastructure
- Tailwind CSS for styling
- wagmi for Web3 integration
- Lucide Icons for UI icons