drgatooo / fwrd.lol

Official code for fwrd.lol website RELEASED :))))))))))

Home Page:https://fwrd.lol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fwrd.lol ๐Ÿ”—

An open-source URL shortener, QR code generator, and link-in-bio service. Built with Next.js, Tailwind CSS, and Prisma.

Getting Started ๐Ÿš€

  1. Clone the repository:
git clone https://github.com/drgatooo/fwrd.lol.git
  1. Install the dependencies:
npm install
# or
yarn install
# or
pnpm install
  1. Set up the environment variables:

Rename the .env.example file to .env and fill in the required environment variables. Here is a guide to the environment variables:

๐Ÿ“‚ Database

By default, the application uses MongoDB, and Prisma as the ORM. You can change the database to any other supported by Prisma.

datasource db {
    provider = "mongodb" // Change this to your preferred database
    url      = env("DATABASE_URL")
}

Update the DATABASE_URL .env variable with your database connection string.

๐Ÿ”‘ Google OAuth

  • Create a new project in the Google API Console.

  • Set up OAuth consent screen.

  • Create new OAuth client ID credentials, and choose Web application as the application type.

  • In Authorized redirect URIs, add (your url(s) with http(s))/api/auth/callback/google.

  • Copy the client ID and client secret to the .env file.

๐Ÿ”’ NextAuth

To create a good value for the NEXTAUTH_SECRET, run the following command:

openssl rand -base64 32

In NEXTAUTH_URL, set the URL of your application (or localhost if you're on development).

NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secret

๐Ÿ“ท ImgBB API key

  • Create an account on ImgBB.

  • Go to the API section and copy the API v1 key.

  • Set the IMGBB_KEY in the .env file.

๐Ÿ”ฎ Admin Key

Set a custom ADMIN_KEY in the .env file. This key is used to make POST requests to set Premium users.

๐Ÿ”ง KV Store

  • Go to Vercel, then to your Storage tab.

  • Click on KV Durable Redis, then set up all things.

  • Copy all the variables in .env.local tab to your .env file.

  • If you will upload the project to Vercel, you don't need to set the KV variable in production, just configure it in the Vercel dashboard.

  1. Generate Prisma database
npx|yarn|pnpm prisma generate
  1. Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev

Open http://localhost:3000 with your browser to see the result.

Contributing ๐Ÿค

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

About

Official code for fwrd.lol website RELEASED :))))))))))

https://fwrd.lol

License:MIT License


Languages

Language:TypeScript 89.8%Language:CSS 8.9%Language:JavaScript 1.3%