{"id":30680470,"url":"https://github.com/imjustlucas/url-shortener","last_synced_at":"2026-05-05T19:31:47.968Z","repository":{"id":311261805,"uuid":"1043135955","full_name":"ImJustLucas/url-shortener","owner":"ImJustLucas","description":"🔗 Elegant URL shortener built with React, Hono.js, PostgreSQL and everything else you need to turn long URLs into tiny, trackable links","archived":false,"fork":false,"pushed_at":"2025-08-23T14:01:57.000Z","size":96,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-23T14:44:05.804Z","etag":null,"topics":["hono","postgresql","react"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ImJustLucas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-08-23T08:03:25.000Z","updated_at":"2025-08-23T14:02:00.000Z","dependencies_parsed_at":"2025-08-23T14:57:18.414Z","dependency_job_id":"cfb98a34-a141-407d-a802-0f43c1d38001","html_url":"https://github.com/ImJustLucas/url-shortener","commit_stats":null,"previous_names":["imjustlucas/url-shortener"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ImJustLucas/url-shortener","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ImJustLucas%2Furl-shortener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ImJustLucas%2Furl-shortener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ImJustLucas%2Furl-shortener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ImJustLucas%2Furl-shortener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ImJustLucas","download_url":"https://codeload.github.com/ImJustLucas/url-shortener/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ImJustLucas%2Furl-shortener/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273151416,"owners_count":25054410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["hono","postgresql","react"],"created_at":"2025-09-01T16:04:25.567Z","updated_at":"2026-05-05T19:31:47.935Z","avatar_url":"https://github.com/ImJustLucas.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# URL Shortener\n\nA simple URL shortener service built with React, Hono.js, and PostgreSQL.\n\n## Features\n\n- ✨ Shorten long URLs to tiny URLs\n- 🔄 Automatic redirect to original URLs\n- 📊 Click tracking\n- 🚀 Deduplication (same URL returns same short link)\n- ⚡ Fast and lightweight\n\n## Tech Stack\n\n- **Frontend**: React + Vite + TypeScript\n- **Backend**: Hono.js + TypeScript\n- **Database**: PostgreSQL + Drizzle ORM\n- **Infrastructure**: Docker Compose\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js 18+\n- Docker \u0026 Docker Compose\n\n### Installation \u0026 Setup\n\n1. **Clone and install dependencies**\n\n   ```bash\n   git clone \u003crepo-url\u003e\n   cd url-shortener\n   npm install\n   ```\n\n2. **Start the application**\n\n   ```bash\n   npm start\n   ```\n\n   This will:\n\n   - Start PostgreSQL in Docker\n   - Run database migrations\n   - Start the API server (port 3000)\n   - Start the React app (port 5173)\n\n3. **Open your browser**\n   - Frontend: http://localhost:5173\n   - API: http://localhost:3000\n\n### Usage\n\n1. Enter a long URL in the input field\n2. Click \"Shorten URL\"\n3. Copy the generated short URL\n4. Visit the short URL to be redirected to the original\n\n### API Endpoints\n\n- `POST /api/shorten` - Create a short URL\n- `GET /api/urls` - List all URLs\n- `GET /:slug` - Redirect to original URL\n- `GET /health` - Health check\n\n### Development\n\n```bash\n# Start only the database\ndocker-compose up -d\n\n# Run database migrations\ncd server \u0026\u0026 npm run db:migrate\n\n# Start backend only\nnpm run dev:server\n\n# Start frontend only\nnpm run dev:client\n\n# View database\ncd server \u0026\u0026 npm run db:studio\n```\n\n### Stopping\n\n```bash\nnpm run stop\n```\n\n## Project Structure\n\n```\nurl-shortener/\n├── server/                    # Hono.js API\n│   ├── src/\n│   │   ├── routes/           # Route definitions (Hono apps)\n│   │   │   ├── url.ts       # URL shortening routes\n│   │   │   └── redirect.ts  # Redirection routes\n│   │   ├── services/        # Business logic services\n│   │   │   ├── url.service.ts\n│   │   │   └── redirect.service.ts\n│   │   ├── db/              # Database schema \u0026 connection\n│   │   └── index.ts         # Main server file\n│   └── package.json\n├── client/                   # React app\n│   ├── src/\n│   └── package.json\n└── docker-compose.yml\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimjustlucas%2Furl-shortener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimjustlucas%2Furl-shortener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimjustlucas%2Furl-shortener/lists"}