Setup Guide

Follow these steps to run BalkanID Vault locally.

Environment variables

Create a .env file for the backend with:

PORT=8080 FRONTEND_URL=http://localhost:3000 JWT_SECRET=change-me SESSION_COOKIE_NAME=vault_session DEFAULT_USER_QUOTA_BYTES=10737418240 MAX_UPLOAD_BYTES=10485760 SUPABASE_URL=your_supabase_url SUPABASE_ANON_KEY=your_public_anon_key SUPABASE_SERVICE_ROLE_KEY=your_service_role_key SUPABASE_DB_URL=postgresql://user:pass@host:5432/dbname STORAGE_BUCKET=blobs REDIS_URL=redis://localhost:6379 OAUTH_REDIRECT_URL=http://localhost:8080/auth/google/callback GOOGLE_CLIENT_ID=your_google_client_id GOOGLE_CLIENT_SECRET=your_google_client_secret

Frontend config

Set the API base URL for the Next.js app:

NEXT_PUBLIC_API_URL=http://localhost:8080

Run locally

  1. Start the backend: go run ./app/backend/cmd/server
  2. Start the frontend: cd app/frontend && npm install && npm run dev
  3. Open the app at http://localhost:3000

Google OAuth

Create OAuth credentials in Google Cloud Console and set the Client ID/Secret above. Authorized redirect URI must be:

http://localhost:8080/auth/google/callback