Getting Started
Prerequisites
Section titled “Prerequisites”The following are required for development:
- Bun v1.0+ — runtime and package manager
- Node.js v20+ — required for the web application
- Docker and Docker Compose — for PostgreSQL
- Git v2.30+
Installation
Section titled “Installation”1. Clone
Section titled “1. Clone”git clone https://github.com/ElyOS-webOS/elyos-core.gitcd elyos-core2. Dependencies
Section titled “2. Dependencies”bun install3. Environment Variables
Section titled “3. Environment Variables”cp .env.example .envElyOS uses Varlock for typesafe environment management. In the .env file, only bootstrap credentials are required — all other secrets come from Infisical at startup.
Detailed documentation: Environment Variables →
With Infisical access (recommended):
INFISICAL_CLIENT_ID=machine-identity-client-idINFISICAL_CLIENT_SECRET=machine-identity-client-secretTo request Infisical access, contact your team’s system administrator. Machine Identity credentials can be found in the Infisical dashboard under project settings.
Without Infisical (local fallback mode):
If you don’t have Infisical access or are working offline, set VARLOCK_FALLBACK=local and provide all required variables directly in .env:
VARLOCK_FALLBACK=localNODE_ENV=developmentDATABASE_URL=postgresql://elyos:elyos123@localhost:5432/elyosBETTER_AUTH_SECRET=generated-random-secretBETTER_AUTH_URL=http://localhost:3000ORIGIN=http://localhost:51734. Start Database
Section titled “4. Start Database”bun docker:db # PostgreSQL container onlybun db:init # Migrations + seed dataWhat these commands do:
docker:db— starts the PostgreSQL container in Dockerdb:init— complete database initialization (generate + migrate + seed)
Details: Scripts Reference →
5. Development Server
Section titled “5. Development Server”bun app:devThe application is available at: http://localhost:5173
What it does: Starts the SvelteKit dev server with local .env file (without Varlock).
Details: Scripts Reference →
Default Admin Account
Section titled “Default Admin Account”After seeding, the first user receives admin privileges. The email address is read from the ADMIN_USER_EMAIL environment variable.
ADMIN_USER_EMAIL=admin@example.com| Field | Value |
|---|---|
the value of ADMIN_USER_EMAIL (or seed default) | |
| Password | Admin1234! |
Docker-based Execution
Section titled “Docker-based Execution”The entire stack (ElyOS + PostgreSQL) can also be started with Docker Compose:
bun docker:upIn this case, Varlock runs when the container starts (varlock run -- node server.js), and loads secrets from Infisical. Only bootstrap credentials are required in the .env file.
Details: Scripts Reference → Docker
Useful Commands
Section titled “Useful Commands”Full list: Scripts Reference →
# Developmentbun app:dev # Dev serverbun app:build # Production buildbun app:check # Type checking (svelte-check + tsc)
# Databasebun db:generate # Generate migrations from schema changesbun db:migrate # Run pending migrationsbun db:seed # Load seed databun db:reset # Reset databasebun db:studio # Open Drizzle Studio
# Dockerbun docker:db # Start PostgreSQL onlybun docker:up # Full stack (ElyOS + DB)bun docker:down # Stopbun docker:logs # Follow logs
# Testing (from apps/web directory)bun test # Run all tests oncebun test:pbt # Property-based tests only
# Code quality (from apps/web directory)bun lint # Prettier + ESLint checkbun format # Automatic formattingOpening the Project
Section titled “Opening the Project”Open the monorepo root in your IDE. The main development area is the apps/web/src/ folder.
elyos-core/├── apps/web/src/ ← where you'll work most├── apps/web/.env.schema ← env variables schema (Varlock)├── packages/database/ ← schema and migrations└── .env ← bootstrap credentials (locally)