Skip to content

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

VariableRequiredDescription
DATABASE_URLYesPostgreSQL connection string
dotenv
DATABASE_URL="postgresql://user:password@localhost:5432/eos_hub"

The connection string format is:

postgresql://USER:PASSWORD@HOST:PORT/DATABASE?schema=public

TIP

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

VariableRequiredDescription
NEXTAUTH_SECRETYesRandom secret for signing JWTs and encrypting sessions
NEXTAUTH_URLYesThe canonical URL of your application
GOOGLE_CLIENT_IDNoGoogle OAuth 2.0 client ID
GOOGLE_CLIENT_SECRETNoGoogle OAuth 2.0 client secret
dotenv
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

  1. Go to the Google Cloud Console.
  2. Create a new project or select an existing one.
  3. Navigate to APIs & Services > Credentials.
  4. Click Create Credentials > OAuth 2.0 Client IDs.
  5. Set the application type to Web application.
  6. Add http://localhost:3000 to Authorized JavaScript origins.
  7. Add http://localhost:3000/api/auth/callback/google to Authorized redirect URIs.
  8. Copy the Client ID and Client Secret into your .env file.

Application

VariableRequiredDefaultDescription
PORTNo3000Port for the development server
NODE_ENVNodevelopmentEnvironment 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:

bash
npx prisma migrate dev --name descriptive_name

Apply migrations in production:

bash
npx prisma migrate deploy

Auth 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:

  1. NODE_ENV=production is set.
  2. NEXTAUTH_URL points to your actual domain (e.g., https://app.example.com).
  3. NEXTAUTH_SECRET is a strong, unique random string.
  4. DATABASE_URL uses a connection pooler if available.
  5. Run npx prisma migrate deploy before starting the application.
  6. Build the application with npm run build before npm run start.

Next Steps

Built with VitePress