Coder Social home page Coder Social logo

teghoz / the-room-demo Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.99 MB

A simple Demo to showcase some concepts

License: GNU General Public License v3.0

C# 43.50% Dockerfile 1.26% HTML 2.84% CSS 2.36% JavaScript 49.81% Shell 0.22%
microservices-architecture monolith-architecture identityserver4 testhost reactjs swagger javascript

the-room-demo's Introduction

the-room-demo

Instructions and Questions here.

Here are my answers ๐Ÿ‘Œ.

Getting Started

Make sure you have installed and configured docker in your environment. After that, you can run the below commands from the /src/ directory and get started with the TheRoomContainers immediately.

docker-compose build
docker-compose up

Project Structure

I have approached the problem in both a microservices and monolithic way.

Monolithic Approach

Once the container is loaded up ๐Ÿš€, you can get access to the TheRoomSimpleAPI service. It is standalone and performs all its activity itself. You would have to use the /api/v1/Auth/Register endpoint to get registered and logged in. An unthentication token would be provided in the response which you would use to access the other endpoints. It has its swagger documentation so you would have a means to see all the available options and test it directly.

Simple API in action

You have to pass in a bearer token to access the endpoint sitting behind authentication. All you have to do is insert Bearer eyuuiouio.............. into the modal that comes up after clicking on the padlock icon on the endpoint you want to access or you can use the authorized button above.

Microservices Approach

In this approach I have splitted out the concerns into different isolated services. The following are the services:

  • Identity Server. Find out more here and here

  • ServiceList Service - Which just handles the list of all services.

  • Bonus Service

  • RabbitMQ - which servers as the message broker on development. Do note that you have to register a new user in order to use the functionality *Default Username is the_root and Password is Pass@word

  • Web Status - Which polls the services to report health checks.

  • SQL Server - which houses some of the sevices databases.

  • MongoDb - which the bonus service would use.

  • Seq - which handles logging

Frontend Client - React

  • React - The react app gets authorized by the identity server and stores its token in localStorage. With that it gets access to the ServiceList Service which provides information about the service lists.
React app

Do note that i did not spend alot of time on the aesthetics as a result of time constraint

Auth service in action

ServiceListAPI Swagger

ServiceListAPI Sample Request

Testing

I have also showcased Unit Testing and Integration Testing for the ServiceListAPI Services.

I have use AutoFixture to mock sample data on the Unit Test and the awesome .Net TestHost for integration testing.

Outstandings
  • Bonus API Service
  • Aesthetics Improvements
if you are experiencing challenges from the docker side, you can run the projects directly on Visual Studio while the containers are up.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.