- Node >= v16.6.2
- PNPM >= v7.1.0
- docker
- docker-compose
-
First you have to clone the repository :
git clone https://github.com/Fredkiss3/kisscam.git
-
Install the dependencies :
pnpm install --shamefully-hoist
-
Build the shared lib package :
cd shared pnpm run build
-
Run the docker-compose to launch the redis database :
cd back docker-compose up -d
-
Copy the env file for setting environment variables :
# the backend cd back cp .env.example .env.local
# the frontend cd front cp .env.example .env.local
-
And launch the project :
# the backend cd back pnpm run dev
# the frontend cd front pnpm run dev
The API will be available at http://localhost:8080 and the frontend client at http://localhost:3000.
-
Open the source code and start rocking ! 😎
A quick look at the top-level files and directories you will see in this project.
.
├── .github/
│ └── workflows
│ ├── back.yml
│ └── front.yml
├── back/
├── front/
├── .prettierrc
├── pnpm-workspace.yaml
├── pnpm-lock.yaml
└── tsconfig.json
-
.github/
: this folder contains the GitHub Actions workflow configuration for Continuous Integration/Continuous Deployment. Given that this project is a monorepo, there is muliples workflows for the different packages, with each one targeting a specific environment :-
back.yml
: this workflow is used to deploy the backend. -
front.yml
: this workflow is used to test and deploy the frontend app.
-
-
back/
: this package contains the API mainly implemented with socket.io. -
front/
: this package contains the frontend app written in React. -
.prettierrc
: this file contains the configuration for prettier to enable autoformatting. -
pnpm-workspace.yaml
: this file contains the configuration for the monorepo. -
pnpm-lock.yaml
: this file contains the dependencies lock for the monorepo. -
tsconfig.json
: this file contains the configuration for typescript, that are used by the all the underlying packages
This project is deployed to a custom VPS, with github actions.
You can consult the files in .github/workspaces
to see the different CI/CD scripts.
This project uses some environment variables to configure the project.
name | description | used by |
---|---|---|
REDIS_URL | the url to the redis database where room data are stored | backend |
VITE_WS_URL | the api server URL | front |