Skip to content

Kroro1208/tanstack-hono-start

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

66 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ TanStack Hono Start

CI

Try it in 1 minute

# Create a new project (one line)
npx create-tanstack-hono-start@latest my-app && cd my-app && npm install && npm run dev

# Frontend: http://localhost:3000
# Backend: http://localhost:8000

This will scaffold a working fullstack app you can open immediately. If you prefer a faster demo, check the demo.gif at the repo root.

Contribute

Good First Issues Contributing Guide Open Issues

Get started with a tiny contribution in 3 steps:

  1. Pick a task from GOOD_FIRST_ISSUES.md or open an issue describing your idea.
  2. Fork, create a branch fix/your-issue, implement and run npm run test.
  3. Open a PR, reference the issue, and add the good first issue label if applicable.

We welcome all improvements β€” documentation, tests, or small bug fixes are perfect first PRs.

npm version Downloads Dependabot Status Good First Issues TypeScript React Hono TanStack Router

⚑ The fastest way to bootstrap modern fullstack applications with React 19, TanStack Router, Hono OpenAPI, and Mastra AI

🎬 Quick Demo

CLI Demo

Create a modern fullstack app in seconds with React 19, TanStack Router, Hono OpenAPI, and AI integration!

✨ Features

  • 🎯 Type-Safe: End-to-end TypeScript from frontend to backend
  • ⚑ Lightning Fast: Powered by Vite and Hono for optimal performance
  • πŸ§ͺ Test Ready: Vitest setup with modern testing practices
  • 🎨 Beautiful: Tailwind CSS with responsive design
  • πŸ”§ Developer Experience: Hot reloading, ESLint, Prettier
  • πŸš€ Production Ready: CI/CD with GitHub Actions, Docker support
  • πŸ“¦ Monorepo: Clean workspace organization

πŸš€ Quick Start

# Create a new project (recommended)
npx create-tanstack-hono-start@latest my-awesome-app

# Or with npm
npm create tanstack-hono-start@latest my-awesome-app

# Or with yarn
yarn create tanstack-hono-start@latest my-awesome-app

🎯 What's New in 2025

  • πŸ†• React 19 - Latest React with improved performance and features
  • πŸ”— Hono OpenAPI - Auto-generated API documentation with Swagger UI

OpenAPI Documentation

  • πŸ€– Mastra AI - Built-in AI assistant capabilities
  • πŸ”’ End-to-End Type Safety - Shared Zod schemas between frontend/backend
  • ⚑ React Query - Advanced server state management
  • 🎨 Modern UI - Beautiful Tailwind components out of the box

🎯 What You Get

Frontend (React 19 + TanStack Router)

  • βš›οΈ React 19 - Latest features and performance improvements
  • πŸ›£οΈ TanStack Router - Type-safe routing with file-based structure
  • ⚑ Vite - Lightning-fast development and build
  • 🎨 Tailwind CSS - Beautiful, responsive UI components
  • πŸ”„ React Query - Advanced data fetching and caching
  • πŸ§ͺ Vitest - Modern testing framework

Backend (Hono + OpenAPI)

  • πŸ”₯ Hono - Ultra-fast web framework
  • πŸ“š OpenAPI/Swagger - Auto-generated API documentation
  • πŸ›‘οΈ Zod Schemas - Runtime validation and type safety
  • πŸ€– Mastra AI - Built-in AI assistant endpoints
  • πŸ” Logging & Error Handling - Production-ready setup
  • πŸ“ Full TypeScript - End-to-end type safety

Generated API Endpoints

  • GET /api/users - User management with type validation
  • POST /api/users - Create users with Zod schema validation
  • POST /api/ai/chat - AI assistant with Mastra integration
  • GET /ui - Interactive Swagger UI documentation
  • GET /doc - OpenAPI JSON specification

πŸ› οΈ Available Templates

πŸ”° Basic Template

npx create-tanstack-hono-start my-app --template basic

Perfect for:

  • πŸŽ“ Learning React and fullstack development
  • πŸš€ Small to medium projects
  • πŸ“š Understanding each piece as you add it

