Skip to content

P149-Bootcamp-Graduation-Project/Group3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inavitas NodeJS Bootcamp Graduation Project Group 2

School Energy Tracking System

With this project, we will be able to monitor temperature, air quality and average electricity consumption of the classrooms. 3 different sensors will be generate and simulated data in seconds. This data will be retrieved from PostgreSql and Redis with Reader API. This data will first be added to the queue by the Producer API. Consumer API will receive this data and save it in databases. It also logs all errors to MongoDB with another API.

pelus

Microservices

Random Data Generator

Air Data Generator  
Temperature Data Generator  
Electricity Data Generator  

Producers

Air Producer
Temperature Producer
Electricity Producer

Consumers

Air Consumer
Temperature Consumer
Electricity Consumer

Error Log API

Reader API

Installation

Clone First

 git clone https://github.com/P149-Bootcamp-Graduation-Project/Group3

To run each API

  npm i
  node app.js

To run data generators

  go run main.go

Authors

  • @İlyas Yağcıoğlu
    • (Air Producer, Temperature Producer, Electricity Producer, Reader API)
  • @Oğuzhan Eyerci
    • (Air Consumer, Temperature Consumer, Electricity Consumer, Error Log API )
  • @Atakan Dönmez
    • (Air Consumer, Temperature Consumer, Electricity Consumer)

Acknowledgements

Tech Stack

Server: Node, Express
Databases: PostgreSql (for main database), MongoDb (for error logs), Redis (for cache)
Other: Docker, Kafka (for queue), Swagger (for Documentation), jwt (for user auth)

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

PGHOST=88.198.26.82
PGPORT=5432
PGUSER=group2
PGPASSWORD=Password1
PGDATABASE=patika

REDIS_HOST=88.198.26.82
REDIS_PORT=6379
REDIS_INDEX=2
REDIS_PASS=dd3j5sKmUHVD6xpG

MONGODBNAME = test
MONGOURI = mongodb+srv://ivanbarayev:tDVRDyxJbdjF7k9G@docdb.xmg8e.mongodb.net/?ssl=true&authSource=admin

producer-temp-api APP_PORT=9461
producer-power-api APP_PORT=9462
producer-air-api APP_PORT=9463

consumer-temp-api APP_PORT=9464
consumer-power-api APP_PORT=9465
consumer-air-api APP_PORT=9466

error-logger-api APP_PORT=9467

APP_HOST=127.0.0.1  

Producer & fake data generator working video:

youtube

Producer is send error to error-logger-api :

youtube

Releases

No releases published

Packages

No packages published