A modern, type-safe, and scalable monorepo template built with the best tools in the TypeScript and full-stack ecosystem.
Component | Description | Link |
---|---|---|
Monorepo | Managed with Turborepo for high-performance monorepo workflows. | Turborepo |
TypeScript | Type-safety is a core principle across all packages and apps. | TypeScript |
Next.js | The main web app is built with Next.js for SSR, API routes, and more. | Next.js |
Drizzle ORM | Type-safe, modern ORM for SQL databases. | Drizzle ORM |
PostgresDB | Reliable, open-source SQL database. | PostgreSQL |
Tailwind CSS | Utility-first CSS framework for rapid UI development. | Tailwind CSS |
shadcn/ui | Beautiful, accessible React components. | shadcn/ui |
Better Auth | Modern authentication patterns and utilities. | Better Auth |
Biome | All-in-one toolchain for formatting, linting, and more. | Biome |
Fumadocs | Documentation framework for Next.js, powering the docs app. | Fumadocs |
oRPC | End-to-end type-safe APIs, OpenAPI support, and contract-first development. | oRPC |
.
├── apps/
│ ├── web/ # Next.js application
│ └── docs/ # Fumadocs-powered documentation site
├── packages/
│ ├── ui/ # shadcn/ui components
│ ├── api/ # oRPC API definitions and procedures
│ ├── db/ # Drizzle ORM & Postgres setup
│ ├── auth/ # Authentication logic
│ └── typescript-config/ # Shared TypeScript configs
├── turbo.json # Turborepo config
├── pnpm-workspace.yaml # pnpm workspace config
└── ...
-
Install dependencies:
pnpm install
-
Set up environment variables:
- Copy
.env.example
to.env
in each package/app and fill in the required values.
- Copy
-
Run the development server:
pnpm dev
-
Add shadcn/ui components:
pnpm dlx shadcn@latest add button -c apps/web
Components will be placed in
packages/ui/src/components
. -
Use UI components:
import { Button } from "@hexastack/ui/components/button"
-
Database migrations: See
packages/db/README.md
for Drizzle ORM migration commands. -
Documentation (Fumadocs):
The documentation site is powered by Fumadocs.
To run the docs locally:
pnpm --filter docs dev
See
apps/docs/README.md
for more details and customization options.
- All packages and apps are written in TypeScript.
- Shared types and configs are in
packages/typescript-config
.
-
Powered by Biome.
-
Run:
pnpm biome check . pnpm biome format .
- Modern authentication patterns are implemented in
packages/auth
. - See package README for setup and usage.
- Fork the repo
- Create your feature branch (
git checkout -b feat/my-feature
) - Commit your changes
- Push to the branch
- Open a Pull Request
MIT