# Start Here

## Hello Maker, Let's Get Started With OneMix!

Follow this tutorial to run the OneMix boilerplate locally in minutes.

### Step 1: Get The Repo

* `git clone <https://github.com/SaaS-King/onemix.git`>
* Rename `.env.example` to `.env`

### Step 2: Setup Datbase

* Create a project on [Supabase](https://supabase.com/). You get two free projects.
* You can now populate the following values in the .env file:
* `SUPABASE_URL` and `SUPABASE_ANON_PUBLIC` found at [https://supabase.com/dashboard/project/{PROJECT}](https://supabase.com/dashboard/project/%7BPROJECT%7D)

<figure><img src="https://1797220998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfAR13RJKKjdKf3E8DjWk%2Fuploads%2F66ki9Zq1uQ31kIjm8dQQ%2Fimage.png?alt=media&#x26;token=a43a06b1-9cbe-4296-889c-23dff3de12a9" alt=""><figcaption></figcaption></figure>

* `SUPABASE_SERVICE_ROLE` found at [https://supabase.com/dashboard/project/{PROJECT}/settings/api](https://supabase.com/dashboard/project/%7BPROJECT%7D/settings/api)

<figure><img src="https://1797220998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfAR13RJKKjdKf3E8DjWk%2Fuploads%2F9KNtUrSgRBflkPl68T3V%2Fimage.png?alt=media&#x26;token=929dfdb7-a78b-4330-b1cf-9dfe2467eeef" alt=""><figcaption></figcaption></figure>

* `DATABASE_URL` found here [https://supabase.com/dashboard/project/{PROJECT}/settings/database](https://supabase.com/dashboard/project/%7BPROJECT%7D/settings/database)

<figure><img src="https://1797220998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfAR13RJKKjdKf3E8DjWk%2Fuploads%2Fnjh5GUTL1WBS8MZVunxB%2Fimage.png?alt=media&#x26;token=d4bacb14-9def-4031-a7b9-d551cc6dd206" alt=""><figcaption></figcaption></figure>

### Step 3: Setup Payment

* Install [Stripe CLI](https://docs.stripe.com/stripe-cli)
* Create a [Stripe](https://stripe.com) account. You can now populate `STRIPE_SECRET_KEY` in the .env file. Find it at <https://dashboard.stripe.com/test/apikeys>

<figure><img src="https://1797220998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfAR13RJKKjdKf3E8DjWk%2Fuploads%2FgQppANHvx6eYHmMK4cD7%2Fimage.png?alt=media&#x26;token=fed42065-a462-4829-adf4-109588fac611" alt=""><figcaption></figcaption></figure>

* With Stripe CLI installed, run this command: `stripe listen --forward-to localhost:3000/api/webhook` to get the `STRIPE_ENDPOINT_SECRET`

### Step 4: Setup Email

* Create a [Resend](https://resend.com/) account.
* Create an API key here: <https://resend.com/api-keys> and copy it for the `RESEND_KEY_API` value.
* Use your personal email for `receiverEmail` variable in `app/email/service.server.ts`

<figure><img src="https://1797220998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfAR13RJKKjdKf3E8DjWk%2Fuploads%2Fof2N8GKdPI1Z4haCjA71%2Fimage.png?alt=media&#x26;token=411e0074-63fd-4c37-88ea-ce6ecf24f973" alt=""><figcaption></figcaption></figure>

### Step 5: Run Locally

* `npm i` (You can use yarn or pnpm if you want to)
* `npm run setup` to seed the DB and Stripe. This script creates 3 dummy subscription products and the respective pricing and tiers in Stripe. You can change them later.
* `npm run dev`

**Voila! You have OneMix running in your local system!**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://onemix-docs.saask.ing/start-here.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
