Configuration
EOS Hub is configured through environment variables defined in a .env file at the project root. This page documents every available variable.
Environment Variables Reference
Database
| Variable | Required | Description |
|---|---|---|
DATABASE_URL | Yes | PostgreSQL connection string |
DATABASE_URL="postgresql://user:password@localhost:5432/eos_hub"The connection string format is:
postgresql://USER:PASSWORD@HOST:PORT/DATABASE?schema=publicTIP
For connection pooling in production (e.g., with PgBouncer), append &pgbouncer=true to the connection string and set a separate DIRECT_URL for migrations.
Authentication
| Variable | Required | Description |
|---|---|---|
NEXTAUTH_SECRET | Yes | Random secret for signing JWTs and encrypting sessions |
NEXTAUTH_URL | Yes | The canonical URL of your application |
GOOGLE_CLIENT_ID | No | Google OAuth 2.0 client ID |
GOOGLE_CLIENT_SECRET | No | Google OAuth 2.0 client secret |
NEXTAUTH_SECRET="a-random-32-character-secret"
NEXTAUTH_URL="http://localhost:3000"
# Google OAuth (optional)
GOOGLE_CLIENT_ID="123456789.apps.googleusercontent.com"
GOOGLE_CLIENT_SECRET="GOCSPX-xxxxxxxxxxxx"INFO
If Google OAuth credentials are not provided, only email/password authentication is available. Users must be created manually or through the admin panel.
Setting Up Google OAuth
- Go to the Google Cloud Console.
- Create a new project or select an existing one.
- Navigate to APIs & Services > Credentials.
- Click Create Credentials > OAuth 2.0 Client IDs.
- Set the application type to Web application.
- Add
http://localhost:3000to Authorized JavaScript origins. - Add
http://localhost:3000/api/auth/callback/googleto Authorized redirect URIs. - Copy the Client ID and Client Secret into your
.envfile.
Application
| Variable | Required | Default | Description |
|---|---|---|---|
PORT | No | 3000 | Port for the development server |
NODE_ENV | No | development | Environment mode (development, production, test) |
Database Configuration
Prisma Schema
The database schema is defined in prisma/schema.prisma. Key models include:
- User -- Authentication and profile data
- Team -- Organizational teams
- TeamMember -- Many-to-many relationship with roles
- Meeting -- L10 Meeting instances
- Measurable -- Scorecard entries
- Rock -- Quarterly priorities
- Issue -- IDS items
- Todo -- Action items
- VTO -- Vision/Traction Organizer
Migrations
Create a new migration after modifying the schema:
npx prisma migrate dev --name descriptive_nameApply migrations in production:
npx prisma migrate deployAuth Providers
EOS Hub uses NextAuth with two providers:
Credentials Provider
The default provider allows email/password login. Passwords are hashed with bcrypt before storage. Users are created either through the seed script or via the admin panel.
Google OAuth Provider
When configured, a "Sign in with Google" button appears on the login page. On first sign-in, a user record is automatically created and linked to the Google account.
WARNING
Users created via Google OAuth default to the USER system role and have no team memberships. An admin must add them to teams after their first sign-in.
Internationalization (next-intl)
EOS Hub supports multiple languages through next-intl. The current locale is stored in a cookie and defaults to the browser's preferred language.
See the Internationalization page for details on adding languages and managing translation files.
Theming
Theme preferences (dark/light mode and color scheme) are stored per-user in the browser via next-themes and cookies. See the Theming page for details on color schemes and CSS variables.
Production Deployment
For production deployments, ensure:
NODE_ENV=productionis set.NEXTAUTH_URLpoints to your actual domain (e.g.,https://app.example.com).NEXTAUTH_SECRETis a strong, unique random string.DATABASE_URLuses a connection pooler if available.- Run
npx prisma migrate deploybefore starting the application. - Build the application with
npm run buildbeforenpm run start.
Next Steps
- Organizations & Teams -- Data model and team structure
- Roles & Permissions -- Access control system