Skip to content

ms2176/SUKOON

Β 
Β 

Repository files navigation

SUKOON Smart Home Management

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.

Features

  • 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

Getting Started

Prerequisites

  • Node.js v16 or later
  • npm or yarn package manager
  • Firebase account

Installation

  1. Clone the repository:

    git clone https://github.com/ms2176/SUKOON.git
    cd SUKOON
  2. Install dependencies:

    npm install
    # or
    yarn install
  3. Create a .env file 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
    
  4. Run the development server:

    npm run dev
    # or
    yarn dev
  5. Open http://localhost:5173 in your browser to see the application.

Architecture

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

Project Structure

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

User Roles

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

Development

Scripts

  • npm run dev: Start the development server
  • npm run build: Build the production-ready app
  • npm run lint: Run ESLint to check code quality

Adding a New Device Type

  1. Create a new control component in src/customComponents/rooms/deviceconfigurations/
  2. Add appropriate icons in src/images/devicesIcons/
  3. Update the device type mappings in relevant files
  4. Add the new device type to the control page routing

Adding a New Feature

  1. Create components in a new directory under src/customComponents/
  2. Add new routes in App.tsx
  3. Update navigation components as needed

Contributing

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

License

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

Acknowledgments

  • Built by the SUKOON team
  • UI components from Flowbite React, Chakra UI, and HeroUI
  • Icons and illustrations from various sources

About

🏠 SUKOON – A smart home management app built with React + Firebase. Control devices, track energy use, and grow your virtual greenhouse with sustainable habits.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 92.8%
  • CSS 7.0%
  • Other 0.2%