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.
Air Data Generator
Temperature Data Generator
Electricity Data Generator
Air Producer
Temperature Producer
Electricity Producer
Air Consumer
Temperature Consumer
Electricity Consumer
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
- @İ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)
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)
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:[email protected]/?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