GroviaDocs

Configuration

Every environment variable, what reads it, and what happens when it is absent.

There is one environment file for local development, .env at the repo root, and every key in it is explained by the comment above it. apps/api loads it through config/env.ts; both Next apps load it in their next.config.ts. Do not create per-app .env files. Production values go in apps/<app>/.env.production — see Deployment.

Required

KeyWhat it is
MONGO_URIMongoDB connection string — local or Atlas
JWT_SECRETSigning key for access tokens. openssl rand -base64 32
JWT_EXPIRES_INToken lifetime, default 30d
IMAGEKIT_PRIVATE_KEY + IMAGEKIT_URL_ENDPOINT, or CLOUDINARY_CLOUD_NAME / _API_KEY / _API_SECRETOne image provider — for the demo store and every upload. DEFAULT_UPLOAD_PROVIDER picks it on first run
INTERNAL_API_KEYRequired in production: the same random value on the API, storefront and dashboard

App URLs

KeyDefaultRead by
CLIENT_URLhttp://localhost:3000API — CORS allowlist, email links
ADMIN_URLhttp://localhost:3001API — CORS allowlist
NEXT_PUBLIC_API_URLhttp://localhost:8000Both frontends — inlined at build time
NEXT_PUBLIC_WEB_URLhttp://localhost:3000Storefront canonical URLs, sitemap and JSON-LD; dashboard "View storefront"
NEXT_PUBLIC_ADMIN_URLhttp://localhost:3001Storefront links to the seller portal
CORS_ORIGINSemptyAPI — extra allowed origins, comma-separated
Build-time valuesNEXT_PUBLIC_* values are baked into the JavaScript bundle at build time. On Vercel, set them in the project's environment settings *before* the build runs, and rebuild after changing them.

Optional services

KeyEnablesAbsent
GOOGLE_CLIENT_ID / _SECRET, OAUTH_<PROVIDER>_CLIENT_ID / _SECRETGoogle, Facebook, GitHub, X and LinkedIn sign-inOnly configured providers show a button
STRIPE_SECRET_KEY / STRIPE_WEBHOOK_SECRETCard payments via Stripe CheckoutCOD only; card option disabled
SMTP_HOST / _PORT / _USER / _PASS, EMAIL_FROMOrder, verification and reset emailsSkipped and logged
REDIS_URLBackground job queue (run pnpm run dev:worker too)Jobs run inline in the API
FIREBASE_PROJECT_IDLegacy mobile Firebase tokensWeb sign-in unaffected

The Configuration hub

Most behaviour is not an environment variable. The dashboard's Configuration hub (/settings) edits one document the API reads at runtime, so changes apply without a restart:

SectionControls
Media & uploadsProvider (ImageKit or Cloudinary), fallback, root folder, images per product, upload size and formats, plus a *Test connection* probe
Checkout & deliveryDelivery fee, free-delivery threshold, minimum order, customer cancel window, abandoned-basket hours
CatalogueProducts per page, low-stock threshold, backorders, hide sold-out, review rules
SellersApplications open, approval required, commission, products per seller
NotificationsAdmin alert recipients
Email ConfigEvery email the platform sends, each with a switch; today's count against the daily limit, the last fourteen days, and the latest sends
Security & accountsRegistration on/off, password minimum
OAuth configEach sign-in provider on or off, with its key status and callback URL
Payments · SEO · Maintenance · Integrations · SystemMethods, metadata, holding page, analytics ids, API log level

Secrets never move there — the hub only reports whether each .env key is set.

Commerce

Dashboard overridesFREE_DELIVERY_THRESHOLD, DELIVERY_FEE and TAX_RATE are only the first-run defaults. Once the store settings document exists, the dashboard's Settings → Shop values and the default tax rule take over; the storefront cart mirrors whatever checkout will charge.
KeyDefaultMeaning
FREE_DELIVERY_THRESHOLD40Order value above which delivery is free
DELIVERY_FEE3.9Flat fee below the threshold
TAX_RATE0Applied at order time
PLATFORM_COMMISSION0.05Retained on seller sales for the earnings screen
MAX_PRODUCT_IMAGES—Cap on images per product
MONGODB_STORAGE_QUOTA_MB512 (Atlas M0)Quota shown on the dashboard's DB status

Session

KeyDefault
SESSION_COOKIE_NAMEgrovia_session
SESSION_MAX_AGEMatches JWT_EXPIRES_IN
Buy GroviaFull source code$99.99