An one stop shop to launch the entire pjx dockerized application.
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 usingocid-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:
Kubernetes Cluster looks like this:
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.
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 install pjx-release helm-pjx/
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
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.
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 theIdentity Server API
, withSSL
andCoRS
settings, properly or not -
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
-
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 thebackend
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 -
visit the GraphQL playground of the Apollo Server - http://localhost:4000
-
try out the Swagger of the .NET Core API - http://localhost:6001/swagger/
-
try out the Swagger of the Identity Server - https://pjx-sso-identityserver/swagger
-
try out the responsive HTML design by changing the browser size