
- πΈοΈ Features
- βοΈ Tech Stack
- π Project Structure
- π€Έ Quick Start
- π API Endpoints
- π Deployment
- πͺ΄ Future Enhancements
- π€ Contributing
- π License
- π© Contact
- π Shorten long URLs with a unique identifier
- π Instant redirection to the original URL
- π Track the number of clicks for each shortened link
- π Responsive and user-friendly UI
- π¨ Styled with Tailwind CSS
- React.js (Vite for fast development)
- Tailwind CSS (for modern UI styling)
- React Query (for state management)
- Axios (for API requests)
- Node.js & Express.js (REST API)
- MongoDB & Mongoose (Database & Schema management)
- nanoid (for generating unique short URLs)
- dotenv & cors (environment configuration & cross-origin handling)
/url-shortener
βββ client/ (React.js Frontend)
βββ server/ (Express.js Backend)
βββ public/ (Static Assets)
βββ package.json (Project Dependencies)
βββ .gitignore (Git Ignore File)
βββ LICENSE (Project License)
βββ README.md (Project Documentation)
Follow these steps to set up the project locally on your machine.
Prerequisites
Make sure you have the following installed on your machine:
- Git - for version control
- Node.js - for running JavaScript on the server
- pnpm - for package management
git clone https://github.com/your-username/quickshort.git
cd quickshort
cd server
pnpm install
CLIENT_API = <your_frontend_api_url>;
SERVER_API = <your_backend_api_url>;
MONGO_URI = <your_mongodb_connection_string>;
PORT = 5000;
pnpm dev
cd ../client
pnpm install
VITE_SERVER_API = <your_backend_api_url>;
pnpm dev
Visit: http://localhost:5173
POST /short
{
"longUrl": "https://example.com"
}
Response:
{
"shortUrl": "http://localhost:5000/abc1234"
}
GET /:shortId
When visiting http://localhost:5000/abc1234
, it redirects to https://example.com
.
- Frontend: Vercel
- Backend: Render
- Database: MongoDB Atlas
β
Add User Authentication (JWT)
β
Allow Custom Short URLs
β
Track Click Analytics
β
Create a Dashboard for Managing URLs
Contributions are welcome! Please feel free to submit a Pull Request.
To contribute:
Fork the repository
Create your feature branch (git checkout -b feature/your-feature
)
Commit your changes (git commit -m 'feat: add your feature'
)
Push to the branch (git push origin feature/your-feature
)
This project is licensed under the Apache License - see the LICENSE file for details.
For any questions or suggestions, feel free to reach out at laxmanrathod.dev@gmail.com.