Before you start, make sure you have the following applications and their minimum versions installed, in addition to Node.js and yarn (as mentioned earlier):
- Node.js 18.0.0 or later
- Yarn 3.0.2 or later
- macOS, Windows (including WSL), and Linux are supported.
1 . Clone the forked repository and open the created directory
2 . Install dependencies
3 . backend setup
- Login with Fern with
- To generate Fern drive code locally, run
yarn fernin the root folder of this repo. This will create the
packages/backend/generatedfolder with the generated code.
- Have a redis instance running locally or use https://upstash.com/ to get a redis url.
- Update the redis url in
Seed the database
Running the API locally
to the run service locally at
4 . client setup
- Copy this URL to your clipboard as you'll need it in the next steps.
- Configure Clerk Webhook Endpoint
- Access your Clerk dashboard.
- Navigate to the webhook settings or configuration section.
- Ensure that the webhook endpoint is set to
- Sign Up in Your Application
- Use your application to sign up a new user. This action will trigger a user creation event.
- In your Clerk dashboard, you should now see a user.created object associated with the newly signed-up user.
- Testing with Postman
To verify that Clerk is sending user creation notifications to your endpoint, you can use Postman for testing.
Open Postman and create a new request.
Set the HTTP method to POST.
In the request's URL field, use http://localhost:4001/clerk/webhook. This is the endpoint Clerk will send notifications to.
In the request body, paste the user.created object that you copied from your Clerk dashboard.