Next.js 15 + TypeScript — infrastructure provisioning platform with file-based storage and OIDC authentication.
# Install dependencies
npm install
# Start Dex OIDC (via Docker)
npm run dex:up
# Or without Docker (using IDP scripts)
cd ../idp && ./scripts/dex.sh start
# Start Next.js
npm run dev
# Seed sample data (first run only)
npm run seed
# Add a Dex user for login
../idp/scripts/add-user.sh admin admin@enopax.io admin123Open http://localhost:3000 — sign in or register.
npm test # All tests
npx jest --selectProjects store # Data store tests
npx jest --selectProjects services # Service layer testsNext.js App → Store Layer → TinyBase → data/<table>/<id>.json
Next.js App → NextAuth OIDC → Dex → file storage
- Framework: Next.js 15 with App Router and Server Actions
- Data Storage: TinyBase v8 with file-per-record persister
- Authentication: Dex OIDC (custom fork with file storage)
- Auth Integration: NextAuth.js v5 with OIDC provider
- Styling: Tailwind CSS + Radix UI
- Testing: Jest (243 tests across store, services, actions)
All data stored as JSON files — no database process required:
data/
users/<id>.json
users/_index/email.json
organisations/<id>.json
projects/<id>.json
...
See docs/DATA-STORE.md for full documentation.
- Provider: Dex OIDC (
auth.enopax.comin production,localhost:5556in dev) - Session: JWT-based via NextAuth.js
- Registration: Platform creates Dex user via gRPC, then redirects to OIDC login
- Email verification: Token-based, sent on registration
src/
├── app/ # Next.js pages and layouts
├── components/ # React components
├── lib/
│ ├── store/ # Data store abstraction layer
│ │ ├── types.ts # All model types
│ │ ├── data-store.ts # Store singleton
│ │ ├── repositories/ # Interface per model
│ │ └── tinybase/ # TinyBase implementations
│ ├── services/ # Business logic
│ ├── dex/ # Dex gRPC client
│ └── auth.ts # NextAuth config
├── actions/ # Server actions
tests/
├── store/ # Repository + persister tests
└── services/ # Service layer tests
- Organisation Management: hierarchical structure with role-based permissions
- Name-Based Routing:
/orga/[orgName]/[projectName]/[resourceName] - Resource Deployment: one-click provisioning with real-time progress
- User Registration: self-service via Dex gRPC + email verification
- Permission System: OWNER → ADMIN → MANAGER → MEMBER roles
The platform runs as a Docker container alongside a Dex OIDC container. See Dockerfile.prod for the production image and docker-compose.yml for the local dev setup.
Required environment variables — see .env.example for the full list.
| Document | Purpose |
|---|---|
| DATA-STORE.md | TinyBase file store, repository pattern, indexes |
| ARCHITECTURE.md | System architecture, permissions, deployment |
| COMPONENTS.md | Component structure |
| DESIGN.md | UX guidelines |
| BEST-PRACTICES.md | Development standards |