A modern, full-stack open-source starter kit and boilerplate.
Foundation is a powerful, opinionated full-stack boilerplate designed to help you build and scale your next web or mobile application quickly. It leverages the best tools in the modern web ecosystem to provide a seamless developer experience, from database to the frontend.
- TypeScript - End-to-end type safety and an improved developer experience.
- Frontend - React with TanStack Start for robust SSR and routing.
- Mobile - React Native powered by Expo.
- Backend API - Lightweight, ultra-fast server framework with Hono.
- Database & ORM - Cloudflare D1 (SQLite) paired with Drizzle ORM.
- Authentication - Fully configured using Better-Auth.
- Styling & UI - TailwindCSS with shared primitives from shadcn/ui.
- Tooling - Powered by Vite+ for unified building, task running, and git hooks.
- Linting & Formatting - Blazing fast checks using Oxlint and Oxfmt.
- Deployment Ready - Pre-configured Wrangler files for seamless Cloudflare Workers and Pages deployment.
- Bun (v1.0+)
- Node.js (v20+)
-
Clone the repository
git clone https://github.com/asynchronizd/foundation.git my-app cd my-app -
Install dependencies
bun install
-
Database Setup Run Drizzle migrations to set up your local D1 database schema:
bun run db:generate bun run db:migrate:local
-
Start the development server
bun run dev
- Web App: http://localhost:3001
- API Server: http://localhost:3000
- Native App: Open via the Expo Go app.
foundation/
├── apps/
│ ├── web/ # Frontend application (React + TanStack Start)
│ ├── native/ # Mobile application (React Native, Expo)
│ └── server/ # Backend API (Hono deployed on Cloudflare Workers)
├── packages/
│ ├── ui/ # Shared shadcn/ui components and Tailwind configs
│ ├── auth/ # Authentication logic (Better-Auth)
│ ├── db/ # Database schema & queries (Drizzle + Cloudflare D1)
│ └── env/ # Environment variables & bindings validation
bun run dev- Start all development serversbun run build- Build the entire monorepobun run check- Run formatting and lintingbun run typegen- Generate Wrangler types based on bindings
We welcome contributions! Please see our Contributing Guide for details on how to submit pull requests, report issues, and improve the boilerplate.
This project is licensed under the MIT License.