Setting up Blanq

Each section of these docs will guide you through specific setup steps. To get started, here is what you need to do:

Populate your environment variables

Create a .env file in the root of your project and add the following variables: You can copy the example .env.example file and rename it to .env:

cp .env.example .env

Here is a rundown of the variables, explaining what they are used for:

VariableDescriptionDefault
NUXT_PUBLIC_SITE_URLThe URL of your site, this is used in checkout and other places that need full URLs for redirects etc.http://localhost:3000
NUXT_MAIL_CHANNELS_BASE_URLThe base URL of the MailChannels API, please see the Emails section for more info on Local Email flowhttp://localhost:8008
NUXT_MAIL_CHANNELS_API_KEYThe API key for MailChannels, not needed if using development setup
NUXT_MAIL_SENDER_EMAILThe email address that will be used to send emails
NUXT_MAIL_SENDER_NAMEThe name that will be used to send emails
NUXT_STRIPE_SECRET_KEYThe secret key for your Stripe account
NUXT_STRIPE_WEBHOOK_SECRETThe webhook secret for your Stripe account
BETTER_AUTH_SECRETThe secret key for BetterAuth
BETTER_AUTH_URLThe URL of the BetterAuth server, similar to site url but this env var is read explicitly from Better Authhttp://localhost:3000

Install dependencies

bun install

Start the local mail server

Please see This Repo for more information on how to start a local mailbox and sender. Alternatively, you could always use your real MailChannels account API key and URL in the .env file.

docker run -d -p 8008:8008 mailchannels-dev # After Building The Image

Start the development server

Now you are ready to start developing your app. You can run the development server with:

bun dev