SeiKasahara / IoT5506

IoT 5506 Project
http://freikom.xyz
Other
2 stars 0 forks source link

IoT 5506 Group 3 Project

Project Overview

This is an out-of-the-box open-source IoT platform specifically designed for Firebeetle and Xiao ESP32S3. The platform utilizes Docker for CI/CD automated builds, uses Sqlite3 as the default database management system, and provides Nginx port forwarding settings.

Key Features

Getting Started

To start the project, follow these steps:

  1. Build Docker Images: Use the following command to build the Docker images:

    docker compose up --build
  2. Start Docker Containers: If the Dockerfile has not been updated, you can start the containers using the script:

    ./docker-start.sh

Prerequisites

Frontend Structure Explanation

Framework and Styling

Project Structure

src (Main Project Folder)

The src directory is the core of our frontend project. It contains the following key subdirectories:

pages

components

libs

Styles

Backend Structure

app Folder

Future Plans

Database Options

By default, this project uses Sqlite3 as the database management system. If you wish to use MongoDB, you can rebuild it following these steps:

  1. Add MongoDB service in the docker-compose.yml file.
  2. Update the backend code to use MongoDB connection.
  3. Modify relevant data access layer code to adapt to MongoDB query syntax.

Cloud Server and SMTP Configuration

In the backend/.env file, you can add cloud server information and SMTP server account information:

# SMTP server configuration

EMAIL_HOST_USER = ""
EMAIL_HOST_PASSWORD = ""

Please ensure to keep this sensitive information confidential and do not commit it to public code repositories.

Hardware Code Upload Considerations

Before uploading hardware code using Arduino, be sure to add WiFi SSID and password in the macro definitions. For example:

#define SSID "Your SSID"
#define PW "Password"

This ensures that your IoT device can correctly connect to the specified WiFi network.

Nginx Port Forwarding

This project includes Nginx configuration for port forwarding. You can find the relevant settings in the nginx/nginx.conf file. You can modify port mappings or add other server blocks as needed.

Important Considerations

  1. When working with globals.css, be cautious as changes can affect the entire project.
  2. Ensure consistent use of components from the components folder to maintain UI coherence.
  3. When adding new API endpoints or utility functions, place them in the libs folder for easy access and management.

Contribution Guidelines

We welcome community contributions! If you want to contribute to this open-source IoT platform, please follow these steps:

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

License

see the LICENSE file for details.

Additional Information

Happy coding!