https://github.com/dharmik173/url_shortener1
A URL shortening web application that allows users to shorten long URLs, manage links via a dashboard, and track analytics. Built using Next.js, MongoDB, and NextAuth for authentication.
https://github.com/dharmik173/url_shortener1
dashboard full-stack mongodb nextauth nextjs reactjs short-url url-tracking vercel web-development
Last synced: 2 months ago
JSON representation
A URL shortening web application that allows users to shorten long URLs, manage links via a dashboard, and track analytics. Built using Next.js, MongoDB, and NextAuth for authentication.
- Host: GitHub
- URL: https://github.com/dharmik173/url_shortener1
- Owner: dharmik173
- Created: 2025-03-08T08:00:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-13T14:34:28.000Z (over 1 year ago)
- Last Synced: 2025-06-15T02:41:18.352Z (about 1 year ago)
- Topics: dashboard, full-stack, mongodb, nextauth, nextjs, reactjs, short-url, url-tracking, vercel, web-development
- Language: TypeScript
- Homepage: https://shortly-xi1.vercel.app
- Size: 187 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# URL Shortener
A simple URL shortener web application built with Next.js, MongoDB, and NextAuth for authentication.
## Features
- Shorten long URLs into short, easy-to-share links.
- User authentication with NextAuth.
- Dashboard to manage shortened URLs.
- Click tracking and analytics.
## Tech Stack
- **Frontend:** Next.js (App Router)
- **Backend:** API Routes in Next.js
- **Database:** MongoDB
- **Authentication:** NextAuth
- **Styling:** Tailwind CSS
- **Hosting:** Vercel
## Installation
### Prerequisites
- Node.js (>= 16)
- MongoDB (local or Atlas)
### Steps
1. Clone the repository:
```bash
git clone https://github.com/dharmik173/url_shortener1.git
cd url-shortener
```
2. Install dependencies:
npm install
3. Set up environment variables in a `.env.local` file:
```env
NEXT_PUBLIC_BASE_URL=''
GOOGLE_CLIENT_ID=''
GOOGLE_CLIENT_SECRET=''
NEXTAUTH_SECRET=''
JWT_SECRET=''
MONGODB_URI=''
NEXTAUTH_URL=''
NEXTAUTH_URL_INTERNAL=''
4. Start the development server:
npm run dev
The application will be running on `http://localhost:3000`
## Usage
- Sign in using the authentication method set up in NextAuth.
- Enter a long URL and generate a short link.
- Access the dashboard to manage your shortened URLs.
- Share the short link and track its usage.
## Future Improvements
- Add custom alias support.
- Implement QR code generation.
- Improve analytics for link tracking.
- Enhance UI/UX.
## Author
Developed by [Dharmik Shah](https://github.com/dharmik173).