Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Monorepo starter template with convex, nextjs, better-auth, shadcn/ui, react-email and turborepo.

NotificationsYou must be signed in to change notification settings

jordanliu/convex-starter

Repository files navigation

A highly opinionated Next.js starter with better-auth, convex, shadcn/ui, react-email, and turborepo. Pre-configured for rapid, scalable development.

Project Structure

convex-starter/├── apps/│   └── web/                # Main Next.js application├── packages/│   ├── backend/            # Convex backend│   ├── eslint-config/      # Shared ESLint configurations│   ├── typescript-config/  # Shared TypeScript configurations│   └── ui/                 # Shared UI components (shadcn/ui)└── turbo/                  # Turborepo configuration

Features

Getting Started

1. Create a New Project

npx create-next-app@latest [project-name] --use-pnpm --example https://github.com/jordanliu/convex-starter

2. Install Dependencies

cd [project-name]pnpm install

3. Configure Client

Copy the example environment file into .env.local in apps/web, then update it with your real values.

cp apps/web/.env.example apps/web/.env.local

4. Configure Convex

pnpm --filter @repo/backend run setup

This initializes your Convex project. Next, ensure your backend environment variables are uploaded to the Convex dashboard. From root run:

cp packages/backend/.env.example packages/backend/.env.local

You will then need to upload the environment variables into your Convex dashboard manually or viaconvex env. You can find more detailshere.

5. Start the Development Server

pnpm dev

This will start both the Next.js application athttp://localhost:3000 and the Convex development server athttp://127.0.0.1:6790.

Available Commands

Development

pnpm dev# Start development servers for all packagespnpm build# Build all packages for productionpnpm start# Start production server (requires build)

Code Quality

pnpm lint# Run ESLint across all packagespnpm format# Format code with Prettierpnpm check-types# Run TypeScript type checking

Convex-Specific

pnpm --filter @repo/backend setup# Initialize Convex project (run once)pnpm --filter @repo/backend dev# Start Convex development server onlypnpm --filter @repo/backend deploy# Deploy Convex backend to production

Package-Specific

pnpm --filter web dev# Run only the Next.js application

Project Management

Adding New Packages

turbo gen

Follow the prompts to scaffold a new package with proper TypeScript and build configurations.

Adding shadcn/ui Components

cd apps/webpnpm dlx shadcn@canary add [component-name]

Components are automatically added to the UI package and can be imported across the monorepo.

Managing Dependencies

# Add to specific packagepnpm --filter web add [package-name]pnpm --filter @repo/ui add [package-name]pnpm --filter @repo/backend add [package-name]# Add to workspace root (affects all packages)pnpm add -w [package-name]# Add dev dependenciespnpm --filter web add -D [package-name]

Deployment

1. Deploy Convex Backend

pnpm --filter @repo/backend run deploy

This creates your production Convex deployment and provides you with a production URL.

2. Configure Production Environment

Update your hosting platform (Vercel, Netlify, etc.) with the production Convex URL:

CONVEX_URL=https://your-production-deployment.convex.cloudNEXT_PUBLIC_CONVEX_URL=https://your-production-deployment.convex.cloud

3. Build and Deploy Frontend

pnpm build

Then deploy the built application using your preferred hosting platform's deployment method.

About

Monorepo starter template with convex, nextjs, better-auth, shadcn/ui, react-email and turborepo.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp