|
| 1 | +--- |
| 2 | +name: project-starter |
| 3 | +description: Invoke when asked to create a completely new project, NOT a feature. This is used to set up a full E2E app using opinionated defaults. |
| 4 | +--- |
| 5 | + |
| 6 | +Understand the full-scope of the spec, and interview the user to draft a complete spec. |
| 7 | + |
| 8 | +### Better T Stack |
| 9 | + |
| 10 | +Recommend a config for solving this with https://www.better-t-stack.dev |
| 11 | + |
| 12 | +List of options: |
| 13 | + |
| 14 | +Web Frontend |
| 15 | + |
| 16 | +- TanStack Router (selected) - Modern type-safe router for React |
| 17 | +- React Router - Declarative routing for React |
| 18 | +- TanStack Start - Full-stack React and Solid framework powered by TanStack Router |
| 19 | +- Next.js - React framework with hybrid rendering |
| 20 | +- Nuxt - Vue full-stack framework (SSR, SSG, hybrid) |
| 21 | +- Svelte - Cybernetically enhanced web apps |
| 22 | +- Solid - Simple and performant reactivity for building UIs |
| 23 | +- No Web Frontend - No web-based frontend |
| 24 | + |
| 25 | +Native Frontend |
| 26 | + |
| 27 | +- Expo + Bare (default) - Expo with StyleSheet (no styling library) |
| 28 | +- Expo + Uniwind - Fastest Tailwind bindings for React Native with HeroUI Native |
| 29 | +- Expo + Unistyles - Expo with Unistyles (type-safe styling) |
| 30 | +- No Native Frontend (selected) - No native mobile frontend |
| 31 | + |
| 32 | +Backend |
| 33 | + |
| 34 | +- Hono (selected) - Ultrafast web framework |
| 35 | +- Elysia - TypeScript web framework |
| 36 | +- Express - Popular Node.js framework |
| 37 | +- Fastify - Fast, low-overhead web framework for Node.js |
| 38 | +- Convex - Reactive backend-as-a-service |
| 39 | +- Fullstack Next.js (unavailable) - Use Next.js built-in API routes |
| 40 | +- Fullstack TanStack Start (unavailable) - Use TanStack Start's built-in API routes |
| 41 | +- No Backend - Skip backend integration (frontend only) |
| 42 | + |
| 43 | +Runtime |
| 44 | + |
| 45 | +- Bun (selected) - Fast JavaScript runtime & toolkit |
| 46 | +- Node.js - JavaScript runtime environment |
| 47 | +- Cloudflare Workers - Serverless runtime for the edge |
| 48 | +- No Runtime (unavailable) - No specific runtime |
| 49 | + |
| 50 | +Api |
| 51 | + |
| 52 | +- tRPC (selected) - End-to-end typesafe APIs |
| 53 | +- oRPC - Typesafe APIs Made Simple |
| 54 | +- No API - No API layer (API routes disabled) |
| 55 | + |
| 56 | +Database |
| 57 | + |
| 58 | +- SQLite (selected) - File-based SQL database |
| 59 | +- PostgreSQL - Advanced SQL database |
| 60 | +- MySQL - Popular relational database |
| 61 | +- MongoDB - NoSQL document database |
| 62 | +- No Database - Skip database integration |
| 63 | + |
| 64 | +Orm |
| 65 | + |
| 66 | +- Drizzle (selected) - TypeScript ORM |
| 67 | +- Prisma - Next-gen ORM |
| 68 | +- Mongoose (unavailable) - Elegant object modeling tool |
| 69 | +- No ORM (unavailable) - Skip ORM integration |
| 70 | + |
| 71 | +Db Setup |
| 72 | + |
| 73 | +- Turso - Distributed SQLite with edge replicas (libSQL) |
| 74 | +- Cloudflare D1 (unavailable) - Serverless SQLite-compatible database for Cloudflare Workers |
| 75 | +- Neon Postgres (unavailable) - Serverless Postgres with autoscaling and branching |
| 76 | +- Prisma PostgreSQL (unavailable) - Managed Postgres via Prisma Data Platform |
| 77 | +- MongoDB Atlas (unavailable) - Managed MongoDB clusters in the cloud |
| 78 | +- Supabase (unavailable) - Local Postgres stack via Supabase (Docker required) |
| 79 | +- PlanetScale (unavailable) - Postgres & Vitess (MySQL) on NVMe |
| 80 | +- Docker (unavailable) - Run Postgres/MySQL/MongoDB locally via Docker Compose |
| 81 | +- Basic Setup (selected) - No cloud DB integration |
| 82 | + |
| 83 | +Web Deploy |
| 84 | + |
| 85 | +- Cloudflare - Deploy to Cloudflare Workers using Alchemy |
| 86 | +- None (selected) - Skip deployment setup |
| 87 | + |
| 88 | +Server Deploy |
| 89 | + |
| 90 | +- Cloudflare (unavailable) - Deploy to Cloudflare Workers using Alchemy |
| 91 | +- None (selected) - Skip deployment setup |
| 92 | + |
| 93 | +Auth |
| 94 | + |
| 95 | +- Better-Auth (selected) - The most comprehensive authentication framework for TypeScript |
| 96 | +- Clerk (unavailable) - More than authentication, Complete User Management |
| 97 | +- No Auth - Skip authentication |
| 98 | + |
| 99 | +Payments |
| 100 | + |
| 101 | +- Polar - Turn your software into a business. 6 lines of code. |
| 102 | +- No Payments (selected) - Skip payments integration |
| 103 | + |
| 104 | +Package Manager |
| 105 | + |
| 106 | +- npm - Default package manager |
| 107 | +- pnpm - Fast, disk space efficient |
| 108 | +- bun (selected) - All-in-one toolkit |
| 109 | + |
| 110 | +Addons |
| 111 | + |
| 112 | +- PWA (Progressive Web App) - Make your app installable and work offline |
| 113 | +- Tauri - Build native desktop apps |
| 114 | +- Starlight - Build stellar docs with astro |
| 115 | +- Biome - Format, lint, and more |
| 116 | +- Husky - Modern native Git hooks made easy |
| 117 | +- Ultracite - Biome preset with AI integration |
| 118 | +- Fumadocs - Build excellent documentation site |
| 119 | +- Oxlint - Oxlint + Oxfmt (linting & formatting) |
| 120 | +- Ruler - Centralize your AI rules |
| 121 | +- OpenTUI - Build terminal user interfaces |
| 122 | +- WXT - Build browser extensions |
| 123 | +- Turborepo (selected) - High-performance build system |
| 124 | + |
| 125 | +Examples |
| 126 | + |
| 127 | +- Todo Example - Simple todo application |
| 128 | +- AI Example - AI integration example using AI SDK |
| 129 | + |
| 130 | +Git |
| 131 | + |
| 132 | +- Git (selected) - Initialize Git repository |
| 133 | +- No Git - Skip Git initialization |
| 134 | + |
| 135 | +Install |
| 136 | + |
| 137 | +- Install Dependencies (selected) - Install packages automatically |
| 138 | +- Skip Install - Skip dependency installation |
| 139 | + |
| 140 | +Prefer the following options unless there's a good reason not to: |
| 141 | + |
| 142 | +`bun create better-t-stack@latest my-better-t-app --frontend tanstack-start --backend hono --runtime workers --api trpc --auth better-auth --payments none --database sqlite --orm drizzle --db-setup d1 --package-manager bun --git --web-deploy cloudflare --server-deploy cloudflare --install --addons ultracite --examples none` |
| 143 | + |
| 144 | +Obviously, don't use certain options if they are not applicable to the spec. (e.g. selecting D1 when we have no need for a db) |
| 145 | + |
| 146 | +## Add Effect TS |
| 147 | + |
| 148 | +Add Effect TS to both backend and frontend services. |
| 149 | + |
| 150 | +https://www.effect.solutions/quick-start |
| 151 | + |
| 152 | +Copy the agent instructions and paste them into your agent. |
| 153 | + |
| 154 | +Your agent will guide you through setting up your repository with Effect best practices. |
| 155 | + |
| 156 | +- Setting up the Effect Language Service |
| 157 | +- Installing our effect-solutions cli |
| 158 | +- Refining your TypeScript configuration |
| 159 | +- Cloning the Effect repository to use as reference |
| 160 | + |
| 161 | +## Setup ShadCN UI |
| 162 | + |
| 163 | +If following Better T Stack scaffolding: |
| 164 | + |
| 165 | +`rm -rf apps/web/components.json apps/web/src/components/ui` |
| 166 | + |
| 167 | +``` |
| 168 | +cd apps/web && bunx --bun shadcn@latest create --preset "https://ui.shadcn.com/init?base=base&style=maia&baseColor=neutral&theme=neutral&iconLibrary=hugeicons&font=figtree&menuAccent=subtle&menuColor=default&radius=default&template=start" --template start |
| 169 | +``` |
| 170 | + |
| 171 | +Add all ShadCN components |
| 172 | + |
| 173 | +`bunx shadcn@latest add -a -o` |
| 174 | + |
| 175 | +## Install Storybook |
| 176 | + |
| 177 | +Set up Storybook through their wizard |
| 178 | + |
| 179 | +`bunx create storybook@latest` |
0 commit comments