Skip to content

mrbrightsides/rantai-3c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

⛅ RANTAI 3C

Cloud. Climate. Chain.

Integrating Technology for a Sustainable Future

Next.js TypeScript Tailwind CSS License

RANTAI 3C adalah platform manajemen jejak karbon berbasis Web3 yang mengintegrasikan cloud infrastructure monitoring, analisis emisi karbon berbasis AI, dan sertifikasi blockchain untuk transparansi dan akuntabilitas lingkungan.


🎯 Vision & Purpose

RANTAI 3C dirancang untuk memberikan individu dan organisasi antarmuka yang seamless untuk memantau dan mensertifikasi jejak karbon mereka menggunakan infrastruktur cloud yang scalable dikombinasikan dengan kekuatan blockchain yang immutable.

Platform ini melayani bisnis yang peduli lingkungan, analis keberlanjutan, dan organisasi yang ingin mengoptimalkan pelaporan dampak lingkungan mereka.


Core Features

☁️ Cloud - Data Management

  • Manual Upload: Import data konsumsi energi melalui CSV/JSON files
  • Automated Data Pulling: Integrasi dengan cloud providers (AWS, Google Cloud, Azure)
  • Cloud Infrastructure Dashboard: Real-time metrics untuk storage, processing, dan scalability
  • Data Validation System: Quality scoring dengan detailed error detection
  • Template Downloads: Sample CSV & JSON templates dengan data Indonesia

🌍 Climate - Carbon Analysis

  • Carbon Footprint Calculation: Estimasi emisi berbasis data konsumsi energi
  • AI-Powered Insights: 4 tipe analisis (Pattern Analysis, Efficiency Optimization, Predictive Analytics, Benchmarking)
  • Interactive Visualizations: Bar, Pie, dan Line charts dengan drill-down capabilities
  • Historical Tracking: Progress monitoring over time dengan trend analysis
  • Smart Recommendations: Actionable steps dengan priority classification
  • Multiple Export Options: PDF, CSV, Excel, JSON formats

⛓️ Chain - Blockchain Certification

  • SIWE Authentication: Secure Sign-In With Ethereum
  • Smart Contract Integration: Sepolia testnet deployment
  • Immutable Records: Permanent carbon footprint certification
  • View-Only Mode: Educational blockchain content tanpa wallet requirement
  • Certificate Downloads: JSON certificates untuk compliance

🌱 Carbon Offset Marketplace

  • Verified Indonesian Projects: 4 sustainability initiatives (Reforestation, Solar, Mangrove, CCUS)
  • Net-Zero Tracking: Visual progress toward carbon neutrality
  • Transparent Pricing: $12-25 per ton CO₂
  • Impact Metrics: Specific environmental impact per project
  • Achievement System: Badges untuk sustainability milestones

📊 Advanced Analytics

  • Data Quality Scoring: 0-100 quality metrics dengan improvement recommendations
  • Interactive Charts: Click, filter, sort dengan enhanced tooltips
  • Historical Trends: LocalStorage persistence dengan percentage change tracking
  • Professional Reports: Executive-ready PDF exports dengan visual metrics

🎮 Gamification

  • Sustainability Levels: Eco Champion, Carbon Conscious, Environmental Explorer
  • Achievement Badges: Carbon Tracker, Data Collector, Blockchain Pioneer, Offset Champion
  • Progress Goals: Visual tracking menuju sustainability targets

Flow Diagram

flowchart TD
    A["Cloud ☁️"] --> B["Climate 🌍"]
    B --> C["Chain 🔗"]
    C --> A
    subgraph Details
        A1["Scalable Infra"]:::cloud
        A2["Carbon-aware Cloud"]:::cloud
        B1["Carbon Footprint Tracker"]:::climate
        B2["SAFE: Smart Atlas for Environment"]:::climate
        C1["Green Blockchain"]:::chain
        C2["STC Certified"]:::chain
    end
    A --> A1
    A --> A2
    B --> B1
    B --> B2
    C --> C1
    C --> C2

classDef cloud fill:#cce5ff,stroke:#0066cc,color:#003366
classDef climate fill:#d4edda,stroke:#28a745,color:#155724
classDef chain fill:#f8d7da,stroke:#dc3545,color:#721c24
Loading

🛠️ Tech Stack

Frontend

  • Framework: Next.js 14 (App Router)
  • Language: TypeScript (Strict Mode)
  • Styling: Tailwind CSS
  • UI Components: ShadCN UI (Radix UI primitives)
  • Charts: Recharts
  • Icons: Lucide React

