tinyPath isn't just another URL shortenerβit's a complete link management platform designed for the modern web. Built with cutting-edge technologies and a passion for beautiful user experiences.
| π Lightning Fast | π¨ Beautiful Design | π Smart Analytics | π Secure & Private |
|---|---|---|---|
| Instant URL shortening | Dark/Light themes | Real-time click tracking | JWT authentication |
| Modern React 18 | Responsive design | Performance insights | Secure data handling |
- Transform any long URL into a clean, shareable link in seconds
- Custom short codes for branded links
- Bulk URL processing capabilities
- Real-time click tracking and statistics
- Geographic data and referrer insights
- Performance metrics and trends
- Export data for detailed analysis
- Secure user authentication with JWT
- Personal dashboard for link management
- Link history and organization
- Account settings and preferences
- Beautiful, intuitive interface with dark/light themes
- Fully responsive design that works on any device
- Fast loading times and smooth animations
- Accessibility-first approach
- Secure password hashing with bcrypt
- Protected routes and API endpoints
- Input validation and sanitization
- CORS protection and rate limiting
| Technology | Purpose | Why We Chose It |
|---|---|---|
| React 18 | UI Framework | Latest features, excellent performance |
| TanStack Router | Routing | Type-safe, modern routing solution |
| Redux Toolkit | State Management | Simplified Redux with great DevTools |
| TailwindCSS | Styling | Utility-first, highly customizable |
| TanStack Query | Data Fetching | Powerful caching and synchronization |
| Vite | Build Tool | Lightning-fast development experience |
| Technology | Purpose | Why We Chose It |
|---|---|---|
| Node.js | Runtime | Perfect for real-time applications |
| Express.js | Web Framework | Lightweight, flexible, battle-tested |
| MongoDB | Database | Flexible schema, excellent scalability |
| Mongoose | ODM | Elegant MongoDB object modeling |
| JWT | Authentication | Stateless, secure token-based auth |
| bcrypt | Password Hashing | Industry-standard security |
Node.js 18+ β’ MongoDB β’ Git β’ npm/yarn# Clone the repository
git clone https://github.com/RudraPratapDev/TinyPath.git
cd shortURL
# Install backend dependencies
cd BACKEND && npm install
# Install frontend dependencies
cd ../FRONTEND && npm installCreate environment files:
Backend Environment (.env)
NODE_ENV=development
PORT=5000
MONGODB_URI=mongodb://localhost:27017/tinypath
JWT_SECRET=your_super_secret_jwt_key_here
JWT_EXPIRE=7d
APP_URL=http://localhost:5000
CLIENT_URL=http://localhost:5173
BCRYPT_SALT_ROUNDS=12Frontend Environment (.env)
VITE_API_URL=http://localhost:5000/api
VITE_BASE_URL=http://localhost:5000# Start MongoDB (if running locally)
mongod
# Or use MongoDB Atlas for cloud hosting
# Update MONGODB_URI with your Atlas connection string# Terminal 1: Start Backend
cd BACKEND && npm run dev
# Terminal 2: Start Frontend
cd FRONTEND && npm run dev- π Frontend: http://localhost:5173
- π§ Backend API: http://localhost:5000
- π Live Demo: https://tiny-path-delta.vercel.app/
POST /api/auth/register # User registration
POST /api/auth/login # User login
POST /api/auth/logout # User logout
GET /api/auth/me # Get current userPOST /api/create # Create short URL
GET /api/user/urls # Get user's URLs
DELETE /api/urls/:id # Delete URL
GET /:shortId # Redirect to original URLCreate Short URL:
curl -X POST https://tiny-path-delta.vercel.app/api/create \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"longUrl": "https://example.com/very/long/url",
"customSlug": "my-link"
}'Response:
{
"success": true,
"shortUrl": "https://tiny-path-delta.vercel.app/my-link",
"data": {
"originalUrl": "https://example.com/very/long/url",
"shortId": "my-link",
"clicks": 0
}
}tinyPath/
βββ π BACKEND/
β βββ π src/
β β βββ π config/ # Database configuration
β β βββ π controllers/ # Request handlers
β β βββ π dao/ # Data access layer
β β βββ π middleware/ # Auth & validation
β β βββ π models/ # Database schemas
β β βββ π routes/ # API routes
β β βββ π utils/ # Helper functions
β βββ π app.js # Express app setup
β βββ π package.json # Dependencies
βββ π FRONTEND/
β βββ π src/
β β βββ π api/ # API calls
β β βββ π components/ # React components
β β βββ π context/ # React contexts
β β βββ π pages/ # Page components
β β βββ π store/ # Redux store
β β βββ π utils/ # Helper functions
β βββ π vite.config.js # Vite configuration
β βββ π vercel.json # Deployment config
β βββ π package.json # Dependencies
βββ π README.md # You are here!
# Build and deploy
npm run build
vercel --prod
# Or connect your GitHub repo to Vercel for auto-deployment# Deploy to Railway
railway login
railway new
railway up
# Set environment variables in your hosting platform# Backend
NODE_ENV=production
APP_URL=https://your-backend-domain.com
CLIENT_URL=https://your-frontend-domain.com
MONGODB_URI=mongodb+srv://user:[email protected]/tinypath
# Frontend
VITE_API_URL=https://your-backend-domain.com/api
VITE_BASE_URL=https://your-backend-domain.com- β JWT Authentication - Secure, stateless sessions
- β Password Hashing - bcrypt with salt rounds
- β Input Validation - Prevent malicious inputs
- β CORS Protection - Controlled cross-origin requests
- β Rate Limiting - Prevent abuse and spam
- β Environment Variables - Secure configuration management
- β‘ React 18 Features - Concurrent rendering
- β‘ Code Splitting - Lazy-loaded components
- β‘ Database Indexing - Optimized queries
- β‘ Caching Strategy - Efficient data retrieval
- β‘ Bundle Optimization - Minimal build sizes
- β‘ CDN Integration - Fast global delivery
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Code your improvements
- Test thoroughly
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
- Be respectful and collaborative
- π Documentation: Check this README first
- π Bug Reports: GitHub Issues
- π‘ Feature Requests: GitHub Discussions
- β Star this repository if you find it helpful
- π΄ Fork and contribute to the project
- π’ Share with your network
- π¬ Join discussions and provide feedback
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License - feel free to use this project for personal or commercial purposes!
- React Team - For the amazing framework
- Vercel - For seamless deployment platform
- MongoDB - For flexible database solutions
- TailwindCSS - For beautiful, utility-first styling
- Open Source Community - For inspiration and tools