Skip to content

Latest commit

 

History

History
126 lines (119 loc) · 4.06 KB

Readme.md

File metadata and controls

126 lines (119 loc) · 4.06 KB

🪄 Minify URL

Hey Folks, Welcome to Minify URL!

📜 Description

Minif URL mainly aims to generate a short url for any long url that is difficult to remember. This project offers free shorturl service to everyone over the internet.

⚙️ Installation and Configuration

Requires Node.js to run the application.

  1. Fork the repository.

  2. Clone your repository.

    git clone https://github.com/<YOUR-USERNAME>/minify-url.git
  3. Move to cloned folder.

    cd minify-url
  4. Change directory to frontend, install dependencies and devDependencies.

    cd frontend
    npm install
  5. Configure environment variables for frontend.

    VITE_BACKEND_URL=
  6. Run frontend development server.

    npm run dev
  7. Change directory to backend, install dependencies and devDependencies.

    cd backend
    npm install
  8. Configure environment variables for backend.

    PORT=
    FRONTEND_URL=
    MONGODB_URL=
    DB_NAME=
  9. Run backend development server.

    npm start

📁 Folder Structure

├── backend
│   ├── babel.config.cjs
│   ├── package.json
│   ├── package-lock.json
│   ├── src
│   │   ├── app.js
│   │   ├── controllers
│   │   │   ├── contact.controller.js
│   │   │   └── url.controller.js
│   │   ├── index.js
│   │   ├── middlewares
│   │   ├── models
│   │   │   ├── ContactMessage.model.js
│   │   │   └── Url.model.js
│   │   ├── routes
│   │   │   ├── contact.route.js
│   │   │   ├── index.route.js
│   │   │   └── url.route.js
│   │   └── utils
│   │       ├── cleanedEnv.js
│   │       ├── helpers.js
│   │       └── zodSchemas.js
│   └── tests
│       └── index.test.js
├── frontend
│   ├── eslint.config.js
│   ├── index.html
│   ├── package.json
│   ├── package-lock.json
│   ├── postcss.config.js
│   ├── public
│   │   └── favicon.ico
│   ├── README.md
│   ├── src
│   │   ├── api
│   │   │   └── index.js
│   │   ├── App.jsx
│   │   ├── components
│   │   │   ├── Feedback.jsx
│   │   │   ├── Footer.jsx
│   │   │   ├── Navbar.jsx
│   │   │   └── TypingAnimation.jsx
│   │   ├── index.css
│   │   ├── main.jsx
│   │   ├── pages
│   │   │   ├── About.jsx
│   │   │   ├── Contact.jsx
│   │   │   ├── Home.jsx
│   │   │   ├── index.js
│   │   │   ├── MinifyUrl.jsx
│   │   │   └── RedirectToLongURL.jsx
│   │   └── utils
│   │       ├── asyncHandler.js
│   │       ├── cleanedEnv.js
│   │       └── zodSchemas.js
│   ├── tailwind.config.js
│   └── vite.config.js
└── Readme.md

🤝 Contribution Guide

  • Check for the future works in the below section.
  • Setup the project locally from installation guide.
  • Play with it and run tests.
  • Create a issue and attach a pull request.
  • We will verify and merge your pull request.

🧪 Run tests

  • Tests are written for the backend using jest.
  • If any changes made to the backend, run tests before attaching a pull request.
    npm test

🚀 Future Works

  • Create custom slugs for short urls.
  • Implement register and login mechanism.
  • Create dashboard for click tracking and managing all your short urls.