Skip to content

MartinDM/URL-Jam-Shortener

Repository files navigation

URL Jam

image

URL Jam is a simple URL shortener application built with Next.js server actions, MongoDB, and Prisma. It allows users to shorten long URLs into more manageable and shareable links which are stored in localSotrage

Features

  • Shorten long URLs into concise links.
  • Link history in LocalStorage with deletion
  • Easy setup with MongoDB and Prisma integration.

Future features

  • Track clicks
  • Customise short link

Technologies Used

  • Next.js x TypeScript
  • MongoDB: A NoSQL database used for storing URL data on Atlas
  • Prisma: A modern database toolkit for TypeScript and Node.js, used for database ORM (Object-Relational Mapping).

Prerequisites

Before running the application, ensure you have the following installed:

  • Node.js
  • MongoDB
  • Prisma CLI

Installation

  1. Clone the repository:
git clone https://github.com/martinDM/url-jam.git
  1. Navigate to the project directory and download dependencies
cd url-jam
yarn install
  1. Set up the environment variables by creating a .env file and adding the following:
DATABASE_URL="mongodb://[CONNECTION STRING FOR ATLAS OR LOCAL MONGO INSTANCE]"
  1. Generate Prisma client:
npx prisma generate

Usage

  1. Start the development server:
yarn dev
  1. Access the application in your browser at http://localhost:3000.

  2. Enter a long URL in the input field and click "Jam" to generate a shortened URL.

  3. Share the shortened URL with others.

Contributors

  • Martin di Martino-Marriott

License

This project is licensed under the MIT License.