{"id":18850500,"url":"https://github.com/manthanank/url-shortener-app","last_synced_at":"2026-04-04T20:33:31.429Z","repository":{"id":206452219,"uuid":"700432887","full_name":"manthanank/url-shortener-app","owner":"manthanank","description":"URL Shortner App","archived":false,"fork":false,"pushed_at":"2025-06-15T14:40:42.000Z","size":1055,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-25T04:56:52.334Z","etag":null,"topics":["angular","express","full-stack","mongodb","nodejs","url-shortener"],"latest_commit_sha":null,"homepage":"https://shortener-url-app.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manthanank.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["manthanank"],"open_collective":"manthanank","buy_me_a_coffee":"manthanank","patreon":"manthanank"}},"created_at":"2023-10-04T15:30:31.000Z","updated_at":"2025-07-14T04:22:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"340014a1-ddd5-4706-9033-2f5d6859ffbf","html_url":"https://github.com/manthanank/url-shortener-app","commit_stats":null,"previous_names":["manthanank/url-shortener-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/manthanank/url-shortener-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manthanank%2Furl-shortener-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manthanank%2Furl-shortener-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manthanank%2Furl-shortener-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manthanank%2Furl-shortener-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manthanank","download_url":"https://codeload.github.com/manthanank/url-shortener-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manthanank%2Furl-shortener-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31413269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","express","full-stack","mongodb","nodejs","url-shortener"],"created_at":"2024-11-08T03:29:42.484Z","updated_at":"2026-04-04T20:33:31.403Z","avatar_url":"https://github.com/manthanank.png","language":"JavaScript","funding_links":["https://github.com/sponsors/manthanank","https://opencollective.com/manthanank","https://buymeacoffee.com/manthanank","https://patreon.com/manthanank"],"categories":[],"sub_categories":[],"readme":"# URL Shortener App\n\nA modern, full-featured URL shortener application built with Angular 20, Node.js, Express.js, MongoDB Atlas, and styled with Tailwind CSS 4. Features a robust backend API, comprehensive analytics, contact management, admin dashboard, and modern UI components with legal compliance pages.\n\n## Table of Contents\n\n- [Features](#features)\n- [Technology Stack](#technology-stack)\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Documentation](#api-documentation)\n- [Production](#production)\n- [System Architecture](#system-architecture)\n- [Contributing](#contributing)\n- [Support](#support)\n- [Changelog](#changelog)\n- [License](#license)\n\n## Features\n\n### Core Features\n\n- ✅ **URL Shortening**: Create short, memorable URLs from long original URLs\n- ✅ **Smart Redirects**: Fast redirection to original URLs with click tracking\n- ✅ **Analytics Dashboard**: Comprehensive statistics and click analytics\n- ✅ **Bulk Operations**: Support for bulk URL management\n- ✅ **Custom Expiration**: Set custom expiration dates for URLs\n- ✅ **Contact Management**: Contact form with admin dashboard for inquiries\n- ✅ **Legal Compliance**: Privacy policy, terms of service, and cookie policy pages\n\n### User Experience\n\n- ✅ **Modern UI**: Responsive design with Tailwind CSS 4\n- ✅ **Dark/Light Mode**: Theme switching with system preference detection\n- ✅ **Copy to Clipboard**: One-click copying of shortened URLs\n- ✅ **Real-time Updates**: Live analytics and status updates\n- ✅ **Mobile Responsive**: Optimized for all device sizes\n- ✅ **Lazy Loading**: Route-based code splitting for optimal performance\n\n### Security \u0026 Performance\n\n- ✅ **Rate Limiting**: API protection with configurable limits\n- ✅ **Input Validation**: Comprehensive URL and data validation\n- ✅ **Security Headers**: Helmet.js security middleware\n- ✅ **CORS Protection**: Proper cross-origin resource sharing\n- ✅ **Compression**: Response compression for better performance\n\n### Administrative Features\n\n- ✅ **URL Management**: View, edit, and delete shortened URLs\n- ✅ **Analytics Insights**: Detailed click statistics and trends\n- ✅ **Bulk Export**: Export URL data and analytics\n- ✅ **Health Monitoring**: API health checks and status monitoring\n- ✅ **Contact Administration**: Manage and respond to user inquiries\n- ✅ **Content Management**: Legal pages and policy management\n\n## Technology Stack\n\n### Frontend\n\n- **Angular**: 20.0.3 (Latest stable with standalone components)\n- **TailwindCSS**: 4.1.10 (Utility-first CSS framework)\n- **TypeScript**: 5.8.3\n- **RxJS**: 7.8.2 (Reactive programming)\n- **Angular CLI**: 20.0.2 (Build system)\n\n### Backend\n\n- **Node.js**: \u003e=18.0.0\n- **Express.js**: 4.19.2\n- **MongoDB**: Atlas (Cloud database)\n- **Mongoose**: 8.5.1 (ODM)\n- **Swagger**: API documentation with UI\n- **Jest**: 29.7.0 (Testing framework)\n\n### Development \u0026 Deployment\n\n- **Angular CLI**: 20.0.2\n- **Jest**: 29.7.0 (Testing framework)\n- **Vercel**: Serverless deployment platform\n- **Swagger**: API documentation\n- **ESLint**: Code linting and formatting\n- **Nodemon**: Development server with hot reload\n\n## Installation\n\n### Prerequisites\n\n- **Node.js**: Version 18.0.0 or higher\n- **MongoDB Atlas**: Cloud database account (or local MongoDB installation)\n- **npm**: Package manager (comes with Node.js)\n\n### Backend Setup\n\n1. **Clone the repository:**\n\n    ```bash\n    git clone https://github.com/manthanank/url-shortener-app.git\n    cd url-shortener-app\n    ```\n\n2. **Install backend dependencies:**\n\n    ```bash\n    cd backend\n    npm install\n    ```\n\n3. **Configure environment variables:**\n\n    Create a `.env` file in the `backend` directory:\n\n    ```env\n    PORT=3000\n    MONGODB_URI=your_mongodb_atlas_connection_string\n    NODE_ENV=development\n    CORS_ORIGIN=http://localhost:4200\n    ```\n\n4. **Start the backend server:**\n\n    ```bash\n    # Development mode with auto-restart\n    npm run dev\n\n    # Production mode\n    npm start\n    ```\n\n### Frontend Setup\n\n1. **Install frontend dependencies:**\n\n    ```bash\n    # From the root directory\n    npm install\n    ```\n\n2. **Configure environment:**\n\n    Update `src/environments/environment.development.ts`:\n\n    ```typescript\n    export const environment = {\n      production: false,\n      apiUrl: 'http://localhost:3000/api'\n    };\n    ```\n\n3. **Start the development server:**\n\n    ```bash\n    npm start\n    # or\n    ng serve\n    ```\n\nThe application will be available at:\n\n- **Frontend**: `http://localhost:4200`\n- **Backend API**: `http://localhost:3000`\n- **API Documentation**: `http://localhost:3000/api-docs`\n\n## Usage\n\n### Basic URL Shortening\n\n1. **Access the application** at `http://localhost:4200`\n2. **Enter a long URL** in the input field\n3. **Click \"Shorten URL\"** to generate a short URL\n4. **Copy the shortened URL** using the copy button\n5. **Test the redirect** by clicking the shortened URL\n\n### Analytics \u0026 Management\n\n1. **View Analytics**: Navigate to `/analytics` to see URL statistics\n2. **Manage URLs**: View all shortened URLs with click counts\n3. **Bulk Operations**: Select multiple URLs for batch operations\n4. **Export Data**: Download analytics reports\n\n### Advanced Features\n\n- **Custom Expiration**: Set expiration dates for temporary URLs\n- **Theme Toggle**: Switch between light and dark modes\n- **Responsive Design**: Use on mobile, tablet, or desktop devices\n- **Contact Form**: User inquiry submission and management\n- **Legal Pages**: Privacy policy, terms of service, and cookie policy\n- **Admin Dashboard**: Administrative interface for contact management\n\n### Additional Pages\n\n- **Contact**: `/contact` - Submit inquiries and feedback\n- **Privacy Policy**: `/privacy` - Data privacy and protection information\n- **Terms of Service**: `/terms` - Terms and conditions of use\n- **Cookie Policy**: `/cookies` - Cookie usage and preferences\n- **Admin Contacts**: `/admin/contacts` - Administrative contact management\n\n## API Documentation\n\nThe backend provides a comprehensive REST API with the following endpoints:\n\n### Core Endpoints\n\n- `POST /api/shorten` - Create a new short URL\n- `GET /api/urls` - Retrieve all URLs with pagination\n- `GET /api/urls/:shortUrl` - Get URL details and analytics\n- `DELETE /api/urls/:shortUrl` - Delete a short URL\n- `GET /api/analytics` - Get comprehensive analytics\n- `POST /api/contact` - Submit contact form\n- `GET /api/admin/contacts` - Get all contact submissions (Admin)\n\n### API Features\n\n- **Rate Limiting**: Protection against abuse\n- **Validation**: Input validation with Joi\n- **Error Handling**: Standardized error responses\n- **Swagger Documentation**: Interactive API docs at `/api-docs`\n\nFor detailed API documentation, visit the [Backend API Documentation](backend/API_DOCS.md).\n\n## Production\n\n### Building for Production\n\n1. **Build the frontend:**\n\n    ```bash\n    npm run build\n    ```\n\n2. **Configure production environment:**\n\n    Update `src/environments/environment.ts`:\n\n    ```typescript\n    export const environment = {\n      production: true,\n      apiUrl: 'https://your-api-domain.vercel.app/api'\n    };\n    ```\n\n### Deployment Options\n\n#### Vercel (Recommended)\n\n1. **Deploy backend:**\n\n    ```bash\n    cd backend\n    vercel\n    ```\n\n2. **Deploy frontend:**\n\n    ```bash\n    vercel\n    ```\n\n#### Manual Deployment\n\n1. **Backend**: Deploy to any Node.js hosting service (Heroku, DigitalOcean, AWS)\n2. **Frontend**: Serve the `dist/` folder from any static hosting service\n3. **Database**: Ensure MongoDB Atlas connection string is configured\n\n### Environment Configuration\n\n**Production Backend `.env`:**\n\n```env\nPORT=3000\nMONGODB_URI=your_production_mongodb_uri\nNODE_ENV=production\nCORS_ORIGIN=https://your-frontend-domain.com\n```\n\n## System Architecture\n\nThis application follows a modern JAMstack architecture with serverless deployment. For detailed system design documentation, see [SYSTEM_DESIGN.md](SYSTEM_DESIGN.md).\n\n### Key Architecture Components\n\n- **Frontend**: Angular 20 SPA with Tailwind CSS\n- **Backend**: Node.js/Express.js RESTful API\n- **Database**: MongoDB Atlas (Cloud NoSQL)\n- **Deployment**: Vercel serverless functions\n- **CDN**: Static asset delivery optimization\n\n**Live Demo**: [URL Shortener App](https://url-shortener-app-manthanank.vercel.app/)\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nWe welcome contributions! Please follow these steps:\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## Support\n\nFor support and questions:\n\n- 📧 **Email**: [Support](mailto:support@example.com)\n- 🐛 **Issues**: [GitHub Issues](https://github.com/manthanank/url-shortener-app/issues)\n- 📖 **Documentation**: [System Design](SYSTEM_DESIGN.md) | [API Docs](backend/API_DOCS.md)\n\n## Changelog\n\n### Version 2.0.0 (Current)\n\n- ✅ Upgraded to Angular 20.0.3\n- ✅ Updated to Tailwind CSS 4.1.10\n- ✅ Enhanced analytics dashboard\n- ✅ Improved security with rate limiting\n- ✅ Added bulk operations\n- ✅ Serverless deployment optimization\n- ✅ Comprehensive API documentation\n- ✅ Added system architecture documentation\n- ✅ Contact form with admin management system\n- ✅ Legal compliance pages (Privacy, Terms, Cookies)\n- ✅ Standalone Angular components with lazy loading\n- ✅ Enhanced testing with Jest integration\n- ✅ ESLint configuration for code quality\n\n---\n\nBuilt with ❤️ using Angular, Node.js, and MongoDB\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanthanank%2Furl-shortener-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanthanank%2Furl-shortener-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanthanank%2Furl-shortener-app/lists"}