mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-10 15:17:41 +00:00
24
README.md
24
README.md
@ -1,8 +1,27 @@
|
||||
# Backend
|
||||
|
||||
## Description
|
||||
## Overview
|
||||
This is the backend for an IoT application built using NestJS. It interfaces with the Tuya IoT cloud platform to manage homes, rooms, devices, ...etc.
|
||||
This is the backend APIs project, developed with NestJS for Syncrow IOT Project.
|
||||
|
||||
## Database Model
|
||||
The database uses PostgreSQL and TypeORM. Below is an entity relationship diagram:
|
||||
|
||||
The main entities are:
|
||||
|
||||
User - Stores user account information
|
||||
Home - Represents a home/space
|
||||
Room - Represents a room/sub-space
|
||||
Device - Represents a connected device
|
||||
Product - Stores metadata about device products
|
||||
Other Entities - sessions, OTPs, etc.
|
||||
|
||||
The entities have a one-to-many relationship - a user has multiple homes, a home has multiple rooms, and a room has multiple devices.
|
||||
|
||||
## Architecture
|
||||
The application is deployed on Azure App Service using Docker containers. There are separate deployment slots for development, staging, and production environments.
|
||||
|
||||
|
||||
## Installation
|
||||
First, ensure that you have Node.js `v20.11` or newer (LTS ONLY) installed on your system.
|
||||
|
||||
@ -38,3 +57,6 @@ $ npm run test:e2e
|
||||
$ npm run test:cov
|
||||
```
|
||||
|
||||
## ERD Diagram
|
||||
|
||||

|
Reference in New Issue
Block a user