Spring boot 3.0.4 based oauth2 authorization server with simple functionalities on top.
Based on preplanned steps to practice and improve spring boot skills.
- ws-client - WebSocket react client app - simple functionality to connect to ws and send incorrect login data.
- src - Spring boot app with oauth2 authorization server and user management. Reports incorrect data to ws-client via websocket.
- tools - Scripts to run app locally and in docker, configure key infrastructure and database.
- Save content in
~/work/bnauth/
. That means this file should have path~/work/bnauth/README.md
. - In case of local run, npm 9.6+, gradle 8.0+ and java 17+ are required
- In case of docker run, Docker engine is required.
- Scripts were tested on zsh, bash and
Note: To test on other unix systems, change local.sh runApps() osascript
commands to ones matching your system.
Eventually run script to install apps and then run them manually using steps 4 and 5 from below.
- Run local.sh script.
For example,sh local.sh -p keystorePasword
.
It will start postgres container, and spring boot app. It will also start react app in browser. If it doesn't, open http://localhost:3000 manually.
or
- In project root execute
./gradlew clean build
- In project root execute
./gradlew pgRun
- Execute
npm i
in ws-client folder - Start spring app with your IDE or
./gradlew bootRun
- Start react app with
npm start
in ws-client folder
- Run docker.sh script in root folder.
For example,sh docker.sh -p keystorePasword
.
It will start gradle installation, image build and container creation. No local runs needed except for working docker env.