ShortenerX is a URL shortening web-app built with Next.js and MongoDB. Users can shorten URLs, track usage, and manage them via a user-friendly interface.
- Shorten long URLs
- Track the number of clicks on each shortened URL
- View and manage your list of shortened URLs
To get a local copy up and running, follow these simple steps.
make sure you have installed these before you start:
- Node.js
- npm or yarn
- MongoDB (local or cloud instance)
-
Clone the repository:
git clone https://github.com/Saghy-jiz/urlshortie.git cd urlshortie
-
Install dependencies:
Using npm:
npm install
Or using yarn:
yarn install
-
Set up environment variables:
Create a
.env.local
file in the root directory and add your MongoDB connection string:MONGODB_URI=mongodb_connection_uri
Replace
mongodb_connection_uri
with your actual MongoDB connection string.
-
Start the development server:
Using npm:
npm run dev
Or using yarn:
yarn dev
-
Open your browser:
Visit
http://localhost:3000
to see the application in action.
- Next.js: A React framework for building server-side rendered applications.
- MongoDB: A NoSQL database for storing URL data.
- React: A JavaScript library for building user interfaces.
To make this project your own, you can:
- Customize the UI by editing the page.tsx file in the
app/
directory. - Modify the API routes in the
app/api
directory to add more features or change existing ones. - Update the styles in the
styles
directory to match your branding.
Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for more information.