Skip to content

Please start from here - this is the root folder to launch all components and microservices of the pjx project.

Notifications You must be signed in to change notification settings

mikelau13/pjx-root

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pjx-root

An one stop shop to launch the entire pjx dockerized application.

Overview

To run pjx-root you will need the following projects:

  • pjx-web-react - this is the client side web interface, developed using React.js

  • pjx-graphql-apollo - Api gateway using Apollo Server, the web interface pjx-web-react consumes Api through this GraphQL middleware

  • pjx-sso-identityserver - open source IdentityServer4 with .NET Core 3.1, it is an identity server to handle authentication of the web app with OAuth2, the pjx-web-react web interface will be connecting to this server using ocid-client client library. Visit IdentityServer4 for documentations.

  • pjx-api-node - Api backend developed with TypeScript to fetch data and manage business logic.

  • pjx-api-dotnet - Api backend developed with DotNet Core 3.1 to fetch data and manage business logic.

Architecture overview looks like this: pjx Architecture Overview

Kubernetes Cluster looks like this: pjx Kubernetes Deployment

Installation

You will need to ensure you have Docker installed on your machine.

Clone pjx-root repo. The is to make this the parent directory for the pjx projects.

How does it work?

Once you've cloned this repo you will see an empty folder /projects.

This folder contains other cloned github repos, where each repo represents a dockerized project. (ie. api, Apollo server, web client, etc). The contents of this folder are ignored by git, and should not be committed to version control - you download the repos and launch them, but not supposed to make or commit any changes inside projects folder.

Helm Charts

helm install pjx-release helm-pjx/

Running a solution

To run the pjx solution, clone all the required repos inside the projects folder, then run the docker-compose up on the root folder:

cd ./projects
git clone https://github.com/mikelau13/pjx-graphql-apollo.git
git clone https://github.com/mikelau13/pjx-api-node.git
git clone https://github.com/mikelau13/pjx-api-dotnet.git
git clone https://github.com/mikelau13/pjx-sso-identityserver.git
git clone https://github.com/mikelau13/pjx-web-react.git
docker-compose -f ../docker-compose.yml up

Execute this command to stop them:

$ docker-compose -f ../docker-compose.yml down

On development environment, you might want to first prune all containers to avoid any conflicts:

docker system prune

Then verify your containers are up and running:

$ docker ps

Hosts and SSL

For localhost testing, you will need to set up the hosts file and trust the SSL certificate for your machine/web browsers, please follow the instructions on my other project pjx-sso-identityserver.

Using the web app

You can now visit http://localhost:3000 to try the website, there are few sanity testing you can try:

  • register a new account - verify if the web app client side is consuming the Identity Server API, with SSL and CoRS settings, properly or not
    pjx user registration

  • activate your account - since this project is for demo purpose, you will not receive the activation email, instead, after registration, check the command logs to find the activation code to active your account
    pjx user registered
    pjx user validated

  • login
    pjx user login

  • on the site menu, visit the /country/all page - this will verify the connectivity with the .NET Core API, which will authenticate the connection with the Identity Server on the backend side

  • on the left/hamburger menu, visit the /cities page - it will verify the Apollo Server and the Restify API

  • on the left/hamburger menu, visit the Profile page - it will verify the Identity Server MVC

  • Calendar - CURD
    pjx calendar

  • Sign Out
    pjx user signout

  • visit the GraphQL playground of the Apollo Server - http://localhost:4000 pjx graphql playground

  • try out the Swagger of the .NET Core API - http://localhost:6001/swagger/ pjx api swagger

  • try out the Swagger of the Identity Server - https://pjx-sso-identityserver/swagger pjx sso swagger

  • try out the responsive HTML design by changing the browser size pjx html responsive

About

Please start from here - this is the root folder to launch all components and microservices of the pjx project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published