Skip to main content

Prerequisites

Before you begin, ensure you have the following installed:
  • Bun 1.3.6 or higher - Install Bun
  • Node.js 20 or higher (for Convex CLI)
  • Git for cloning the repository

Clone the Repository

Clone the Lawn repository from GitHub:
git clone https://github.com/pingdotgg/lawn.git
cd lawn

Install Dependencies

Lawn uses Bun as its package manager. Install all dependencies:
bun install
This will install all required packages including:
  • TanStack Start (React framework)
  • Convex (backend and database)
  • Clerk (authentication)
  • Mux (video processing)
  • Stripe (payments)
  • UI libraries (Radix UI, Tailwind CSS)

Configure Environment Variables

Before running the application, you need to set up your environment variables. See the Environment Variables guide for detailed configuration.
You’ll need accounts with Clerk, Convex, Mux, and Stripe to run Lawn locally. Each service offers a free tier for development.

Development

1

Start the development server

Run both the web app and Convex backend concurrently:
bun run dev
This command starts:
  • Vite dev server on http://localhost:5296
  • Convex dev server for backend functions
2

Access the application

Open your browser and navigate to:
http://localhost:5296

Development Commands

bun run dev
The dev:web command runs only the frontend. Use this if you’re working on UI changes and already have Convex running separately.

Building for Production

To create a production build:
1

Build the application

bun run build
This compiles the application with Vite for production.
2

Preview the production build

bun run start
This starts a local server on http://localhost:5296 to preview the production build.

Quality Checks

Run these commands to ensure code quality:
bun run typecheck
Always run type checking and linting before committing changes. This helps maintain code quality and catch errors early.

Troubleshooting

Port Already in Use

If port 5296 is already in use, you can modify the port in package.json or kill the process using the port:
lsof -ti:5296 | xargs kill -9

Convex Connection Issues

If you’re having trouble connecting to Convex:
  1. Ensure VITE_CONVEX_URL is set correctly in your environment variables
  2. Run bunx convex dev separately to see detailed error messages
  3. Check that you’re logged in to Convex: bunx convex login

Missing Environment Variables

If you see errors about missing environment variables, ensure all required variables are set. See the Environment Variables guide.

Next Steps

Environment Variables

Configure all required environment variables for development

Deployment

Learn how to deploy Lawn to production

Build docs developers (and LLMs) love