/LightDance-Editor

LightDance editor for choreographing and controlling.

Primary LanguageTypeScriptMIT LicenseMIT

Logo

NTUEE LightDance Editor

Release Contributors License

An online editor to design, simulate and control the lights

Architecture

image

Services

http://localhost:8080 - editor
http://localhost:4000 - editor-server
http://localhost:8081 - file-server
http://localhost:8082 - controller-server

Development

Local

Install the dependencies

This will install all dependencies for the app.

pnpm install-pnpm:all

Start database

You need to have mongodb and redis running for the backend to work.

docker compose -f dev.docker-compose.yml up -d mongodb redisdb

Run all services

There are several services in this app. You need to start all of them manually. Run these commands in different terminals, in that order:

pnpm dev:file-server
pnpm dev:editor-server
pnpm dev:editor

Run all services in parallel

This command runs all services in parallel. You can see the editor on http://localhost:8080. This is useful for demo, yet not recommended in development.

pnpm dev

Initialize Database: Development

If you are running this for the first time, you need to initialize the database for things to work.

cd utils
pnpm install
node initDB.js out/exportData.json
node initLED.js out/exportLED.json

Production

Start all services

docker compose -f prod-support/prod.docker-compose.yml up -d

Editor will run on http://localhost:8080.

Editor-server will run on http://localhost:4000.

Initialize Database: Production

After starting all services, one must initialize the database.

export NODE_OPTIONS="--max-old-space-size=8192"
cd utils
pnpm install
node initDB.js out/exportData.json
node initLED.js out/exportLED.json