Web3

  • Wallet Integration: ethers.js v6
  • Authentication: SIWE (Sign-In With Ethereum)
  • Network: Ethereum Sepolia Testnet
  • Smart Contract: Custom Carbon Records contract

Data Processing

  • CSV Parsing: PapaParse
  • PDF Generation: jsPDF
  • Excel Export: xlsx (SheetJS)

State Management

  • Local Storage: Historical data persistence
  • React Hooks: useState, useEffect, useCallback

📦 Installation

Prerequisites

  • Node.js 18+
  • npm or yarn
  • MetaMask or compatible Web3 wallet (optional)

Setup

  1. Clone the repository
git clone https://github.com/yourusername/rantai-3c.git
cd rantai-3c
  1. Install dependencies
npm install
# or
yarn install
  1. Run development server
npm run dev
# or
yarn dev
  1. Open in browser
http://localhost:3000

🚀 Usage Guide

Quick Start with Demo Data

  1. Navigate to "Tentang App" tab untuk memahami platform
  2. Click "Try Demo Data" untuk instant exploration
  3. Explore features across all 6 tabs

Manual Data Upload

  1. Go to "Cloud" tab
  2. Click "Choose File" dan upload CSV/JSON
  3. View data validation results dan quality score
  4. Proceed to "Climate" tab untuk analysis

Automated Data Pulling

  1. Navigate to "Auto Pull" tab
  2. Select cloud provider (AWS/GCP/Azure)
  3. Enter API credentials (simulated)
  4. Choose date range
  5. Click "Pull Data" untuk automated import

Carbon Analysis

  1. "Climate" tab shows calculated emissions
  2. Interact with charts (click, filter, sort)
  3. Review AI insights dan recommendations
  4. View historical trends
  5. Export reports (PDF/CSV/Excel)

Carbon Offsetting

  1. Go to "Offset" tab
  2. Review net-zero progress
  3. Browse verified Indonesian projects
  4. Select project dan purchase offsets
  5. Track achievement badges

Blockchain Certification

  1. Navigate to "Chain" tab
  2. View Mode: Learn about blockchain benefits
  3. Certify Mode: Connect MetaMask wallet
  4. Sign SIWE message
  5. Store carbon record on Sepolia
  6. Download JSON certificate

📁 Project Structure

rantai-3c/
├── src/
│   ├── app/
│   │   ├── page.tsx              # Main application page
│   │   ├── layout.tsx            # Root layout
│   │   └── globals.css           # Global styles
│   ├── components/
│   │   ├── ui/                   # ShadCN UI components
│   │   ├── AboutApp.tsx          # About section
│   │   ├── DataUpload.tsx        # Cloud tab - manual upload
│   │   ├── AutomatedDataPulling.tsx  # Auto pull tab
│   │   ├── CarbonAnalysis.tsx    # Climate analysis
│   │   ├── BlockchainCertification.tsx  # Chain certification
│   │   ├── CarbonOffsetMarketplace.tsx  # Offset marketplace
│   │   ├── DataValidation.tsx    # Validation system
│   │   ├── InteractiveCharts.tsx # Advanced charts
│   │   ├── HistoricalTrends.tsx  # Progress tracking
│   │   └── ExportManager.tsx     # Export utilities
│   ├── lib/
│   │   └── utils.ts              # Utility functions
│   └── types/
│       └── index.ts              # TypeScript interfaces
├── public/                       # Static assets
├── package.json
├── tsconfig.json
├── tailwind.config.ts
└── README.md

🔧 Development

Available Scripts

# Development server
npm run dev

# Production build
npm run build

# Start production server
npm start

# Linting
npm run lint

Code Quality

  • TypeScript strict mode enabled
  • ESLint configured
  • Zero console errors
  • Mobile-responsive design
  • Accessibility best practices

Adding New Features

  1. Create component in src/components/
  2. Define TypeScript interfaces in src/types/
  3. Import dan integrate in src/app/page.tsx
  4. Test across devices dan browsers

🌐 Smart Contract Details

Network: Ethereum Sepolia Testnet

Contract Address:

0x874378E56D92a0C4633b27A1730AD0CF8e7b4891

RPC Endpoint:

https://sepolia.infura.io/v3/f8d248f838ec4f12b0f01efd2b238206

Functions:

  • storeRecord(string dataHash, uint256 carbonValue): Store carbon record
  • getRecord(uint256 recordId): Retrieve record details
  • totalRecords(): Get total records count

Events:

  • RecordStored: Emitted when new record is stored

📊 Data Format Specification

