Welcome to our URL shortener! This isn't just any URL shortener, it's a super-duper, high-flying, time-saving, and absolutely thrilling URL shortener. We take your long, cumbersome URLs and transform them into short, sweet, and shareable links. And guess what? We have a separate service that whisks users away to the original URL when the shortened URL is accessed. Magic! 🎩🐇
- Next.js: The React framework that needs no introduction.
- MongoDB: Our trusty database sidekick.
- Tailwind CSS: For when we want to look our best.
- NextAuth.js: Keeping your secrets safe with us.
- nanoid: The tiny, secure, URL-friendly, unique string ID generator.
- User Authentication: Secret identities are safe with us.
- URL Shortening: We take long URLs and make them short. Simple!
- Custom URLs: Want to name your URL? Go ahead, we won't stop you.
- Expiration: Because even URLs need to retire.
- Clone the repository.
- Install the dependencies with
npm install
. - Start the development server with
npm run dev
.
Then, open http://localhost:3000 with your browser to see the magic happen.
To run this project, you will need to add the following environment variables to your .env file:
MONGODB_URI
: Your MongoDB connection string.GOOGLE_CLIENT_ID
: Your Google OAuth client ID.GOOGLE_CLIENT_SECRET
: Your Google OAuth client secret.GITHUB_CLIENT_ID
: Your GitHub OAuth client ID.GITHUB_CLIENT_SECRET
: Your GitHub OAuth client secret.NEXTAUTH_SECRET
: A secret used to encrypt session data.NEXT_PUBLIC_APP_URL
: The public URL of your application.
You can find these details in the .env.sample
file in the root of the project.
We hope you enjoy using our URL shortener as much as we enjoyed building it. Happy shortening!