This repository hosts the backend code for Cosbum, a social media platform designed for Cosplayers. The backend is built using NestJS, a progressive Node.js framework for building efficient and scalable server-side applications.
Create an .env file in the root directory of your project and add the following environment variables:
MONGO_INITDB_ROOT_USERNAME=your_username
MONGO_INITDB_ROOT_PASSWORD=your_password
KEYCLOAK_ADMIN=your_username
KEYCLOAK_ADMIN_PASSWORD=your_passwordAfter that you can run the following command to set up the project dependencies:
$ npm installRun the docker compose command to start the MongoDB and Keycloak services:
$ docker compose up -dThis setup is currently manual and might change in the future.
- Open Keycloak in your browser at
http://localhost:8080. - Login with the admin credentials you set in the
.envfile. - Create a new realm named
cosbum. - Create a new client named
cosbumwith the following settings:- General Settings:
- Client ID:
cosbum-frontend
- Client ID:
- Capability config:
- Client authentication:
Off - Authentication flow:
Standard flowandDirect Access Grants - PKCE method:
S256
- Client authentication:
- Login Settings:
- Root URL:
http://localhost:5173 - Home URL:
http://localhost:5173 - Valid Redirect URIs:
http://localhost:5173/* - Valid Post Logout Redirect URIs:
http://localhost:5173/* - Web Origins:
http://localhost:5173 - Admin URL:
http://localhost:5173
- Root URL:
- General Settings:
- Go to Realm settings, the "Login" tab, and enable "User Registration".