A comprehensive, production-ready URL shortening platform with QR code generation, file sharing, advanced analytics, team collaboration, and enterprise-grade admin panel. Built with React, Spring Boot, and MongoDB.
Live Demo: https://pebly.vercel.app
Admin Panel: https://pebly-admin.vercel.app
API Docs: https://urlshortner-1-hpyu.onrender.com/actuator
Pebly is a full-stack, enterprise-grade URL management platform designed for businesses, marketers, and developers. It provides powerful link shortening, QR code generation, file sharing, and comprehensive analytics with team collaboration features and a complete administrative control panel.
- 🚀 Production-Ready - Deployed on Vercel (frontend) and Render (backend) with 99.9% uptime
- 🔐 Enterprise Security - JWT authentication, OAuth 2.0, password protection, role-based access control
- 📊 Advanced Analytics - Real-time click tracking, geographic insights, device/browser analytics
- 👥 Team Collaboration - Multi-user workspaces with role-based permissions
- 🎨 Custom Branding - Custom domains with SSL, branded QR codes
- ⚡ High Performance - Redis caching, MongoDB optimization, CDN delivery
- 🛠️ Admin Panel - Complete platform management with RBAC system
- 💳 Payment Integration - Razorpay for subscription management
- 📱 Responsive Design - Mobile-first, works on all devices
- Generate short, memorable links with 6-character codes
- Custom aliases for branded links (Pro+)
- Password protection for secure sharing (Pro+)
- Link expiration dates (Pro+)
- Click limits and quotas (Pro+)
- Bulk link creation and management
- Custom domains with SSL (Business+)
- Dynamic QR codes with real-time preview
- Customizable colors, styles, and patterns
- Logo embedding for branding (Pro+)
- Multiple export formats (PNG, SVG, PDF)
- Scan tracking and analytics
- Batch QR code generation
- Direct file upload with shareable links
- Support for multiple file types (PDF, images, documents, archives)
- Password-protected file downloads (Pro+)
- Download tracking and analytics
- File expiration dates (Pro+)
- Storage quotas by plan
- Real-time tracking - Live click statistics
- Geographic data - Country, city, region analytics
- Device analytics - Desktop, mobile, tablet breakdown
- Browser analytics - Chrome, Firefox, Safari, etc.
- Referrer tracking - Traffic source analysis
- Time-based analytics - Hourly, daily, monthly trends
- Export capabilities - CSV, PDF reports
- Multi-user workspaces
- Role-based access control (Owner, Admin, Editor, Viewer)
- Team link management
- Shared analytics dashboard
- Member invitations and management
- Team usage quotas
- Add your own domain (e.g., links.yourbrand.com)
- Automatic SSL certificate provisioning
- DNS verification via CNAME records
- Domain transfer between users
- Multiple domains per account (Business+)
- JWT token authentication
- Google OAuth 2.0 integration
- Password hashing with BCrypt
- Link password protection
- Rate limiting and DDoS protection
- CORS configuration
- Input validation and sanitization
Complete administrative control panel with role-based access:
- Real-time platform metrics (users, links, revenue)
- System health monitoring
- Geographic distribution maps
- Revenue tracking by subscription plan
- Active users and engagement metrics
- User search and filtering
- Bulk operations (email, suspend, delete)
- User detail view with activity logs
- Subscription management
- Usage statistics and quotas
- Manual plan upgrades/downgrades
- Team overview and search
- Member management
- Team transfer between users
- Usage tracking per team
- Team subscription management
- Custom domain verification
- SSL provisioning status
- Domain transfer capabilities
- DNS configuration assistance
- Domain usage analytics
- View all shortened links
- Bulk operations on links
- QR code gallery and management
- File upload overview
- Content moderation tools
- Revenue dashboard
- Subscription management
- Payment history
- Refund processing
- Invoice generation
- Ticket management
- User communication
- Priority assignment
- Response tracking
- Support analytics
- API server health checks
- Database performance metrics
- Cache status monitoring
- Error tracking and logs
- Audit logs for compliance
- SUPER_ADMIN - Full system access
- ADMIN - Platform management
- SUPPORT_ADMIN - User support
- BILLING_ADMIN - Billing operations
- TECH_ADMIN - Technical operations
- MODERATOR - Content moderation
- AUDITOR - Read-only access
- 1,000 links per month
- Basic analytics
- Standard QR codes
- 100MB file storage
- Community support
- 5,000 links per month
- Custom aliases
- Password protection
- Link expiration
- Advanced analytics
- Custom QR codes with logo
- 5GB file storage
- Priority support
- Unlimited links
- Team collaboration (up to 10 members)
- Custom domains with SSL
- White-label options
- API access
- 50GB file storage
- Dedicated support
- SLA guarantees
- Framework: React 18 with TypeScript
- Styling: Tailwind CSS
- State Management: Context API + TanStack Query
- Routing: React Router v6
- HTTP Client: Axios
- Animations: Framer Motion
- Charts: Recharts
- Notifications: React Hot Toast
- Icons: Lucide React
- QR Generation: qrcode library
- Build Tool: Create React App
- Framework: Spring Boot 3.2.0
- Language: Java 17
- Database: MongoDB 6.0+
- Cache: Redis 7.0+
- Security: Spring Security + JWT
- Authentication: OAuth 2.0 (Google)
- Payment: Razorpay Integration
- Email: SendGrid
- QR Generation: ZXing (Zebra Crossing)
- Build Tool: Maven 3.8+
- Monitoring: Spring Boot Actuator + Prometheus
- Frontend Hosting: Vercel (CDN, Auto-scaling)
- Backend Hosting: Render (Docker containers)
- Database: MongoDB Atlas (Multi-region)
- Cache: Redis Cloud (High Availability)
- CI/CD: GitHub Actions
- Monitoring: Grafana + Prometheus
- SSL: Cloudflare (Custom domains)
- Version Control: Git + GitHub
- API Testing: Postman
- Database GUI: MongoDB Compass
- IDE: VS Code, IntelliJ IDEA
- Package Managers: npm, Maven
pebly/
├── frontend/ # React frontend application
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ │ ├── dashboard/ # Dashboard-specific components
│ │ │ ├── analytics/ # Analytics visualizations
│ │ │ ├── admin/ # Admin panel components
│ │ │ └── ui/ # Base UI components
│ │ ├── pages/ # Page components
│ │ │ ├── Home.tsx
│ │ │ ├── RedirectPage.tsx # Password-protected link handler
│ │ │ ├── Analytics.tsx
│ │ │ └── ...
│ │ ├── context/ # React Context providers
│ │ │ ├── AuthContext.tsx
│ │ │ ├── TeamContext.tsx
│ │ │ └── SubscriptionContext.tsx
│ │ ├── services/ # API service layer
│ │ │ ├── api.ts
│ │ │ ├── paymentService.ts
│ │ │ └── fileService.ts
│ │ ├── hooks/ # Custom React hooks
│ │ └── utils/ # Utility functions
│ ├── public/ # Static assets
│ ├── package.json
│ └── vercel.json # Vercel deployment config
│
├── admin-panel/ # Admin panel application
│ ├── src/
│ │ ├── components/ # Admin UI components
│ │ ├── pages/ # Admin pages
│ │ └── services/ # Admin API services
│ └── package.json
│
├── backend/ # Spring Boot backend
│ └── url-service/
│ ├── src/main/java/com/urlshortener/
│ │ ├── controller/ # REST API controllers
│ │ │ ├── UrlController.java
│ │ │ ├── AuthController.java
│ │ │ ├── TeamController.java
│ │ │ ├── PaymentController.java
│ │ │ └── ...
│ │ ├── service/ # Business logic layer
│ │ │ ├── UrlShorteningService.java
│ │ │ ├── AnalyticsService.java
│ │ │ ├── TeamService.java
│ │ │ ├── PaymentService.java
│ │ │ └── ...
│ │ ├── model/ # Data models
│ │ │ ├── ShortenedUrl.java
│ │ │ ├── User.java
│ │ │ ├── Team.java
│ │ │ └── ...
│ │ ├── repository/ # MongoDB repositories
│ │ ├── security/ # Security configuration
│ │ │ ├── JwtUtil.java
│ │ │ └── SecurityConfig.java
│ │ ├── config/ # Application configuration
│ │ └── admin/ # Admin-specific code
│ ├── src/main/resources/
│ │ └── application.yml # Application configuration
│ ├── pom.xml # Maven dependencies
│ └── Dockerfile # Docker configuration
│
├── docs/ # Documentation
│ ├── README.md # Documentation index
│ ├── getting-started.md # Setup guide
│ ├── api/ # API documentation
│ ├── architecture/ # Architecture docs
│ └── deployment/ # Deployment guides
│
├── scripts/ # Utility scripts
│ ├── backup.sh # Database backup
│ ├── deploy-production.sh # Production deployment
│ └── setup-production.sh # Production setup
│
├── .env.example # Environment variables template
├── .gitignore # Git ignore rules
├── LICENSE # MIT License
└── README.md # This file
- Node.js 18+ and npm
- Java 17+ (OpenJDK recommended)
- Maven 3.8+
- MongoDB 6.0+
- Redis 7.0+ (optional, for caching)
- Git for version control
git clone https://github.com/yourusername/pebly.git
cd pebly# Copy example environment file
cp .env.example .env
# Edit .env with your configuration
nano .envRequired Environment Variables:
# MongoDB
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/pebly
MONGODB_DATABASE=pebly-database
# JWT
JWT_SECRET=your-very-long-and-secure-jwt-secret-key-here
JWT_EXPIRATION=86400000
# Google OAuth
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
# Razorpay (for payments)
RAZORPAY_KEY_ID=your-razorpay-key-id
RAZORPAY_KEY_SECRET=your-razorpay-key-secret
# Application URLs
FRONTEND_URL=http://localhost:3000
APP_BASE_URL=http://localhost:8080cd backend/url-service
# Install dependencies and run
mvn clean install
mvn spring-boot:run
# Backend will start on http://localhost:8080cd frontend
# Install dependencies
npm install
# Start development server
npm start
# Frontend will start on http://localhost:3000cd admin-panel
# Install dependencies
npm install
# Start development server
npm start
# Admin panel will start on http://localhost:3001- Backend Health Check:
curl http://localhost:8080/actuator/health-
Frontend: Open http://localhost:3000 in your browser
-
Admin Panel: Open http://localhost:3001 in your browser
File: frontend/.env.local
REACT_APP_API_URL=http://localhost:8080/api
REACT_APP_RAZORPAY_KEY=rzp_test_your_key
REACT_APP_GOOGLE_CLIENT_ID=your_google_client_idFile: backend/url-service/src/main/resources/application.yml
spring:
data:
mongodb:
uri: ${MONGODB_URI}
database: ${MONGODB_DATABASE}
redis:
host: ${REDIS_HOST:localhost}
port: ${REDIS_PORT:6379}
server:
port: ${PORT:8080}
app:
jwt:
secret: ${JWT_SECRET}
expiration: ${JWT_EXPIRATION:86400000}
cors:
allowed-origins: ${FRONTEND_URL}POST /api/v1/auth/register
Content-Type: application/json
{
"name": "John Doe",
"email": "john@example.com",
"password": "securePassword123",
"confirmPassword": "securePassword123"
}POST /api/v1/auth/login
Content-Type: application/json
{
"email": "john@example.com",
"password": "securePassword123"
}POST /api/v1/auth/google
Content-Type: application/json
{
"token": "google_oauth_token"
}POST /api/v1/urls
Authorization: Bearer {jwt_token}
Content-Type: application/json
{
"originalUrl": "https://example.com/very/long/url",
"customAlias": "mylink",
"password": "secret123",
"expirationDays": 30,
"maxClicks": 1000,
"title": "My Link",
"description": "Link description"
}GET /api/v1/urls/user/{userId}
Authorization: Bearer {jwt_token}PUT /api/v1/urls/{shortCode}
Authorization: Bearer {jwt_token}
Content-Type: application/json
{
"title": "Updated Title",
"isActive": true
}DELETE /api/v1/urls/{shortCode}
Authorization: Bearer {jwt_token}POST /api/v1/qr
Authorization: Bearer {jwt_token}
Content-Type: application/json
{
"content": "https://example.com",
"size": 300,
"foregroundColor": "#000000",
"backgroundColor": "#FFFFFF",
"errorCorrectionLevel": "M"
}GET /api/v1/analytics/url/{shortCode}
Authorization: Bearer {jwt_token}GET /api/v1/analytics/user/{userId}
Authorization: Bearer {jwt_token}POST /api/v1/teams
Authorization: Bearer {jwt_token}
Content-Type: application/json
{
"name": "Marketing Team",
"description": "Team for marketing campaigns"
}POST /api/v1/teams/{teamId}/invite
Authorization: Bearer {jwt_token}
Content-Type: application/json
{
"email": "member@example.com",
"role": "EDITOR"
}For complete API documentation, visit: API Docs
- JWT Tokens - Secure token-based authentication with 24-hour expiry
- OAuth 2.0 - Google Sign-In integration
- Password Hashing - BCrypt with salt for secure password storage
- Role-Based Access Control (RBAC) - Fine-grained permissions for admin panel
- Token Refresh - Automatic token renewal mechanism
- HTTPS Enforcement - All traffic encrypted with SSL/TLS
- CORS Configuration - Restricted cross-origin requests
- Input Validation - Server-side validation for all inputs
- SQL Injection Prevention - Parameterized queries and ORM
- XSS Protection - Content Security Policy headers
- CSRF Protection - Token-based CSRF prevention
- Password Protection - Optional password for link access
- Link Expiration - Time-based link deactivation
- Click Limits - Maximum click quotas per link
- Rate Limiting - API request throttling to prevent abuse
- DDoS Protection - Cloudflare integration for DDoS mitigation
- Data Encryption - Sensitive data encrypted at rest
- Audit Logs - Complete activity tracking for compliance
- GDPR Compliant - User data management and deletion
- Privacy Policy - Clear data usage policies
- Terms of Service - Legal protection and user agreements
- MongoDB Connection Pooling - Efficient database connections
- Redis Caching - Frequently accessed data cached
- Async Processing - Non-blocking analytics recording
- Database Indexing - Optimized queries with compound indexes
- Lazy Loading - On-demand data loading
- Batch Operations - Bulk inserts and updates
- Code Splitting - React.lazy for route-based splitting
- Image Optimization - Compressed and lazy-loaded images
- Bundle Size Optimization - Tree shaking and minification
- CDN Delivery - Static assets served via Vercel CDN
- Service Workers - Offline capability and caching
- Memoization - React.memo and useMemo for performance
- Auto-scaling - Automatic resource scaling on Render
- Global CDN - Vercel's edge network for fast delivery
- Database Sharding - Horizontal scaling for MongoDB
- Load Balancing - Distributed traffic handling
- Health Checks - Automatic service recovery
cd backend/url-service
# Run all tests
mvn test
# Run specific test class
mvn test -Dtest=UrlServiceTest
# Generate coverage report
mvn jacoco:report
# Integration tests
mvn verifycd frontend
# Run all tests
npm test
# Run tests with coverage
npm run test:coverage
# Run tests in watch mode
npm test -- --watch
# E2E tests (if configured)
npm run test:e2e- Backend: 80%+ code coverage
- Frontend: 70%+ code coverage
- Critical Paths: 100% coverage (auth, payments, URL creation)
-
Connect Repository:
- Go to Vercel Dashboard
- Import your GitHub repository
- Select
frontendas root directory
-
Configure Environment Variables:
REACT_APP_API_URL=/api REACT_APP_RAZORPAY_KEY=rzp_live_xxx REACT_APP_GOOGLE_CLIENT_ID=xxx.apps.googleusercontent.com -
Deploy:
- Vercel auto-deploys on push to
mainbranch - Custom domain configuration available
- Vercel auto-deploys on push to
-
Connect Repository:
- Go to Render Dashboard
- Create new Web Service
- Connect GitHub repository
-
Configure Build:
Build Command: cd backend/url-service && mvn clean package -DskipTests Start Command: cd backend/url-service && java -jar target/url-service-1.0.0.jar -
Environment Variables:
MONGODB_URI=mongodb+srv://... JWT_SECRET=your-secret GOOGLE_CLIENT_ID=xxx GOOGLE_CLIENT_SECRET=xxx RAZORPAY_KEY_ID=xxx RAZORPAY_KEY_SECRET=xxx FRONTEND_URL=https://pebly.vercel.app -
Deploy:
- Render auto-deploys on push to
mainbranch - Health checks configured at
/actuator/health
- Render auto-deploys on push to
-
Create Cluster:
- Sign up at MongoDB Atlas
- Create a free or paid cluster
- Configure network access (allow Render IPs)
-
Create Database User:
- Add database user with read/write permissions
- Note username and password
-
Get Connection String:
mongodb+srv://username:password@cluster.mongodb.net/pebly?retryWrites=true&w=majority
-
Create Database:
- Sign up at Redis Cloud
- Create a free database
- Note host, port, and password
-
Configure Backend:
REDIS_HOST=redis-xxxxx.cloud.redislabs.com REDIS_PORT=12345 REDIS_PASSWORD=your-password
cd frontend
npm run build
# Deploy 'build' folder to any static hostingcd backend/url-service
mvn clean package -DskipTests
# Deploy target/url-service-1.0.0.jar to any Java hosting# Backend health
curl https://urlshortner-1-hpyu.onrender.com/actuator/health
# Detailed health info
curl https://urlshortner-1-hpyu.onrender.com/actuator/health/detailed# Prometheus metrics
curl https://urlshortner-1-hpyu.onrender.com/actuator/prometheus
# Application metrics
curl https://urlshortner-1-hpyu.onrender.com/actuator/metrics- Backend: Structured logging with Logback
- Frontend: Console logging in development, Sentry in production
- Log Levels: DEBUG (dev), INFO (staging), WARN/ERROR (prod)
- Grafana - Metrics visualization
- Prometheus - Metrics collection
- Sentry - Error tracking
- Vercel Analytics - Frontend performance
- Render Metrics - Backend performance
Problem: Users see backend URL after refreshing pages
Solution: Fixed in vercel.json with proper SPA fallback routing
{
"rewrites": [
{ "source": "/api/(.*)", "destination": "backend-url/api/$1" },
{ "source": "/(.*)", "destination": "/index.html" }
]
}Problem: Password-protected links show white screen
Solution: Fixed in SecurityConfig.java - redirect endpoints now public
.requestMatchers(HttpMethod.POST, "/api/v1/urls/*/redirect").permitAll()Problem: "Failed to save to database" errors
Solution: Fixed type conversion in CreateSection.tsx and UrlController.java
expirationDays: finalExpirationDays ? parseInt(finalExpirationDays.toString()) : undefined# Find process using port
lsof -i :8080
# Kill process
kill -9 <PID># Check MongoDB status
brew services list | grep mongodb
# Restart MongoDB
brew services restart mongodb-communityFor more troubleshooting, see: Troubleshooting Guide
- Getting Started Guide - Setup and installation
- Architecture Overview - System design
- API Reference - Complete API documentation
- Frontend Guide - React app architecture
- Backend Guide - Spring Boot services
- Admin Panel Guide - Admin interface
- Security Guide - Security best practices
- Deployment Guide - Production deployment
- Testing Guide - Testing strategies
- Complete Fix Summary - All recent fixes
- Backend URL Exposure Fix - URL routing fix
- Password Protection Fix - White screen fix
- Database Save Fix - Type conversion fix
- Password Expiration Testing - Testing guide
We welcome contributions from the community! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow existing code style and conventions
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting PR
- Frontend: ESLint + Prettier configuration
- Backend: Google Java Style Guide
- Commits: Conventional Commits format
- 🐛 Bug fixes
- ✨ New features
- 📝 Documentation improvements
- 🎨 UI/UX enhancements
- ⚡ Performance optimizations
- 🧪 Test coverage improvements
For detailed guidelines, see: Contributing Guide
- URL shortening and management
- User authentication (email + Google OAuth)
- QR code generation
- File upload and sharing
- Basic analytics
- Payment integration (Razorpay)
- Team collaboration
- Custom domain support
- Advanced analytics dashboard
- Admin panel with RBAC
- Password protection for links
- Link expiration and click limits
- Webhook system for real-time notifications
- Advanced API rate limiting
- Third-party integrations (Slack, Teams, Zapier)
- Advanced reporting and data exports
- Mobile application (React Native)
- Browser extensions (Chrome, Firefox)
- Enterprise SSO integration (SAML, OIDC)
- Advanced security features (2FA, IP whitelisting)
- Multi-language support
- Advanced compliance features (audit logs, data retention)
- White-label solutions for resellers
- GraphQL API
- Microservices architecture
- A/B testing for links
- Link retargeting and remarketing
- Advanced QR code templates
- Conversion tracking
- Funnel analysis
- Heatmaps and user journey tracking
- Total Lines of Code: ~50,000+
- Frontend: ~20,000 lines (TypeScript/React)
- Backend: ~25,000 lines (Java/Spring Boot)
- Admin Panel: ~5,000 lines (JavaScript/React)
- API Endpoints: 50+
- Database Collections: 12
- React Components: 100+
- Java Services: 25+
- Admin Roles: 7
- API Response Time: <200ms average
- Redirect Speed: <100ms
- Uptime: 99.9%
- Concurrent Users: 10,000+
- ✅ Production-Ready - Fully deployed and operational
- ✅ Enterprise-Grade - Complete admin panel with RBAC
- ✅ Secure - JWT auth, OAuth, password protection
- ✅ Scalable - Redis caching, MongoDB optimization
- ✅ Well-Documented - Comprehensive documentation
- ✅ Tested - Unit and integration tests
- ✅ Modern Stack - Latest React, Spring Boot, MongoDB
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2024 Venkatesh Lahori
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
- React Team - For the amazing React framework
- Spring Team - For the robust Spring Boot framework
- MongoDB - For the flexible NoSQL database
- Vercel - For seamless frontend hosting
- Render - For reliable backend hosting
- Tailwind CSS - For the utility-first CSS framework
- TanStack Query for data fetching
- Framer Motion for animations
- Recharts for analytics visualization
- ZXing for QR code generation
- JWT for authentication
- Razorpay for payment processing
- All contributors who have helped improve this project
- Open source community for inspiration and support
- Documentation: docs/README.md
- GitHub Issues: Report a bug
- GitHub Discussions: Ask questions
- Email: support@pebly.com
- Twitter: @PeblyApp
- LinkedIn: Pebly
- Discord: Join our community
For enterprise licensing, custom deployments, and dedicated support:
- Email: enterprise@pebly.com
- Website: pebly.com/enterprise
If you find this project helpful, please consider:
- ⭐ Star this repository on GitHub
- 🐛 Report bugs and suggest features
- 📝 Contribute to the codebase
- 📢 Share with your network
- 💬 Join our community discussions
Current Version: 1.0.0
Status: ✅ Production Ready
Last Updated: November 16, 2025
Maintained: Yes
License: MIT
**Built with ❤️ by [Venkatesh Lahori](https://github.com/venkatesh-lahori **
Website • Documentation • API • Admin Panel