This project was created with Better-T-Stack, a modern TypeScript stack that combines React, TanStack Router, Convex, and more.
- TypeScript - For type safety and improved developer experience
- TanStack Router - File-based routing with full type safety
- TailwindCSS - Utility-first CSS for rapid UI development
- Shared UI package - shadcn/ui primitives live in
packages/ui - Convex - Reactive backend-as-a-service platform
- Authentication - Better-Auth
- Turborepo - Optimized monorepo build system
First, install the dependencies:
pnpm installThis project uses Convex as a backend. You'll need to set up Convex before running the app:
pnpm run dev:setupFollow the prompts to create a new Convex project and connect it to your application.
Copy environment variables from packages/backend/.env.local to apps/*/.env.
Then, run the development server:
pnpm run devOpen http://localhost:5173 in your browser to see the web application. Your app will connect to the Convex cloud backend automatically.
React web apps in this stack share shadcn/ui primitives through packages/ui.
- Change design tokens and global styles in
packages/ui/src/styles/globals.css - Update shared primitives in
packages/ui/src/components/* - Adjust shadcn aliases or style config in
packages/ui/components.jsonandapps/web/components.json
Run this from the project root to add more primitives to the shared UI package:
npx shadcn@latest add accordion dialog popover sheet table -c packages/uiImport shared components like this:
import { Button } from "@plantchain-new/ui/components/button";If you want to add app-specific blocks instead of shared primitives, run the shadcn CLI from apps/web.
plantchain-new/
├── apps/
│ ├── web/ # Frontend application (React + TanStack Router)
├── packages/
│ ├── ui/ # Shared shadcn/ui components and styles
│ ├── backend/ # Convex backend functions and schema
pnpm run dev: Start all applications in development modepnpm run build: Build all applicationspnpm run dev:web: Start only the web applicationpnpm run dev:setup: Setup and configure your Convex projectpnpm run check-types: Check TypeScript types across all apps