POCs To Do

  • FastAPI
  • FastAPI + MongoDB
  • FastAPI + Github API
  • FastAPI - Docker
  • MongoDB - Install & Connect (local)
  • MongoDB - Docker
  • Nodejs express
  • Nodejs express + MongoDB
  • Nodejs axios + Backend API
  • Nodejs + express Docker
  • Angular (with nginx) - Docker
  • Angular
  • Angular GUI List
  • Angular GUI Details
  • Angular GUI Search
  • Angular Docker
  • Docker-compose

Github Repo Data Collector

Table of Contents

Description

Microservices: Nodejs FastAPI Angular MongoDB

This project is a microservices architecture that collects data from Github repositories and stores it in MongoDB. The data is then displayed in a frontend using Angular. The frontend will query the data from the backend using Nodejs.

Overview

  1. FastAPI - for collecting data from Github which will connect to github and get information for a certain repo then save it in MongoDB

  2. Angular - for the frontend to show the data visually using rest api

  3. Nodejs - for microservices - this will be used for the frontend to query the data from the db

  4. MongoDB - for storing the data

Assumptions & Requirements

Repositories to query are all public repositories.

Project requires:

  • Python v3.10
  • MongoDB v7.0.12
  • Nodejs v18.0.0
  • Angular v13.0.3

How to run the services

Containers

Build and run the services using Docker Compose:

docker-compose up --build

Or use docker:

docker build -t frontend .
docker run -p 4200:80 frontend

docker rmi $(docker images -a -q)
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)

Services

MongoDB

sudo systemctl start mongod

Backend FastAPI with python 3.10

cd backend
pip install -r requirements.txt
uvicorn app.main:app --reload

Frontend

Using Angular CLI to create the angular-service on the root folder:

npm install -g @angular/cli
ng new angular-service
ng build --configuration production

Angular set up and run:

cd frontend
npm install
ng serve

Nodejs Microservice

Nodejs

cd frontend
npm install
npm install express axios
npm start