- npm install
- In cmd ausführen: docker run -p 8080:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:18.0.2 start-dev
- npx nx serve chat-platform
- npx nx serve chat-platform-frontend
This guide explains how to install Keycloak in a Docker container and import a realm configuration file to set up the authorization and authentication for a student chat platform.
- Docker must be installed on the host machine.
- A realm configuration file in JSON format.
Run the following command to download and start a Keycloak Docker container:
docker run -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=password jboss/keycloak
- Open Keycloak Administration Console in your browser at http://localhost:8080.
- Login using the credentials admin and password.
- Go to Realm Settings and click on Import from the left-side menu.
- Choose the realm configuration file in JSON format and click Import.
Clone the student chat platform Github repository using the following command:
git clone https://github.com/Hamed-kshiem/student-chat-platform.git
Change to the project directory and run the following command to install the required npm packages:
cd student-chat-platform
npm install
To run the NestJS app, use the following command:
npx nx serve chat-platform
Step 6: Run ReactJS Nx App To run the ReactJS app, use the following command:
npx nx serve chat-platform-frontend
If necessary, check the MongoDB IP security configuration to ensure that the app can connect to the database.
Open the student chat platform in your browser at http://localhost:4200. Click on Sign up to create a new Keycloak account.
Use the credentials created in Step 8 to login to the student chat platform.
Choose a person from the list of available users to start a chat.
The installation and configuration process is now complete, and you can start using the student chat platform with Keycloak for authorization and authentication.