A comprehensive React + Firebase + Phaser.js edtech platform for environmental education with enterprise-grade UI/UX.
- 🎮 Gamified Learning: Interactive quizzes, mini-games, and story missions
- 🏆 Rewards System: EcoCoins, badges, and leaderboards
- 👥 Role-based Access: Students, Teachers, and Admins
- 🌙 Dark/Light Theme: Enterprise-grade theming with glassmorphism
- 📱 PWA Support: Offline capabilities and mobile optimization
- 🌐 Multilingual: English, Hindi, and more
- 📱 AR Missions: Augmented reality for tree planting and waste segregation
- Frontend: React 18, TypeScript, SCSS, Framer Motion
- Backend: Firebase (Auth, Firestore, Functions)
- Games: Phaser.js
- AR: AR.js
- Deployment: Vercel (Frontend), Firebase (Backend)
src/
├── components/ # Reusable UI components
│ ├── Navbar.tsx # Top navigation
│ ├── Sidebar.tsx # Side navigation
│ ├── ThemeToggle.tsx # Dark/light mode toggle
│ └── ProtectedRoute.tsx
├── pages/ # Page components
│ ├── Login.tsx # Authentication
│ ├── Signup.tsx # User registration
│ ├── Dashboard.tsx # Role-based dashboard
│ ├── Quizzes.tsx # Interactive quizzes
│ ├── MiniGames.tsx # Phaser.js games
│ ├── StoryMissions.tsx # Comic-style missions
│ ├── Leaderboard.tsx # Rankings
│ ├── EcoCoins.tsx # Wallet UI
│ └── ARMissions.tsx # AR challenges
├── context/ # React contexts
│ ├── AuthContext.tsx # Authentication state
│ └── ThemeContext.tsx # Theme management
├── styles/ # SCSS styles
│ ├── _variables.scss # Design tokens
│ ├── _mixins.scss # Reusable mixins
│ └── global.scss # Global styles
├── games/ # Phaser.js game files
├── utils/ # Utility functions
└── firebase/ # Firebase configuration
└── config.ts
git clone <repository-url>
cd carbonctrl
npm install- Create a new Firebase project at Firebase Console
- Enable Authentication (Email/Password and Google)
- Create a Firestore database
- Copy the
.env.examplefile to.envand fill in your Firebase project details:
cp .env.example .envThen edit .env with your actual Firebase config:
REACT_APP_FIREBASE_API_KEY=your_api_key_here
REACT_APP_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com
REACT_APP_FIREBASE_PROJECT_ID=your_project_id
REACT_APP_FIREBASE_STORAGE_BUCKET=your_project_id.appspot.com
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
REACT_APP_FIREBASE_APP_ID=your_app_idnpm startThe app will be available at http://localhost:3000
npm run build- Primary: Emerald Green (#10b981)
- Secondary: Slate Gray (#64748b)
- Accent: Warning (#f59e0b), Error (#ef4444), Info (#3b82f6)
- Primary Font: Inter
- Secondary Font: IBM Plex Sans
- Weights: 300, 400, 500, 600, 700, 800
- Glassmorphism: Blur effects with transparency
- Animations: Framer Motion for smooth transitions
- Responsive: Mobile-first design with breakpoints
- Take quizzes and play games
- Complete story missions
- Earn EcoCoins and badges
- View leaderboards
- Approve student eco actions
- View class statistics
- Manage student progress
- Create assignments
- Manage schools and users
- Create competitions
- System-wide analytics
- Content management
- Connect your GitHub repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push to main branch
- Deploy Firestore security rules
- Deploy Firebase Functions
- Configure hosting if needed
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details
For support, email shauryajps@gmail.com or create an issue on GitHub.