Giter VIP home page Giter VIP logo

url-shortner's Introduction

URL Shortener

A URL shortener application built using the MERN stack (MongoDB, Express.js, React, Node.js).

frontpage

Table of Contents

Introduction

This project is a simple URL shortener application. Users can input a long URL, and the application will generate a shorter version of that URL. This is useful for sharing long URLs in a more compact form.

Features

  • Shorten long URLs
  • Redirect short URLs to the original long URLs
  • User authentication (Log in/Log out)
  • View all shortened URLs (for the authenticated user)

Technologies

  • Frontend: React, Bootstrap
  • Backend: Node.js, Express.js
  • Database: MongoDB
  • Routing: React Router
  • Version Control: Git

Installation

To run this project locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/DevPatel1023/Url-Shortner.git
    cd Url-Shortner
  2. Install dependencies for the backend:

    cd server
    npm install
  3. Install dependencies for the frontend:

    cd ../client
    npm install
  4. Set up environment variables:

    Create a .env file in the server directory and add your MongoDB connection string and any other necessary environment variables.

    MONGO_URI=your_mongodb_connection_string
    PORT=5000
  5. Run the backend server:

    cd server
    npm start
  6. Run the frontend development server:

    cd ../client
    npm start

Usage

  1. Access the application:

    Open your browser and go to http://localhost:3000.

  2. Shorten a URL:

    Enter a long URL in the input field and click the "Shorten" button to generate a short URL.

  3. Log in/Log out:

    Use the "Log in" button to authenticate yourself and access additional features.

Project Structure

Url-Shortner/ ├── client/ │ ├── public/ │ └── src/ │ ├── components/ │ │ ├── Navbar.jsx │ │ ├── UrlShortener.jsx │ │ ├── About.jsx │ │ ├── Login.jsx │ │ └── NoPage.jsx │ ├── App.css │ ├── App.js │ └── index.js ├── server/ │ ├── config/ │ ├── controllers/ │ ├── models/ │ ├── routes/ │ └── index.js └── README.md

Contributing

Contributions are welcome! Please follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add new feature').
  5. Push to the branch (git push origin feature-branch).
  6. Create a new Pull Request.

License

This project is licensed under the MIT License.

Contact

If you have any questions or suggestions, feel free to reach out.

url-shortner's People

Contributors

devpatel1023 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.