Skip to content

Repository files navigation

Foundation 🏗️

A modern, full-stack open-source starter kit and boilerplate.

License TypeScript React Cloudflare Workers

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.

🌟 Features

  • 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.

🚀 Getting Started

Prerequisites

  • Bun (v1.0+)
  • Node.js (v20+)

Installation

  1. Clone the repository

    git clone https://github.com/asynchronizd/foundation.git my-app
    cd my-app
  2. Install dependencies

    bun install
  3. Database Setup Run Drizzle migrations to set up your local D1 database schema:

    bun run db:generate
    bun run db:migrate:local
  4. Start the development server

    bun run dev

📁 Project Structure

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

🛠️ CLI & Scripts

  • bun run dev - Start all development servers
  • bun run build - Build the entire monorepo
  • bun run check - Run formatting and linting
  • bun run typegen - Generate Wrangler types based on bindings

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details on how to submit pull requests, report issues, and improve the boilerplate.

📄 License

This project is licensed under the MIT License.

About

Starter kit

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages