Automated setup wizard for the Luminary project that configures your local development environment.
- What This Does
- Before You Start
- Quick Start
- Getting Your Auth0 Credentials
- Environment Variables Explained
- Common Issues
- Manual Setup
This script will automatically:
- ✅ Set up CouchDB (database) and MinIO (file storage) using Docker
- ✅ Create
.envconfiguration files for the API, app, and CMS - ✅ Install all Node.js dependencies in the correct order
- ✅ Sync database and storage credentials automatically
Time to complete: 5-10 minutes
Make sure you have these installed:
- Node.js v24.12.0 or newer - Download here
- npm v10+ (comes with Node.js)
- Git (you already have this if you cloned the project!)
- Docker - Download here
- Needed to run the database and file storage locally
- Without Docker, you'll need to provide your own database/storage URLs
- Homebrew - Install here
- Used to install the MinIO client tool
- WSL (Windows Subsystem for Linux) - Install guide
- This script runs on Unix-based systems (Linux, macOS, WSL)
- Open your terminal and navigate to the scripts folder:
cd luminary/scripts- Run the setup wizard:
./setup-dev.sh setup- Follow the prompts - the wizard will ask you for:
- Auth0 credentials (see below for where to find these)
- JWT secret key
- Database passwords
- Storage passwords
That's it! The script handles everything else.
Auth0 handles user authentication (login/logout) for Luminary. You'll need to create a free Auth0 account and set up two things: an Application and an API.
- Go to auth0.com and sign up for a free account
- After signing up, you'll be taken to your Auth0 Dashboard
- In your Auth0 Dashboard, click Applications in the left sidebar
- Click Create Application
- Name it "Luminary" and select Single Page Web Applications
- Click Create
- Go to the Settings tab and scroll down
- Find and copy these values (you'll need them):
- Domain → This is your
AUTH0_DOMAIN(looks likedev-abc123.us.auth0.com) - Client ID → This is your
AUTH0_CLIENT_ID(a long string)
- Domain → This is your
- Scroll down to Application URIs and set:
- Allowed Callback URLs:
http://localhost:4174, http://localhost:4175 - Allowed Logout URLs:
http://localhost:4174, http://localhost:4175 - Allowed Web Origins:
http://localhost:4174, http://localhost:4175
- Allowed Callback URLs:
- Click Save Changes
- In your Auth0 Dashboard, click Applications → APIs in the left sidebar
- Click Create API
- Set these values:
- Name: "Luminary API"
- Identifier:
https://luminary-api.local(or any unique URL - doesn't need to be real) - Signing Algorithm: Keep as RS256
- Click Create
- Copy the Identifier → This is your
AUTH0_AUDIENCE
That's it! The setup wizard will ask you for these values:
AUTH0_DOMAIN- From Application SettingsAUTH0_CLIENT_ID- From Application SettingsAUTH0_AUDIENCE- From API Identifier
The setup wizard configures environment variables across three sub-projects: api, app, and cms.
| Va� Environment Variables Explained
The wizard will ask you for these values. Here's what each one does:
ENCRYPTION_KEY - For encrypting sensitive data in the database
- The wizard can auto-generate this for you (recommended)
- If generated, save it securely - you'll need it to decrypt your data later
DB_CONNECTION_STRING - Database connection URL
- Auto-filled by the wizard using your chosen database password
- Example:
http://admin:yourpassword@127.0.0.1:5984
S3_* variables - File storage configuration
- Auto-filled by the wizard using your MinIO credentials
- Used for storing uploaded images and files
4174- App (Vite dev server)4175- CMS (Vite dev server)5984- CouchDB HTTP API9000- MinIO S3 API9001- MinIO Console UI
Solution:
# Find what's using a port (macOS/Linux)
lsof -i :3000
# Kill process by PID
kill -9 <PID>
# Windows
netstat -ano | findstr :3000
taskkill /PID <PID> /F###🆘 Common Issues
The script checks if these ports are available:
3000- API server4174- App4175- CMS5984- Database9000,9001- File storage
Fix: Find and stop what's using the port:
# See what's using port 3000
lsof -i :3000
# Stop it (replace <PID> with the number shown)
kill -9 <PID>Fix: Remove old containers and try again:
docker stop luminary-couchdb luminary-storage
docker rm luminary-couchdb luminary-storage
./setup-dev.sh setupThis means your database password in the .env file doesn't match the Docker container.
Fix: The script automatically syncs these now, but if you're seeing this:
# Re-run the setup to sync credentials
./setup-dev.sh setupWhen pasting a multi-line certificate:
- Choose "yes" when asked about multi-line input
- Paste your entire certificate
- Type
ENDon a new line and press Enter - Don't add quotes or any extra characters- MinIO/S3: Update
S3_ENDPOINT,S3_PORT,S3_ACCESS_KEY,S3_SECRET_KEYwith your S3-compatible service
The recommended workflow (handled by the wizard):
# 1. Build shared library first
cd shared
npm ci
npm run build
# 2🛠️ Manual Setup
If you prefer to do things manually or the wizard doesn't work:
### 1. Install Dependencies Manually
```bash
# Build the shared library first (so app/cms resolve its types from dist/)
cd shared
npm ci
npm run build
# Install app and cms (they consume shared/src directly via a Vite alias)
cd ../app
npm ci
cd ../cms
npm ci
# Install API dependencies
cd ../api
npm ciCreate these three files:
api/.envapp/.envcms/.env
Copy the values from .env.example files if they exist, or use the templates in the Environment Variables section above.
# Start database
docker run -d \
--name luminary-couchdb \
-p 5984:5984 \
-e COUCHDB_USER=admin \
-e COUCHDB_PASSWORD=yourpassword \
couchdb:latest
# Start file storage
docker run -d \
--name luminary-storage \
-p 9000:9000 \
-p 9001:9001 \
-e MINIO_ROOT_USER=minio \
-e MINIO_ROOT_PASSWORD=minio123 \
quay.io/minio/minio:latest server /data --console-address ":9001"- Auth0 Documentation: auth0.com/docs
- CouchDB Guide: docs.couchdb.org
- MinIO Documentation: min.io/docs
- Report Issues: github.com/bccsa/luminary/issues
- Security First: Never commit
.envfiles to Git (they're already in.gitignore) - Save Your Keys: If the wizard generates an
ENCRYPTION_KEYfor you, save it somewhere safe - Need Help?: The wizard shows helpful messages in blue, warnings in yellow, and errors in red
- Re-run Anytime: You can run the setup wizard again if you need to change settings
Questions? Open an issue on GitHub or check the /docs folder for more detailed documentation.
Last Updated: January 2026