An open API service indexing awesome lists of open source software.

https://github.com/reposible-hq/turbo-charge

The full-stack powerhouse with premium integrations, designed for scalability. Ideal for production-grade apps, SaaS, and teams.
https://github.com/reposible-hq/turbo-charge

lucide next-intl next-themes nextjs15 openai react-email react-hook-form resend sentry shadcn-ui stripe supabase-auth supabase-db tailwindcss typescript zod

Last synced: about 2 months ago
JSON representation

The full-stack powerhouse with premium integrations, designed for scalability. Ideal for production-grade apps, SaaS, and teams.

Awesome Lists containing this project

README

          

![reposible-logo-light](https://github.com/user-attachments/assets/9769309b-cad4-4e3a-aba2-b11f00b32d33#gh-dark-mode-only)

![Next JS](https://img.shields.io/badge/Next-black?style=for-the-badge&logo=next.js&logoColor=white)
![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white)
![Supabase](https://img.shields.io/badge/Supabase-3ECF8E?style=for-the-badge&logo=supabase&logoColor=white)
![Stripe](https://img.shields.io/badge/Stripe-5469d4?style=for-the-badge&logo=stripe&logoColor=ffffff)
![Sentry](https://img.shields.io/badge/sentry-%23362D59.svg?style=for-the-badge&logo=sentry&logoColor=white)
![Resend](https://img.shields.io/badge/Resend-black?style=for-the-badge&logo=resend&logoColor=white)
![ChatGPT](https://img.shields.io/badge/chatGPT-74aa9c?style=for-the-badge&logo=openai&logoColor=white)
![shadcn/ui](https://img.shields.io/badge/Shadcn/ui-black?style=for-the-badge&logo=shadcnui&logoColor=white)
![React-hook-form](https://img.shields.io/badge/React--Hook--Form-%23EC5990?style=for-the-badge&logo=reacthookform&logoColor=white)
![Zod](https://img.shields.io/badge/Zod-%233E67B1?style=for-the-badge&logo=zod&logoColor=white)
![next-intl](https://img.shields.io/badge/Next--Intl-blue?style=for-the-badge&logo=next.js&logoColor=white)

# Turbo Charge

The full-stack powerhouse with premium integrations, designed for scalability. Ideal for production-grade apps, SaaS, and teams.

> Part of the **Turbo Charge** ecosystem by [Reposible](https://reposible.com) β€” a developer-first platform for effortless integrations.

---

## πŸ“¦ Table of Contents

- [Included Integrations](#-included-integrations)
- [Why Turbo Charge?](#-why-turbo-charge)
- [Getting Started](#-getting-started)

- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Environment Variables](#environment-variables)

- [Supabase Setup](#-supabase-setup)

- [Generating Supabase Types](#generating-supabase-types)
- [Database Migrations & Deployment](#database-migrations--deployment)

- [Stripe Setup](#-stripe-setup)

- [Events Listened To](#events-listened-to)
- [Products and Prices](#products-and-prices)
- [Subscriptions and Checkout Sessions](#subscriptions-and-checkout-sessions)
- [Customer Subscription Sync](#customer-subscription-sync)

- [Sentry Setup](#-sentry-setup)

- [Configuration](#configuration)
- [Notes](#notes)

- [Resend Setup](#-resend-setup)
- [Running the Development Server](#running-the-development-server)
- [License](#-license)
- [Contact](#-contact)

---

## πŸ”§ Included Integrations

- **Framework:** [Next.js](https://nextjs.org/docs) - (App Router)
- **Language:** [Typescript](https://www.typescriptlang.org/docs/)
- **Database:** [Supabase](https://supabase.com/docs/guides/database/overview)
- **Auth:** [Supabase](https://supabase.com/docs/guides/auth)
- **Payments:** [Stripe](https://docs.stripe.com)
- **Monitoring:** [Sentry](https://docs.sentry.io/platforms/javascript/guides/nextjs)
- **Mailing:** [Resend](https://resend.com/docs/send-with-nextjs)
- **i18n:** [Next-intl](https://next-intl.dev/docs/getting-started)
- **AI:** [Open-AI](https://platform.openai.com/docs/overview)
- **UI:** [Shadcn/ui](https://ui.shadcn.com/docs/installation)
- **Forms:** [React-Hook-Form](https://react-hook-form.com)
- **Validation:** [Zod](https://zod.dev/)
- **Themes:** [Next-themes](https://www.npmjs.com/package/next-themes)

---

## πŸš€ Why Turbo Charge?

- **Production-ready out of the box**
- **Stable, tested stack** β€” no fragile boilerplate
- **Fast setup** β€” clone, install, and you're live
- **Built by humans, not generated by AI** β€” every line reviewed, refined, and documented
- **Community support via Discord**

## πŸ›  Getting Started

Follow these steps to get your development environment up and running.

### Prerequisites

- Node.js
- npm or yarn
- [Supabase CLI](https://supabase.com/docs/guides/local-development/cli/getting-started)
- [Stripe CLI](https://docs.stripe.com/stripe-cli?install-method=homebrew)

### Installation

1. Clone the repository:

```bash
git clone https://github.com/Reposible-tc/turbo-charge.git
cd turbo-charge
```

2. Install dependencies:
```bash
npm install
# or
yarn install
```

### Environment Variables

1. Create a .env file in the project root.

2. Copy the example:

```bash
cp .example.env .env
```

3. Fill in the required variables in .env
> If you already know where to find all the environment variables, go ahead and populate them. Otherwise, don't worry β€” the setup guides below (e.g., for Supabase, Stripe, Sentry, Resend) explain exactly where to obtain each one.

## Supabase Setup

Instructions for working with Supabase in local and remote development.

### Generating Supabase Types

Keep your TypeScript types in sync with your database schema:

```bash
# For a local Supabase instance
npx supabase gen types typescript --local > ./src/lib/supabase/types.ts

# For a remote Supabase project
npx supabase gen types typescript --project-id > ./src/lib/supabase/types.ts
```

These commands generate types.ts under src/lib/supabase/types.ts based on your schema.

### Database Migrations & Deployment

1. Link Your Supabase Project

```bash
npx supabase link --project-ref
```

2. Pull Remote Schema Changes (if any)

```bash
npx supabase db pull --schema auth,storage
```

Review the generated migration file in supabase/migrations/.

3. Create a New Migration

```bash
npx supabase db diff --file
```

Tip: Review and test all migrations carefully before pushing to production.
Refer to the Supabase CLI documentation for advanced usage.

4. Apply & Reset Migrations Locally

```bash
# Apply migrations
npx supabase migration up

# (Optional) Reset local database
npx supabase db reset
```

5. Deploy to Remote

```bash
npx supabase db push
```

This will deploy your local migrations to the remote Supabase instance, keeping both environments in sync.

## Stripe Setup

First, create a [Stripe account](https://stripe.com) if you haven't already. Once your account is ready, switch to **Test Mode** and start a local webhook listener by running the following command:

```bash
stripe login

stripe listen --forward-to localhost:3000/api/stripe/webhook
```

This webhook endpoint is configured to listen to the following Stripe events (feel free to add or remove events as needed):

- `product.created`
- `product.updated`
- `product.deleted`
- `price.created`
- `price.updated`
- `price.deleted`
- `checkout.session.completed`
- `customer.subscription.created`
- `customer.subscription.updated`
- `customer.subscription.deleted`

These events help keep your Stripe data in sync with your Supabase database.

### Products and Prices

When you create, update, or delete a product or price in the Stripe dashboard, the same change will be reflected in your database automatically.

### Subscriptions and Checkout Sessions

When a `checkout.session.completed` event is received, the webhook determines whether the session was for a **subscription** or a **one-time payment**:

- For **subscription-based sessions**, it creates a corresponding subscription record in your database, including details like the customer ID, plan, and status.
- For **one-time payments**, it logs the successful transaction along with relevant metadata such as the customer and product information.

### Customer Subscription Sync

To ensure your database always has up-to-date information about your customers’ subscriptions, the webhook also listens to subscription-related events:

- `customer.subscription.created`
- `customer.subscription.updated`
- `customer.subscription.deleted`

These events allow you to track changes such as new subscriptions, plan changes, cancellations, and status updates. Every time a customer's subscription is modified in Stripe, the corresponding data is automatically updated in your Supabase database.

## Sentry Setup

To enable error tracking and performance monitoring in your application, [create a Sentry account](https://sentry.io/signup) and set up a new **Next.js** project.

### Configuration

1. **Set the DSN**
Add your Sentry DSN to the `.env` file:

```env
NEXT_PUBLIC_SENTRY_DSN=your-dsn-here
```

2. **Update the `package.json` scripts**
Modify your `package.json` to include the `sentry:sourcemaps` script and chain it to the `build` script:

```json
"scripts": {
"build": "next build && npm run sentry:sourcemaps",
"sentry:sourcemaps": "sentry-cli sourcemaps inject --org --project ./.next && sentry-cli sourcemaps upload --org --project ./.next"
}
```

Be sure to replace `` and `` with the correct values from your Sentry account.

### Notes

- Running `npm run build` will now automatically inject and upload source maps to Sentry.
- This ensures better error stack traces by mapping minified production code back to your original source code.
- You may need to configure `sentry-cli` with an auth token. Refer to the [Sentry CLI documentation](https://docs.sentry.io/product/cli/configuration/#auth-tokens) for setup instructions.

## Resend Setup

Resend provides a simple and reliable email API for sending transactional emails in your app.

### Add API Key

Get your API key from [resend.com](https://resend.com) and add it to your `.env` file:

```env
RESEND_API_KEY=your_resend_api_key
```

### Notes

- You can customize the sender domain (`noreply@yourdomain.com`) by verifying a domain in the Resend dashboard.
- Resend supports rich HTML, dynamic templates, and unsubscribe management.

## Running the Development Server

Start the Next.js development server:

```bash
npm run dev
# or
yarn dev
```

Open http://localhost:3000 in your browser.

## πŸ“„ License

This template is offered under the MIT License for personal or internal business use only.

You may not:

- Use this template as part of a paid SaaS, template library, or boilerplate product
- Sell or redistribute the code, directly or indirectly
- Present this work as your own in any commercial context

We keep the Foundation tier free and open to support the community. Respect for these boundaries helps us continue building high-quality tools for developers.

Feel free to reach out if you have any questions at hello@reposible.com

The software is provided "as is", without warranty of any kind.

## πŸ“¬ Contact

Have questions or want to contribute?
Join our developer community on [Discord](https://discord.com/invite/YHk759Aptn)
or visit [Reposible](https://reposible.com)

> This template is part of the Turbo Charge journey β€” from rock-solid foundations to frictionless integrations. Let's build smarter, together.