This project provides a carbon offset trading platform targeting individual users in Taiwan. The system integrates with ClimateTrade API for carbon offset services, using Next.js for the frontend, Golang for the backend, Heroku for compute instances, Supabase for the database, and Greenworld ECPay for payment processing.
- Framework: Next.js
- Features:
- Dynamic rendering using Server-Side Rendering (SSR) and Static Site Generation (SSG).
- API Routes for lightweight backend logic.
- User-friendly interface for purchasing carbon offsets.
- Language: Golang
- Responsibilities:
- Business logic for processing carbon offset orders.
- Integration with ClimateTrade API.
- Communication with the Supabase database and Greenworld ECPay payment system.
- Platform: Supabase
- Features:
- Real-time updates for user transactions.
- Role-based access and authentication for users.
- Scalable cloud-hosted PostgreSQL backend.
- Provider: Greenworld ECPay
- Capabilities:
- Credit card and bank transfer support.
- Webhook integration for payment status updates.
- Secure handling of user financial data.
- Compute Instance: Heroku
- Benefits:
- Simplified deployment for rapid development.
- Scalable to handle traffic growth.
- Seamless integration with Golang and Supabase.
- climatiq(information caculate api)
- Patch(trade pot api)
- https://app.persefoni.com/
-
User Interaction:
- Users access the platform via the Next.js frontend.
- They can calculate their carbon footprint and place carbon offset orders.
-
Order Processing:
- Orders are sent to the Golang backend.
- The backend communicates with ClimateTrade API to execute transactions.
-
Payment Handling:
- Payment requests are processed via Greenworld ECPay.
- Webhooks confirm payment success and update the Supabase database.
-
Data Management:
- Supabase handles real-time transaction updates.
- Users can view their transaction history and carbon offset certificates.
- Node.js and npm for frontend development.
- Go environment for backend development.
- Supabase account for database integration.
- Heroku CLI for deployment.
-
Clone this repository:
git clone https://github.com/your-repo-name/carbon-offset-platform.git cd carbon-offset-platform -
Set up the environment variables for:
- ClimateTrade API
- Supabase database connection
- Greenworld ECPay credentials
-
Install dependencies:
# Frontend cd frontend npm install # Backend cd ../backend go mod tidy
-
Deploy the system:
- Deploy frontend using your preferred hosting provider (e.g., Vercel, Netlify).
- Deploy backend to Heroku using Docker or Go buildpack.
This project is licensed under the MIT License.
Contributions are welcome! Please open an issue or submit a pull request to propose changes or enhancements.