Skip to content

small story sharing website built with react and go

Notifications You must be signed in to change notification settings

SarthakGirotra/Books

Repository files navigation

Books

Requirements

  • Docker
  • Docker-Compose

Technologies Used:

  • React.js
  • Go
  • Echo
  • Docker
  • Kafka
  • MongoDB

Installation

on Linux

make build
make run

on Windows

docker-compose build
docker-compose up -d

React will start at: https://localhost:3000

Local Installation without Docker

React frontend

requirements:

  • react.js
cd frontend
npm install
npm start

User microservice

requirements:

  • go
  • mongodb atlas url

rename .env.local.example to .env.local and add atlas url

cd user-microservice
go mod tidy
go run main.go

Books microservice

requirements:

  • go
  • mongodb atlas url

rename .env.local.example to .env.local and add atlas url

cd books-microservice
go mod tidy
go run main.go

Swagger Documentation

Docs Link
user-microservice https://localhost:1323/swaggerui
books-microservice https://localhost:1322/swaggerui

Data Input with CSV

Example csv provided with name Book1.csv

CSV format:

id title story date likes (comma seperated userids)
620916dd86cae49baedc7426 abc story1 15-01-2022 19:04 620916dd86cae49baedc7426,620916dd86cae49baedc7432
620916dd86cae49baedc74543 def story2 12-01-2022 12:04 620916dd86cae49baedc7326,620916dd86cae49baedc7412

swagger csv input

API endpoint