What's included:

  • React 19 + TanStack Router frontend
  • Hono API with OpenAPI/Swagger
  • TypeScript end-to-end
  • Choose your features: Vitest, Tailwind, Auth, Database, ESLint, CI/CD, Docker

πŸš€ Advanced Template

npx create-tanstack-hono-start my-app --template advanced

Perfect for:

  • πŸ’Ό Production-ready applications
  • ⚑ Experienced developers who want everything
  • 🎯 Getting started immediately without setup

What's included (ALL features):

  • βœ… React 19 + TanStack Router + Auth
  • βœ… Hono API + Database (PostgreSQL + Drizzle ORM)
  • βœ… User authentication system (register/login)
  • βœ… Testing setup (Vitest + React Testing Library)
  • βœ… Code quality (ESLint + Prettier)
  • βœ… CI/CD (GitHub Actions)
  • βœ… Docker containerization
  • βœ… Tailwind CSS styling

πŸ“‹ CLI Options

# Interactive mode (recommended)
npx create-tanstack-hono-start

# Skip prompts with defaults
npx create-tanstack-hono-start my-app --yes

# Specify template
npx create-tanstack-hono-start my-app --template basic

# List available templates
npx create-tanstack-hono-start list

πŸ—οΈ Generated Project Structure

When you run npx create-tanstack-hono-start my-app, you'll get:

my-app/                   # ← Your new project
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ web/             # React app with TanStack Router
β”‚   └── api/             # Hono API server
β”œβ”€β”€ packages/            # Shared packages
β”œβ”€β”€ package.json         # Workspace configuration
└── README.md

πŸ› οΈ Usage

🎯 Step-by-Step Experience

Basic Template Flow:

$ npx create-tanstack-hono-start my-app
? Which template would you like to use? basic
? Select additional features:
 β—― πŸ§ͺ Vitest Testing
 β—― 🎨 Tailwind CSS
 β—― πŸ”’ Authentication (Auth.js)
 β—― πŸ—ƒοΈ Database (Drizzle ORM)
 β—― πŸ”§ ESLint + Prettier
 β—― πŸš€ GitHub Actions CI/CD
 β—― 🐳 Docker

Advanced Template Flow:

$ npx create-tanstack-hono-start my-app
? Which template would you like to use? advanced
# πŸ‘† Feature selection is SKIPPED - all features included automatically!
πŸ—οΈ  Creating project...
βœ… Project created successfully!

πŸ’‘ Quick Commands

# Interactive mode (recommended for beginners)
npx create-tanstack-hono-start

# Skip all prompts with basic template
npx create-tanstack-hono-start my-project --template basic --yes

# Get everything with advanced template
npx create-tanstack-hono-start my-project --template advanced

# List available templates and features
npx create-tanstack-hono-start list

🀝 Why TanStack Router + Hono?

  • πŸ”₯ Performance: Hono is one of the fastest web frameworks
  • πŸ”’ Type Safety: End-to-end TypeScript support
  • 🎯 Developer Experience: Excellent tooling and debugging
  • 🌐 Edge Ready: Deploy anywhere with minimal configuration
  • πŸ“± Modern: Built for the latest web standards

πŸ§ͺ Tech Stack

Frontend (Web App)

  • React - UI library
  • TanStack Router - Type-safe routing
  • TypeScript - Type safety
  • Vite - Build tool

Backend (API)

  • Hono - Web framework
  • TypeScript - Type safety
  • Node.js - Runtime

πŸ“– Documentation

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

# Clone the repository
git clone https://github.com/Kroro1208/tanstack-hono-starter.git

# Install dependencies
cd tanstack-hono-starter
npm install

# Start development
npm run dev

πŸ“„ License

MIT License - see the LICENSE file for details.

🌟 Show Your Support

If this project helped you, please consider giving it a ⭐ on GitHub!

πŸ”— Links


Happy coding! πŸŽ‰ Built with ❀️ for the modern web development community.

About

This repository is the Package that modern fullstack applications with TanStack Router, Hono, and AI

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •