https://github.com/jyotideepjee1803/onelink
Open Source Linktree Like Application
https://github.com/jyotideepjee1803/onelink
nextjs14 postgresql prisma-orm s3-bucket stripe
Last synced: about 2 months ago
JSON representation
Open Source Linktree Like Application
- Host: GitHub
- URL: https://github.com/jyotideepjee1803/onelink
- Owner: jyotideepjee1803
- Created: 2024-06-01T16:21:07.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-09T09:51:57.000Z (10 months ago)
- Last Synced: 2025-04-02T18:04:52.397Z (3 months ago)
- Topics: nextjs14, postgresql, prisma-orm, s3-bucket, stripe
- Language: TypeScript
- Homepage: https://one-link-nine.vercel.app
- Size: 2.67 MB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OneLink
An open-source clone of LinkTree using Next.js server components, Vercel Postgres, shadcn UI, Clerk, AWS S3 and Prisma.
## Running Locally
### Cloning the repository the local machine.
```bash
https://github.com/jyotideepjee1803/OneLink.git
```### Create a Postgres database on Vercel (optional, can use other provider)
- To get started with Vercel Postgres refer [Vercel Postgres Guide](https://vercel.com/docs/storage/vercel-postgres/quickstart)
- Add the environment variables in .env
- (This project uses Prisma as an ORM for the database)### Create a project on Clerk
- Add the environment variables in .env
- Ensure you have the following variables:
```
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL = /api/auth/user
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL = /api/auth/user
```### Create a S3 bucket
- Add the environment variables in .env
- Ensure you have the following variables:
```
S3_BUCKET =
S3_ACCESS_KEY_ID =
S3_SECRET_ACCESS_KEY =
S3_REGION =
```### Create a product on Stripe
- Add the environment variables in .env
- Ensure you have the following variables:
```
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=
NEXT_PUBLIC_STRIPE_MAX_PRICE_ID=
```
- To get the above webhook secret and simulate payments locally run :
```bash
npm run stripe:listen
or
pnpm run stripe:listen
```
- To get the webhook secret for deployment, add the following endpoint to your Stripe dashboard
```bash
YOUR_DEPLOYED_URL/api/webhooks/stripe
```### Installing the dependencies.
```bash
npm install
or
pnpm install
```### Running the application.
Then, run the application in the command line and it will be available at `http://localhost:3000`.
```bash
npm run dev
or
pnpm run dev
```