Skip to content

PradeepG-07/minify-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🪄 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

Approach - 1

Requires Node.js and MongoDB to run the application.

  1. Clone the repository.
    git clone https://github.com/PradeepG-07/minify-url.git
  2. Navigate to the project folder.
    cd minify-url
  3. Navigate to frontend directory, install dependencies and devDependencies.
    cd frontend
    npm install
  4. Configure environment variables for frontend.
    VITE_BACKEND_URL=
  5. Run frontend development server.
    npm run dev
  6. Navigate to backend directory, install dependencies and devDependencies.
    cd backend
    npm install
  7. Configure environment variables for backend.
    PORT=
    FRONTEND_URL=
    MONGODB_URL=
    DB_NAME=
  8. Run backend development server.
    npm start

Approach-2

Requires Docker and docker-compose to run the application.

  1. Follow step-1 and step-2 in approach-1.
  2. Run the below command to start backend and frontend:
    docker compose up

📁 Folder Structure

├── backend
│   ├── babel.config.cjs
│   ├── Dockerfile
│   ├── 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
│   └── vercel.json
├── docker-compose.yml
├── frontend
│   ├── Dockerfile
│   ├── eslint.config.js
│   ├── index.html
│   ├── package.json
│   ├── package-lock.json
│   ├── postcss.config.js
│   ├── public
│   │   └── favicon.ico
│   ├── 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
│   ├── vercel.json
│   └── vite.config.js
└── Readme.md

🤝 Contribution Guide

Contributions are welcome! Please follow these steps to contribute:

  1. Check for the future works in the below section.
  2. Setup the project locally.
  3. Fork the repository.
  4. Create a new branch:
    git checkout -b feature-branch
  5. Make your changes and commit them:
    git commit -m "Add new feature"
  6. Push to the branch:
    git push origin feature-branch
  7. Create a 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.

About

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.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages