some notes: https://www.arhamhumayun.com/blog/streamed-ai-response
This repository is a Turborepo-managed monorepo with two Next.js apps and a shared UI package. ESLint has been replaced by Biome for linting and formatting in apps.
apps/web: Public site (Next.js). Rewrites/approutes to the application zone viaAPP_ORIGIN.apps/app: Application zone (Next.js) served under the base path/app.
packages/ui(@turbotemplate/ui): Shared component library and utilities used by both apps.
All code is TypeScript.
- Node.js ≥ 18
- NPM (repo is configured with
packageManager: [email protected])
npm installRun both apps with Turborepo:
npm run devTo run a single app:
npx turbo run dev --filter=web
npx turbo run dev --filter=appLocal defaults (when both are running):
The web app rewrites /app traffic to the app origin. Set APP_ORIGIN so links resolve correctly:
# from apps/web
APP_ORIGIN=http://localhost:3001Build everything:
npm run buildBuild a single target:
npx turbo run build --filter=web
npx turbo run build --filter=appWe use Biome instead of ESLint/Prettier inside apps.
From the repo root (runs across workspaces via Turborepo):
npm run lint # executes "biome check" in each app
npx turbo run format # executes "biome format --write" in each appFrom an individual app directory:
npm run lint
npm run formatNote: The root still includes Prettier primarily for miscellaneous files. Prefer Biome for TypeScript/JavaScript formatting in app workspaces.
npm run check-typesBoth apps transpile and consume @turbotemplate/ui.
Example usage:
import { Button } from "@turbotemplate/ui/components/button";
export default function Example() {
return <Button>Click me</Button>;
}Aliases provided by the apps map ui and utils to the package (see each app's components.json).
apps/apphasbasePath: "/app".apps/webrewrites/appand/app/:path*toAPP_ORIGIN.
For local development set APP_ORIGIN=http://localhost:3001 in apps/web when both apps run.
- Cache-aware tasks live in
turbo.json. - Use
--filterto scope tasks, e.g.--filter=webor--filter=app.
Useful docs: tasks, caching, filters, and configuration at the Turborepo site.