Skip to content

๐Ÿƒ Run for development

You have two options for running this software for development:

Base Setup

1. Requirements:

The following software is required:

Note: If you are using Podman make sure Docker Compose is able to detect it.

2. Clone this repository and navigate into it

Terminal window
git clone https://gitlab.bht-berlin.de/skill-issue/b23/webedit.git
Terminal window
cd webedit

Locally

Make sure you have completed the Base Setup before continuing.

1. Start services

To start garage and valkey.
Make sure you donโ€™t have any software that binds to any of the following ports running: 6379, 3900, 3903

With Docker

Terminal window
docker compose up -d

2. Install dependencies

Terminal window
bun install

To install dependencies with the exact Version specified in the bun.lock file add --frozen-lockfile.

3. Setup .env files

Navigate to apps/dashboard and copy the .env.example into a new file .env.local. In the dashboards .env.local file check that the Ports match the ones in the servers .env file and adjust them accordingly if they donโ€™t. Note: VITE_SERVER_PORT refers to the ELYSIA_PORT in the Servers .env.

4. Start the development server

You can choose to start the server and dashboard in one command or in separate commands for example when you only want to run one or want to use separate terminals for them. Make sure you donโ€™t have any software that binds to any of the following ports running: 2000, 3000, 3001

Dashboard and Server in one

Terminal window
bun run dev

Only Dashboard

Terminal window
bun run dashboardDev

Only Server

Terminal window
bun run serverDev

Product website

To start a development server to view our product website

Terminal window
bun run websiteDev

this may or may not work. If it doesnโ€™t try to navigate into the website folder and start the dev script manually

Terminal window
cd apps/website && \
bun run dev

5. Connect

Vite (dashboard) should now have started a development server on localhost and printed the Port (by default 2000) into the console. Navigate to that location in your browser (http://localhost:2000). If the port differs from 2000, adjust the TRUSTED_ORIGINS in the servers .env file. The serverโ€™s REST API should be running at https://localhost:3000.

Both the Server and Dashboard are hot reloading changes to the code.

Everything In Containers

Make sure you donโ€™t have any software that binds to any of the following ports running: 3001, 3002

1. Start everything

Terminal window
docker compose -f compose.full-stack.yml up -d

2. Connect

Open your browser and enter https://localhost:3002.

  • The route https://localhost:3002/api is automatically forwarded to the backend server.
  • The route https://localhost:3002/hocuspocus is automatically forwarded to the hocuspocus server.

Open https://localhost:3001 in your browser for the product website.