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:Install Dependencies
Lawn uses Bun as its package manager. Install all dependencies:- 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
Start the development server
Run both the web app and Convex backend concurrently:This command starts:
- Vite dev server on
http://localhost:5296 - Convex dev server for backend functions
Development Commands
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:Quality Checks
Run these commands to ensure code quality:Troubleshooting
Port Already in Use
If port 5296 is already in use, you can modify the port inpackage.json or kill the process using the port:
Convex Connection Issues
If you’re having trouble connecting to Convex:- Ensure
VITE_CONVEX_URLis set correctly in your environment variables - Run
bunx convex devseparately to see detailed error messages - 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
