Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Sep 7, 2024
1 parent c1cb31a commit 0511289
Show file tree
Hide file tree
Showing 19 changed files with 52 additions and 36 deletions.
49 changes: 19 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,27 @@ Everything you need to build a production ready SaaS, it's a opinionated stack b
[Next.js](https://nextjs.org/) - Framework<br>
[Turborepo](https://turbo.build) - Build system<br>
[Biome](https://biomejs.dev) - Linter, formatter<br>
[Sherif](https://github.com/QuiiBz/sherif) - Linter for monorepos<br>
[TailwindCSS](https://tailwindcss.com/) - Styling<br>
[Shadcn](https://ui.shadcn.com/) - UI components<br>
[TypeScript](https://www.typescriptlang.org/) - Type safety<br>
[Supabase](https://supabase.com/) - Authentication, database, storage<br>
[Upstash](https://upstash.com/) - Cache and rate limiting<br>
[React Email](https://react.email/) - Email templates<br>
[Resend](https://resend.com/) - Email delivery<br>
[i18n](https://next-international.vercel.app/) - Internationalization<br>
[Sentry](https://sentry.io/) - Error handling/monitoring<br>
[Dub](https://dub.sh/) - Sharable links<br>
[Trigger.dev](https://trigger.dev/) - Background jobs<br>
[OpenPanel](https://openpanel.dev/) - Analytics<br>
[Polar](https://polar.sh) - Billing (coming soon)<br>
[react-safe-action](https://next-safe-action.dev) - Validated Server Actions<br>
[nuqs](https://nuqs.47ng.com/) - Type-safe search params state manager<br>
[next-themes](https://next-themes-example.vercel.app/) - Theme manager<br>

## Services directory (optional)
[Upstash](https://upstash.com/) - Cache and rate limiting<br>
[Trigger.dev](https://trigger.dev/) - Background jobs<br>
[Polar](https://polar.sh) - Billing (coming soon)<br>
[OpenPanel](https://openpanel.dev/) - Analytics<br>
[Sentry](https://sentry.io/) - Error handling/monitoring<br>
[Resend](https://resend.com/) - Email delivery<br>


## Directory Structure

```
Expand Down Expand Up @@ -70,38 +74,17 @@ Everything you need to build a production ready SaaS, it's a opinionated stack b

Bun<br>
Docker<br>
Upstash<br>
Dub<br>
Trigger.dev<br>
Resend<br>
Supabase<br>
Sentry<br>
OpenPanel<br>

## Getting Started

Clone this repo locally with the following command:

```bash
bunx degit midday-ai/v1 v1
```

1. Install dependencies using bun:

```sh
bun i
```

2. Copy `.env.example` to `.env` and update the variables.

```sh
# Copy .env.example to .env for each app
cp apps/api/.env.example apps/api/.env
cp apps/app/.env.example apps/app/.env
cp apps/web/.env.example apps/web/.env
bunx v1-run@latest init
```

4. Start the development server from either bun or turbo:
Start the development server from either bun or turbo:

```ts
bun dev // starts everything in development mode (web, app, api, email)
Expand All @@ -115,6 +98,12 @@ bun migrate // run migrations
bun seed // run seed
```

## Add services

```bash
bunx v1-run@latest add service <service>
```

## How to use
This boilerplate is inspired by our work on Midday, and it's designed to serve as a reference for real-world apps. Feel free to dive into the code and see how we've tackled various features. Whether you're looking to understand authentication flows, database interactions, or UI components, you'll find practical, battle-tested implementations throughout the codebase. It's not just a starting point; it's a learning resource that can help you build your own applications.

Expand All @@ -124,7 +113,7 @@ With this, you have a great starting point for your own project.

Vercel deployment will guide you through creating a Supabase account and project.

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fmidday-ai%2Fv1&env=RESEND_API_KEY,UPSTASH_REDIS_REST_URL,UPSTASH_REDIS_REST_TOKEN,SENTRY_AUTH_TOKEN,NEXT_PUBLIC_SENTRY_DSN,SENTRY_ORG,SENTRY_PROJECT,DUB_API_KEY,NEXT_PUBLIC_OPENPANEL_CLIENT_ID,OPENPANEL_SECRET_KEY&project-name=create-v1&repository-name=create-v1&redirect-url=https%3A%2F%2Fv1.run&demo-title=Create%20v1&demo-description=An%20open-source%20starter%20kit%20based%20on%20Midday.&demo-url=https%3A%2F%2Fv1.run&demo-image=https%3A%2F%2Fv1.run%2Fopengraph-image.png&integration-ids=oac_VqOgBHqhEoFTPzGkPd7L0iH6)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fmidday-ai%2Fv1&project-name=create-v1&repository-name=create-v1&redirect-url=https%3A%2F%2Fv1.run&demo-title=Create%20v1&demo-description=An%20open-source%20starter%20kit%20based%20on%20Midday.&demo-url=https%3A%2F%2Fv1.run&demo-image=https%3A%2F%2Fv1.run%2Fopengraph-image.png&integration-ids=oac_VqOgBHqhEoFTPzGkPd7L0iH6)

## Recognition

Expand Down
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions services/dub/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 3 additions & 0 deletions services/dub/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { Dub } from "dub";

export const dub = new Dub();
16 changes: 16 additions & 0 deletions services/dub/src/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "@v1/dub",
"version": "1.0.0",
"main": "src/index.ts",
"private": true,
"sideEffects": false,
"scripts": {
"clean": "rm -rf .turbo node_modules",
"lint": "biome check .",
"format": "biome --write .",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"dub": "^0.36.5"
}
}
5 changes: 5 additions & 0 deletions services/dub/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": "@v1/typescript/base.json",
"include": ["src", "."],
"exclude": ["node_modules"]
}
1 change: 1 addition & 0 deletions services/langbase/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions services/openpanel/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@v1/analytics",
"name": "@v1/openpanel",
"version": "1.0.0",
"main": "src/index.ts",
"private": true,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions services/resend/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions services/trigger/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions services/upstash/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
5 changes: 2 additions & 3 deletions packages/kv/package.json → services/upstash/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@v1/kv",
"name": "@v1/upstash",
"version": "1.0.0",
"private": true,
"main": "src/index.ts",
Expand All @@ -15,7 +15,6 @@
},
"dependencies": {
"@upstash/ratelimit": "^2.0.2",
"@upstash/redis": "^1.34.0",
"server-only": "^0.0.1"
"@upstash/redis": "^1.34.0"
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import "server-only";

import { Ratelimit } from "@upstash/ratelimit";
import { client } from ".";

Expand Down
File renamed without changes.

0 comments on commit 0511289

Please sign in to comment.