Setup locally
Follow these steps to run your ChaiBuilder site locally.
Section titled “Follow these steps to run your ChaiBuilder site locally.”1. Prerequisites
Section titled “1. Prerequisites”Make sure you have the following installed:
2. Clone the Repository
Section titled “2. Clone the Repository”git clone https://github.com/chaibuilder/chaibuilder-nextjs.gitcd chaibuilder-nextjs
3. Install Dependencies
Section titled “3. Install Dependencies”Using pnpm:
pnpm install
4. Set Up Environment Variables
Section titled “4. Set Up Environment Variables”Create a .env.local
file in the root directory:
touch .env.local
Add the following:
CHAIBUILDER_API_KEY=your_chaibuilder_api_keyCHAIBUILDER_WEBHOOK_SECRET=your_custom_webhook_secret
You can find your API key and manage your site here.
5. Run the Dev Server
Section titled “5. Run the Dev Server”pnpm run dev
6. Login to your local builder
Section titled “6. Login to your local builder”Open http://localhost:3000/chai in your browser and log in using ChaiBuilder credentials.
You’re Ready!
Section titled “You’re Ready!”Your ChaiBuilder site should now be running locally. Make changes and see them live instantly. Start building!