An open-source URL shortener, QR code generator, and link-in-bio service. Built with Next.js, Tailwind CSS, and Prisma.
git clone https://github.com/drgatooo/fwrd.lol.git
npm install
# or
yarn install
# or
pnpm install
Rename the .env.example
file to .env
and fill in the required environment variables. Here is a guide to the environment variables:
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.
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.
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
Create an account on ImgBB.
Go to the API section and copy the API v1 key.
Set the IMGBB_KEY
in the .env
file.
Set a custom ADMIN_KEY
in the .env
file. This key is used to make POST requests to set Premium users.
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.
npx|yarn|pnpm prisma generate
npm run dev
# or
yarn dev
# or
pnpm dev
Open http://localhost:3000 with your browser to see the result.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.