Hey Folks, Welcome to Minify URL!
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.
- Clone the repository.
git clone https://github.com/PradeepG-07/minify-url.git
- Navigate to the project folder.
cd minify-url - Navigate to frontend directory, install
dependenciesanddevDependencies.cd frontend npm install - Configure environment variables for frontend.
VITE_BACKEND_URL=
- Run frontend development server.
npm run dev
- Navigate to backend directory, install
dependenciesanddevDependencies.cd backend npm install - Configure environment variables for backend.
PORT= FRONTEND_URL= MONGODB_URL= DB_NAME=
- Run backend development server.
npm start
Requires Docker and docker-compose to run the application.
- Follow step-1 and step-2 in approach-1.
- Run the below command to start backend and frontend:
docker compose up
├── 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
Contributions are welcome! Please follow these steps to contribute:
- Check for the future works in the below section.
- Setup the project locally.
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch
- Make your changes and commit them:
git commit -m "Add new feature" - Push to the branch:
git push origin feature-branch
- Create a pull request.
- Tests are written for the backend using
jest. - If any changes made to the backend, run tests before attaching a pull request.
npm test
- Create custom slugs for short urls.
- Implement register and login mechanism.
- Create dashboard for click tracking and managing all your short urls.