Generate One frontend monorepo — Next.js 15 + Turborepo
- TypeScript 98.4%
- CSS 1.3%
- Dockerfile 0.2%
| .auto-claude/specs | ||
| apps | ||
| packages | ||
| .auto-claude-allowlist | ||
| .auto-claude-security.json | ||
| .claude | ||
| .env.example | ||
| .gitignore | ||
| accessibility-test-results.md | ||
| CLAUDE.md | ||
| docker-compose.yml | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| screen-reader-test-guide.md | ||
| screen-reader-verification.md | ||
| tsconfig.json | ||
| turbo.json | ||
| vitest.config.mjs | ||
| wcag-compliance-report.md | ||
g1-frontend 🖥️
Three Next.js apps, one monorepo — the complete web surface of Generate One, from marketing to admin.
✨ Overview
g1-frontend is the Turborepo monorepo for all Generate One web surfaces. It contains three Next.js applications (marketing site, user-facing app, admin dashboard) and shared packages for auth, UI components, Directus CMS integration, and billing. Apps are built as standalone Docker containers and served behind Traefik with Let's Encrypt TLS.
🏗️ Architecture
graph TD
subgraph "Turborepo Monorepo"
subgraph "apps/"
Web["apps/web\ngenerateone\nMarketing site"]
App["apps/app\napp.generate.one\nUser app"]
Admin["apps/admin\nadmin.generate.one\nAdmin dashboard"]
end
subgraph "packages/"
PkgAuth["packages/auth\nBetter Auth + Authentik OIDC"]
PkgUI["packages/ui\nShared UI components"]
PkgRefine["packages/refine-directus\nRefine.dev data provider"]
PkgPayments["packages/payments\nLago billing integration"]
end
App --> PkgAuth
Admin --> PkgAuth
Admin --> PkgRefine
App --> PkgUI
Admin --> PkgUI
App --> PkgPayments
end
subgraph "External Dependencies"
AgentAPI["g1-agent-backend\nagent.generate.one"]
Directus["g1-brain / Directus\ncms.generate.one"]
Authentik["g1-auth / Authentik\nauth.generate.one"]
end
App --> AgentAPI
Admin --> Directus
App --> Authentik
Admin --> Authentik
📱 Apps
| App | Domain | Container | Description |
|---|---|---|---|
apps/web |
generate.one | Coolify app (separate) | Public marketing and landing site |
apps/app |
app.generate.one | g1-app |
User-facing app — chat, knowledge, tools |
apps/admin |
admin.generate.one | g1-admin |
Admin dashboard (Refine.dev + Directus) |
📦 Packages
| Package | Description |
|---|---|
packages/auth |
Better Auth v1 with genericOAuth plugin → Authentik OIDC (PKCE) |
packages/ui |
Shared UI component library (Tailwind CSS) |
packages/refine-directus |
Refine.dev data provider for Directus CMS backend |
packages/payments |
Lago billing integration |
🔧 Stack
| Layer | Technology |
|---|---|
| Framework | Next.js (standalone output for Docker) |
| Monorepo | Turborepo + npm workspaces |
| Auth | Better Auth v1 + genericOAuth → Authentik OIDC |
| Admin UI | Refine.dev + Directus CMS backend |
| Styling | Tailwind CSS |
| Language | TypeScript 5 |
| Build | Docker multi-stage (standalone Next.js) |
| Node | >=20.0.0 |
🔧 Configuration
Key environment variables (see .env.example):
| Variable | Description | App |
|---|---|---|
BETTER_AUTH_SECRET |
Auth encryption secret | app, admin |
BETTER_AUTH_URL |
Auth callback base URL | app, admin |
OIDC_CLIENT_ID / OIDC_CLIENT_SECRET |
Authentik OIDC credentials | app, admin |
DATABASE_URL |
PostgreSQL for Better Auth sessions (g1_auth DB) |
app, admin |
NEXT_PUBLIC_AI_API_URL |
Agent backend URL (https://agent.generate.one) |
app |
NEXT_PUBLIC_DIRECTUS_URL |
Directus CMS URL (https://cms.generate.one) |
admin |
🚀 Quick Start
# Install dependencies
npm install
# Start all apps in dev mode
npm run dev
# Build all apps (used by Docker)
npm run build
# Lint all apps
npm run lint
Docker (production)
# Build app container (from monorepo root)
docker build -f apps/app/Dockerfile \
--build-arg NEXT_PUBLIC_AUTH_URL=https://app.generate.one \
--build-arg NEXT_PUBLIC_AI_API_URL=https://agent.generate.one \
-t g1-app:latest .
# Build admin container
docker build -f apps/admin/Dockerfile \
--build-arg NEXT_PUBLIC_AUTH_URL=https://admin.generate.one \
--build-arg NEXT_PUBLIC_DIRECTUS_URL=https://cms.generate.one \
-t g1-admin:latest .
# Run via compose
docker compose up -d
Both app and admin services listen on port 3000 internally, routed by Traefik labels.
🔗 Dependencies
Depends on:
- g1-agent-backend — Streaming agent API consumed by
apps/app - g1-brain (Directus) — CMS backend for
apps/admin(Refine.dev data provider) - g1-auth (Authentik) — SSO OIDC provider for all apps
- g1-core — PostgreSQL
g1_authdatabase for Better Auth sessions
Depended on by:
- End users via
app.generate.oneandadmin.generate.one
🔗 Related Repos
| Repo | Relationship |
|---|---|
| g1-agent-backend | Python agent API consumed by apps/app |
| g1-state | Directus CMS backend for admin dashboard |
| g1-auth | Authentik SSO provider |
| g1-core | Shared PostgreSQL for auth sessions |
🛡️ Part of Generate One
Generate One — AI infrastructure that answers to you.
Self-hosted, sovereign AI platform. generate.one
Licensed under AGPL-3.0.