-
Notifications
You must be signed in to change notification settings - Fork 13
Setup
Prerequisites: Docker and Dev Containers Extension.
- Clone and open the repository locally in VS Code (or any other IDE that supports Dev Containers).
- Click on the
Reopen in Containerbutton that pops up in the bottom left corner of the VS Code window.- Or open the command palette and run the command
Dev Containers: Reopen in Container.
- Or open the command palette and run the command
- Wait for the container to start. It may take a few minutes to install dependencies and run post create script.
- Visit the respective README files to start developing!
- Web: apps/web/README.md
- Visualizer: apps/visualizer/README.md
- Server: apps/server/README.md
- Data: apps/data/README.md
- Scripts: scripts/README.md
Check if the Docker Desktop version is up to date.
If the post create command in dev container fails, you can manually run the post create script in the container by running the following command in the root directory:
./scripts/post-create.shThe dev container setup is recommended and automated, but if you prefer to set up the environment manually or the dev container didn't work, follow the instructions below to manually set up the environment.
- Install bun (https://bun.com/get)
- Install vault (https://developer.hashicorp.com/vault/install)
- Install jq (https://jqlang.org/download/)
- Install ruff (https://docs.astral.sh/ruff/installation/)
- Install Python 3 (https://www.python.org/downloads/)
- Install editorconfig-checker (https://github.com/editorconfig-checker/editorconfig-checker?tab=readme-ov-file#quickstart)
-
Run
bun install -
Set up environment variables by running the following commands in the root directory:
bun run vault:setupbun run vault:pull all local
Push the database schema by running the following command in apps/server:
bunx prisma db pushIf you see errors about 'port in use', use lsof -i :5432 to find the process using that port and kill it with kill -9 <PID>.
Run the server by running the following command in apps/server:
bun run devNavigate to http://localhost/buildings and make sure it shows {} instead of an internal server error.
Keeps the server running and open another terminal.
-
Create and activate a virtual environment by running the following commands in the root directory:
python3 -m venv venv source venv/bin/activate -
Run the following command in
apps/datato install the requirements:pip3 install -r requirements.txt
-
To populate the database, run the following command in
apps/data:python3 floorplans/deserializer/database_population.py
-
You can kill the server after the database is populated, so the port is available in the next step.
Follow the instructions in web README or visualizer README to start developing on the web or visualizer!