BEACON
Table of Contents
π―οΈ Overview
Our mission is to design and develop a unified and secure smart home ecosystem leveraging the robustness of Golang technology, facilitated by the Raspberry Pi and Zigbee network. We aim to create a seamless, user-friendly interface that provides homeowners with intuitive control, real-time feedback, and a high level of security for all their smart home devices. By implementing a system with robust token-based authentication and meticulous event logging in a MongoDB database, we commit to ensuring the integrity and confidentiality of user data. Our goal is to enhance the quality of life for our users by delivering a state-of-the-art smart home experience that is secure, efficient, and easily manageable.
π§ Technologies
- π£ Languages: Golang, JavaScript, C++, CSS/HTML
- π Web UI Framework: React JS Library
- π Database: Mongo Database
- ποΈ Authentication: Token-based for both users and web services
- Version Control: Git
π Key Elements
- React-based web application designed to simulate a smart home system, enabling users to monitor and control various devices and users.
- Restful API to handle and authenticate front-end requests as well as facilitate DAL functionality.
- Database Access Layer to interface database and update IoT devices.
- Zigbee Network to facilitate secure communication between Raspberry Pis an associated devices.
- AES BlockChain to ensure data integrity, security, and decentralization of device communication.
π Setup and Configuration
- βοΈ Configuration:
- ....list which file has the setup
πΌ Data Access Layer (DAL)
- CRUD (CREATE, READ, UPDATE, DELETE) operations for users and devices within a smart home system
- Update functionality to change IoT device states via message serialization and broadcasting.
- IoT device state changes are logged and retrievable
β° Loggingπ
- All IoT device updates are logged for monitoring, analysis, and auditing purposes.
- Logged data is stored within a database collection for retrieval from the API.
π Database
- Contains user collection comprised of name, role, and login credentials.
- Stores various device collections which correspond with IoT devices.
- Log collection to track IoT device updates.
π₯ Development Environment
- π IDE: JetBrains GoLand
- ...specify the file that has the instructions to set up the dev env
π Deployment and CI/CD Workflow
Build Workflows
- The repository is configured with build workflows to compile binary files and store them as zipped artifacts in the GitHub Actions artifact store.
- Locations of the build files:
We utilize cross-platform compilation to compile the backend code for both Raspberry PI 3 and Raspberry PI 4 versions.
Build for Raspberry PI 3
- To build the binary file for Raspberry PI 3, we use the following flags with
go build
: GOOS=linux GOARCH=arm GOARM=7
Build for Raspberry PI 4
- To build the binary file for Raspberry PI 4, we use the following flags with
go build
: GOOS=linux GOARCH=arm64
Service Deployment
- GitHub Actions is configured to SSH into machines using IP addresses stored in the Secrets storage. It copies artifacts to these end machines using an SSH key, which is also located in the Secrets store.
Service Testing
Test Workflow
- The repository has a test workflow configured to test the software using GitHub Actions.
- Location of the test workflow files:
Testing Details
- GitHub Actions is used to run automated tests of the software.
- The build pipeline performs the following tasks:
- Spins up a MongoDB server.
- Imports database definitions into the MongoDB server running within a container on GitHub Actions.
- Builds and runs binaries in the container.
- Executes API requests to test various endpoints and overall software functionality.
- Utilizes the Testify library to facilitate writing and running tests.
ποΈ Communication
- πͺ Communication Platform: All team communications will be managed via MS Teams.
π₯ Contributors