Skip to content

NTUEELightDance/LightDance-Editor

Repository files navigation

Logo

NTUEE LightDance Editor

Release Contributors License

An online editor to design, simulate and control the lights

Editor

Architecture

image

Services

http://localhost:4000 - editor-server
http://localhost:8081 - file-server

Development

Local

Install Pre-Commit

# in Lightdance-Editor
pre-commit install

Configure node environment

# in Lightdance-Editor
nvm install
corepack enable
corepack install

Then by executing nvm use you can choose the specified version of node and pnpm

Start database

copy the environment variables for development

# in Lightdance-Editor/editor-server
cp .env.development .env

start mySQL and redisDB

# in Lightdance-Editor
docker compose -f dev.docker-compose.yml up -d

migrate the database

# in Lightdance-Editor/editor-server
cargo migrate

Install the dependencies

This will install all dependencies for the app.

# in Lightdance-Editor
pnpm install:all

This will setup a venv for python (>3.10 recommended), remember to select it as interpreter before developing frontend.

Run all services

There are the services you'll need to run if you are developing editor-server. You need to start all of them manually. Run these commands in different terminals respectively, in the order shown below:

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

If you are developing the command center, run:

# in Lightdance-Editor/command-center
uv run textual run src.__main__:LightDanceApp

To bundle the frontend blender add-on, run:

pnpm dev:bundle # For local development
pnpm prod:bundle # For production

The bundled extension will be stored at ./editor-blender-{unix,win}.zip for Linux/MacOS and Windows respectively , to install the add-on, see Blender Add-ons Documentation or editor-blender/README.md.

Run all services in parallel

This command runs all services in parallel. 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.

# Lightdance-Editor/utils
pnpm install
node initDB.js jsons/exportDataEmpty.json

Production

migrate the database

# in Lightdance-Editor/editor-server
DATABASE_URL="mysql://root:password@localhost:3306/editor" sea-orm-cli migrate up
DATABASE_URL="mysql://root:password@localhost:3306/editor" sea-orm-cli generate entity -o sea-orm/src/entity

Start all services

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

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

Initialize Database: Production

After starting all services, one must initialize the database.

# Lightdance-Editor/utils
export NODE_OPTIONS="--max-old-space-size=8192"
pnpm install
node initDB.js jsons/exportDataEmpty.json

Configurations and Utilities

Refer to utils/README.md for editor configurations and utility usage.

About

LightDance editor for choreographing and controlling.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors