LinkTrim is a simple and efficient URL shortener built using the MERN stack (MongoDB, Express, React, Node.js). It allows users to shorten long URLs, making them easier to share and manage. The backend API handles URL shortening and redirection, while the frontend provides a user-friendly interface to interact with the service.
- Tech Stack
- Features
- Getting Started
- Contribution Guidelines
- How to Contribute
- Issues and Bugs
- License
- Contact
- Frontend: React, TypeScript, Tailwind-CSS
- Backend: Node.js, Express, MongoDB
- Database: MongoDB
- URL shortening functionality
- Redirects users to the original URL
- User-friendly interface for easy interaction
- Real-time URL validation before shortening
To set up the project locally, ensure you have the following installed:
- Node.js
- MongoDB
-
Clone the repository:
git clone https://github.com/Aapush01/LinkTrim.git cd LinkTrim
-
Install the backend dependencies:
cd backend npm install
-
Install the frontend dependencies:
cd ../frontend npm install
-
Set up the environment variables:
Create a .env file in the backend directory with the following variables:
PORT=5000 MongoDB_URL=your_mongodb_connection_string BASE_URL=https://linktrim-ts01.onrender.com
Create a .env file in the frontend directory with the following variables:
VITE_SERVER_URL="Your_Backend_URL"
-
Start the backend server:
cd backend npm run dev
This will start the Express.js server at http://localhost:5000.
-
Start the frontend server:
cd ../frontend npm run dev
This will start the frontend at http://localhost:3000.
-
You can now visit the app at http://localhost:3000!
I am excited to have you contribute to LinkTrim! Please follow these guidelines to ensure a smooth collaboration:
- Follow the Code of Conduct.
- Fork the repository and clone it to your local machine.
- Create a new branch (
git checkout -b your-feature-branch
). - Make your changes and test thoroughly.
- Submit a pull request (PR) to the
main
branch, describing the changes you've made. - Ensure your PR addresses an open issue or includes details in the PR.
- Follow standard JavaScript best practices.
- Use Tailwind CSS for styling.
- Make sure code is well-documented.
Please make sure to test your changes before submitting a pull request.
- Find an Issue: Check the Issues tab for bugs or features you can work on.
- Open a Pull Request: Once you've made your changes, open a PR, and describe your work.
If you're new to open-source, feel free to ask questions! I am happy to help you get started.
I track issues in the GitHub Issues section. If you find a bug or have a feature request, please create a new issue with as much detail as possible.
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to reach out for any questions or discussions:
- Twitter: @aapush2
- GitHub: @aapush01
- LinkedIn: Md Shahid Afridi