Device Registry is responsible for managing the creation of devices, sites, and events, along with handling the associated activities that occur within a site..
- Device Management: Create, edit, and delete devices.
- Site Management: Manage sites associated with devices.
- Event Management: Log and manage events (measurements) related to devices and sites.
- Activity Monitoring: Track activities occurring within the site.
- Cohort Management: Manage Cohorts associated with devices.
- Grid Management: Manage Grids associated with sites.
- Health Tips Management: Manage Health Tips associated with Measurements.
- Know Your Air (KYA) Management: Manage Know Your Air (KYA) lessons and quizzes.
- Backend: Node.js with Express.js
- Database: MongoDB
- Authentication: AirQo Tokens
- Containerization: Docker
- Orchestration: Kubernetes
Ensure you have the following installed:
- Node.js (version 14 or higher)
- Docker (if using Docker for deployment)
-
Clone the repository
git clone https://github.com/airqo-platform/AirQo-api.git
-
Navigate to the microservice directory
cd AirQo-api/src/device-registry
-
Install dependencies
npm install
-
Run the service
-
On macOS:
npm run dev-mac
-
On Windows:
npm run dev-pc
-
-
Build the Docker image
docker build --target={TARGET_STAGE} -t {IMAGE_NAME} .
-
Run the Docker container
docker run -d --name {CONTAINER_NAME} -p host-port:container-port {IMAGE_NAME}
After successfully running the container, you can test the respective endpoints.
This project utilizes Kubernetes for container orchestration.
-
Build the image within the microservice's directory
docker build --target={TARGET_STAGE} -t {IMAGE_NAME} .
-
Push the image to a Docker registry
-
Use the images in your Kubernetes deployment files accordingly
We welcome contributions! Please see our Contributing Guide for more details.
This project is licensed under the MIT License - see the LICENSE file for details.