Skip to content

feat: add multi-database support with generic environment variables #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,30 @@ PUBLIC_API_URL=http://localhost:3000/api
# The public url used by clients to fetch assets
PUBLIC_ASSETS_URL=http://localhost:3000/assets

# ==============================================
# DATABASE CONFIGURATION
# ==============================================
# Configure your database connection here.
#
# Supported databases:
# - PostgreSQL (DB_TYPE=pg)
# - MySQL (DB_TYPE=mysql2)
# - SQLite (fallback - no configuration needed)
#
# If database environment variables are not provided,
# the application will automatically fall back to SQLite.

# Database type - specify the database engine to use
# Options: 'pg' (PostgreSQL), 'mysql2' (MySQL)
DB_TYPE=pg

# Database connection details
DB_HOST=localhost
DB_PORT=5432
DB_USER=your_username
DB_PASSWORD=your_password
DB_NAME=your_database_name

# LiveKit (voice chat)
LIVEKIT_WS_URL=
LIVEKIT_API_KEY=
Expand Down
263 changes: 263 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
"three-mesh-bvh": "^0.8.3",
"yoga-layout": "^3.2.1"
},
"optionalDependencies": {
"pg": "^8.16.0",
"mysql2": "^3.12.0"
},
"devDependencies": {
"@babel/eslint-parser": "^7.23.10",
"@babel/preset-react": "^7.23.10",
Expand Down
Loading