SUKOON is a modern, React-based smart home management application that allows users to control their smart devices, monitor energy consumption, and participate in gamification features that encourage sustainable living.
- User Authentication: Secure login and registration with email/password or Google Sign-In
- Multi-Home Management: Add and manage multiple homes/hubs
- Room & Device Control: Organize devices by room and control them remotely
- Energy Monitoring: Track energy consumption with detailed statistics and visualizations
- Be'ati Gamification: Grow a virtual greenhouse by meeting energy-saving goals
- Energy Assistant: AI-powered chatbot for energy management recommendations
- Admin Dashboard: Special features for property managers to monitor multiple units
- Device Pinning: Pin frequently used devices and rooms to your home screen
- Responsive Design: Works across desktop and mobile devices
- Node.js v16 or later
- npm or yarn package manager
- Firebase account
-
Clone the repository:
git clone https://github.com/ms2176/SUKOON.git cd SUKOON -
Install dependencies:
npm install # or yarn install -
Create a
.envfile in the project root with your Firebase configuration:VITE_FIREBASE_API_KEY=YOUR_API_KEY VITE_FIREBASE_AUTH_DOMAIN=YOUR_AUTH_DOMAIN VITE_FIREBASE_PROJECT_ID=YOUR_PROJECT_ID VITE_FIREBASE_STORAGE_BUCKET=YOUR_STORAGE_BUCKET VITE_FIREBASE_MESSAGING_SENDER_ID=YOUR_MESSAGING_SENDER_ID VITE_FIREBASE_APP_ID=YOUR_APP_ID -
Run the development server:
npm run dev # or yarn dev -
Open http://localhost:5173 in your browser to see the application.
SUKOON is built using the following technologies:
- Frontend Framework: React with TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS with Flowbite React components
- Backend Services: Firebase (Authentication, Firestore, Storage)
- Routing: React Router Dom
- API Integration: Fetch for data retrieval from SUKOON APIs and Groq for AI chatbot
sukoon/
βββ public/ # Static assets
βββ src/ # Source code
β βββ App.tsx # Main application component with routing
β βββ assets/ # Fonts and other static assets
β βββ components/ # Reusable UI components
β β βββ ui/ # Basic UI components (buttons, dialogs, etc.)
β βββ config/ # Configuration files
β β βββ firebase_conf.ts # Firebase initialization
β βββ customComponents/ # Feature-specific components
β β βββ account/ # User account management
β β βββ beati/ # Gamification feature
β β βββ homepage/ # Main dashboard
β β βββ login/ # Authentication flow
β β βββ navBar/ # Navigation components
β β βββ rooms/ # Room and device management
β β βββ settings/ # App settings
β β βββ stats/ # Statistics visualization
β βββ images/ # Image assets
β βββ JSONFiles/ # Static JSON data for development
β βββ utilities/ # Utility functions
β β βββ firebase_auth_functions.ts
β βββ index.css # Global styles
β βββ main.tsx # Application entry point
βββ .gitignore # Git ignore file
βββ index.html # HTML entry point
βββ package.json # Project dependencies and scripts
βββ tailwind.config.js # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ vite.config.ts # Vite build configuration
SUKOON supports two main user roles:
- Tenants: Regular users who manage their own homes, rooms, and devices
- Admins: Property managers who can monitor multiple tenant units and view aggregated statistics
npm run dev: Start the development servernpm run build: Build the production-ready appnpm run lint: Run ESLint to check code quality
- Create a new control component in
src/customComponents/rooms/deviceconfigurations/ - Add appropriate icons in
src/images/devicesIcons/ - Update the device type mappings in relevant files
- Add the new device type to the control page routing
- Create components in a new directory under
src/customComponents/ - Add new routes in
App.tsx - Update navigation components as needed
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built by the SUKOON team
- UI components from Flowbite React, Chakra UI, and HeroUI
- Icons and illustrations from various sources