Lena is a small, opinionated monorepo boilerplate built around:
- Bun + Elysia for the backend
- Nuxt 4 for the frontend
- Shared packages for database access and runtime configuration
This repo is intended as a starting point for full‑stack apps with a clear separation between app code and infrastructure (database, config, tooling).
apps/backend– Bun/Elysia HTTP API with Swagger docsapps/frontend– Nuxt 4 apppackages/database– Prisma schema and client wrapper (@lena/database)packages/config– Centralized TypeScript + ESLint configs and runtime config (@lena/config)
The root package.json uses workspaces to tie everything together.
- Runtime: Bun
- Framework: Elysia
- Plugins:
@elysiajs/swagger– Swagger/OpenAPI UI
Features:
GET /– returnsHello Lena!!- Swagger documentation is served via the Swagger plugin.
Development:
# from repo root
bun install
bun run backend:devThe backend listens on http://localhost:3000.
- Framework: Nuxt 4
- Language: TypeScript
- Extras: Nuxt ESLint module, fonts, hints, image module
TypeScript is configured through Nuxt’s typescript.tsConfig option and extends the shared base config in packages/config. Nuxt-style aliases (#app, #components, #pages, etc.) are also wired there.
Development:
# from repo root
bun install
bun run frontend:devThe dev server will start on the port configured by Nuxt (typically http://localhost:3000, if not occupied by the backend).
- Holds the Prisma schema (
packages/database/prisma/schema.prisma). - Exposes a typed Prisma client and helper:
prisma– sharedPrismaClientinstanceconnectDatabase()– helper to connect on startup
This keeps all database concerns out of the backend app itself.
- Central place for:
- Shared TypeScript base config (
tsconfig.base.json) - Shared ESLint config (
eslint.config.mjs) - Simple runtime configuration (
src/index.ts)
- Shared TypeScript base config (
Apps and other packages extend these configs instead of defining their own from scratch.
From the repo root:
bun run backend:dev– start backend in watch modebun run backend:start– start backend withNODE_ENV=productionbun run backend:build– placeholder (no build step yet)bun run frontend:dev– start Nuxt dev serverbun run frontend:start– start built Nuxt appbun run frontend:build– build frontend for productionbun run database:generate– runprisma generateusingpackages/database/prisma/schema.prismabun run database:push– push Prisma schema to the databasebun run database:pull– introspect database into Prisma schemabun run lint– run ESLint using the shared config in@lena/config
-
Install dependencies:
bun install
-
Set up your environment:
- Create
.envwith any vars you need, especiallyDATABASE_URLfor Prisma in@lena/database.
- Create
-
(Optional) Sync the database schema:
bun run database:push
-
Run backend and/or frontend:
bun run backend:dev bun run frontend:dev
You can now iterate on backend, frontend, and shared packages within a single monorepo, with all tooling and config centralized in @lena/config.