Required Fields

  • date: Date of consumption (YYYY-MM-DD, DD/MM/YYYY, or MM/DD/YYYY)
  • category: Energy category (Office, Manufacturing, Data Center, Vehicle, HVAC, Lighting)
  • consumption: Energy consumption in kWh

Optional Fields

  • location: Geographic location (e.g., Jakarta, Surabaya)
  • source: Energy source (Grid, Solar, Wind, Diesel)

Supported Formats

  • CSV: Comma-separated values
  • JSON: Array of objects

Example CSV:

date,category,consumption,location,source
2024-01-15,Office,450,Jakarta,Grid
2024-01-16,Manufacturing,1200,Surabaya,Grid

Example JSON:

[
  {
    "date": "2024-01-15",
    "category": "Office",
    "consumption": 450,
    "location": "Jakarta",
    "source": "Grid"
  }
]

🎨 Design System

Color Palette

  • Primary: Green shades (sustainability theme)
  • Secondary: Blue tones (technology theme)
  • Accent: Orange/Yellow (energy theme)
  • Neutral: Gray scale

Typography

  • Font: System fonts (optimized for performance)
  • Headings: Bold weights
  • Body: Regular weights

Components

  • ShadCN UI for consistency
  • Custom carbon-themed components
  • Responsive grid layouts
  • Interactive charts dan visualizations

🚢 Deployment

Vercel (Recommended)

  1. Push code to GitHub
  2. Import repository in Vercel
  3. Configure environment variables (if needed)
  4. Deploy

Other Platforms

  • Netlify
  • AWS Amplify
  • Digital Ocean App Platform

Build Command:

npm run build

Output Directory:

.next

🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add some AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open Pull Request

Contribution Guidelines

  • Follow TypeScript strict mode
  • Maintain code quality
  • Write descriptive commit messages
  • Test across devices
  • Update documentation

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.


👨‍💻 Credits

Developed by: mrbrightsides

Website: rantai.elpeef.com


🌟 Roadmap

Phase 1: MVP ✅ (Current)

  • Manual data upload
  • Carbon footprint calculation
  • Blockchain certification
  • Basic visualizations

Phase 2: Enhanced Analytics ✅ (Current)

  • AI-powered insights
  • Historical tracking
  • Interactive charts
  • Multiple export formats
  • Data quality validation

Phase 3: Automation & Marketplace ✅ (Current)

  • Automated data pulling (simulated)
  • Carbon offset marketplace
  • Gamification system
  • Professional PDF reports

Phase 4: Enterprise Features 🔜 (Future)

  • Real API integrations (AWS, GCP, Azure)
  • Backend database (PostgreSQL/MongoDB)
  • User authentication system
  • Multi-user/team features
  • Role-based access control
  • Payment processing untuk offsets
  • API layer untuk external integrations

Phase 5: Scale & Optimize 🔜 (Future)

  • Mainnet deployment (Base blockchain)
  • Real ML models untuk predictions
  • Mobile app (React Native)
  • Advanced analytics suite
  • Regulatory compliance templates
  • Public transparency dashboard

📞 Support

For questions, issues, or feature requests:


🙏 Acknowledgments

  • Next.js Team: For amazing React framework
  • ShadCN: For beautiful UI components
  • Ethereum Foundation: For blockchain infrastructure
  • Indonesian Sustainability Projects: For verified offset opportunities
  • Open Source Community: For incredible tools dan libraries

📈 Statistics

  • Total Lines of Code: ~3,500+
  • Components: 15+ custom components
  • Features: 30+ major features
  • Supported Formats: CSV, JSON, PDF, Excel
  • Blockchain Network: Ethereum Sepolia
  • Carbon Projects: 4 verified Indonesian initiatives

🎯 Use Cases

For Organizations

  • ESG compliance reporting
  • Carbon footprint monitoring
  • Sustainability goal tracking
  • Stakeholder reporting

For Sustainability Managers

  • Data-driven decision making
  • Progress tracking over time
  • Identify high-emission areas
  • Carbon offset planning

For Consultants

  • Client demonstrations
  • Carbon audit tools
  • Report generation
  • Advisory services

For Educators

  • Environmental awareness
  • Blockchain education
  • Sustainability training
  • Data analysis teaching

🌍 Impact

RANTAI 3C aims to contribute to:

  • UN Sustainable Development Goals: Climate Action (SDG 13)
  • Paris Agreement: Net-zero emissions by 2050
  • Indonesian Climate Targets: 29% emission reduction by 2030
  • Corporate ESG Goals: Transparent environmental reporting

Built with ❤️ for a sustainable future

RANTAI 3C - Integrating Technology for a Sustainable Future 🌍

Releases

No releases published

Packages

No packages published

Languages