{"id":27226125,"url":"https://github.com/pushkarm029/rust_url_shortener","last_synced_at":"2026-07-02T19:04:30.657Z","repository":{"id":286980777,"uuid":"962545742","full_name":"Pushkarm029/rust_url_shortener","owner":"Pushkarm029","description":"Lightning-fast URL shortener service built with Rust. Turn long, unwieldy URLs into short, memorable links in milliseconds!","archived":false,"fork":false,"pushed_at":"2025-04-09T09:41:45.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-04-09T10:36:09.184Z","etag":null,"topics":["axum","concurrency","http","rust","sqllite","tokio"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/Pushkarm029.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}},"created_at":"2025-04-08T10:08:47.000Z","updated_at":"2025-04-09T09:44:10.000Z","dependencies_parsed_at":"2025-04-09T10:46:56.158Z","dependency_job_id":null,"html_url":"https://github.com/Pushkarm029/rust_url_shortener","commit_stats":null,"previous_names":["pushkarm029/rust_url_shortener"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pushkarm029%2Frust_url_shortener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pushkarm029%2Frust_url_shortener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pushkarm029%2Frust_url_shortener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pushkarm029%2Frust_url_shortener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pushkarm029","download_url":"https://codeload.github.com/Pushkarm029/rust_url_shortener/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248214520,"owners_count":21066456,"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","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":["axum","concurrency","http","rust","sqllite","tokio"],"created_at":"2025-04-10T11:47:15.788Z","updated_at":"2025-10-31T07:42:45.214Z","avatar_url":"https://github.com/Pushkarm029.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Rust URL Shortener\n\nA lightning-fast URL shortener service built with Rust. Turn long, unwieldy URLs into short, memorable links in milliseconds!\n\n## ✨ What Can It Do?\n\n- **Shorten URLs**: Transform `https://this-is-a-very-long-url-that-nobody-wants-to-type.com/with/lots/of/parameters?and=stuff` into `yourdomain.com/abc123`\n- **Custom Short Links**: Create your own memorable short URLs (like `yourdomain.com/rust`)\n- **Track Clicks**: See how many times your shortened links have been clicked\n- **API-First**: Easy-to-use REST API for all your shortening needs\n\n## 🔧 Built With\n\n- **Rust** + **Tokio**: For blazing fast, concurrent operations\n- **Axum**: Modern, ergonomic web framework\n- **SQLite**: Lightweight, embedded database (async-ready!)\n- **Clean Architecture**: Handlers → Services → Storage layers\n\n## 🚦 Getting Started\n\n### Prerequisites\n\n- Rust (latest stable)\n- SQLite\n\n### Quick Start\n\n1. **Clone \u0026 Enter**\n   ```bash\n   git clone https://github.com/yourusername/rust_url_shortener.git\n   cd rust_url_shortener\n   ```\n\n2. **Set Environment** (or use defaults)\n   ```bash\n   cp .env.example .env\n   ```\n\n3. **Launch!**\n   ```bash\n   cargo run\n   ```\n\n4. **Enjoy at http://localhost:8080**\n\n## 🔌 API Guide\n\n### Shorten a URL\n```bash\ncurl -X POST http://localhost:8080/api/shorten \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\": \"https://example.com/very/long/path\"}'\n```\nResponse:\n```json\n{\n  \"short_id\": \"abc123\",\n  \"original_url\": \"https://example.com/very/long/path\"\n}\n```\n\n### Create Custom Short URL\n```bash\ncurl -X POST http://localhost:8080/api/shorten \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\": \"https://rust-lang.org\", \"custom_id\": \"rust\"}'\n```\n\n### Get Link Stats\n```bash\ncurl http://localhost:8080/api/stats/rust\n```\n\n### Use Your Short Link\nJust open `http://localhost:8080/rust` in your browser!\n\n## 🧪 Testing\n\nThe project includes both unit tests and end-to-end API tests to ensure everything works correctly.\n\n### Unit Tests\n```bash\ncargo test\n```\n\n### API Integration Tests\n```bash\n./test_api.sh\n```\n\n## 🔄 CI/CD Pipeline\n\nThe project uses GitHub Actions to automate testing and quality checks:\n\n- ✅ **Unit Tests**: All code tests\n- 🔌 **API Integration Tests**: End-to-end API functionality tests\n- 📝 **Code Formatting**: Ensures consistent code style\n- 🔍 **Clippy Lints**: Catches common mistakes and improvements\n\n## 🏗️ Architecture\n\n```\n┌─────────────┐      ┌─────────────┐      ┌─────────────┐\n│  HTTP Layer │────▶│  Services   │────▶│   Storage   │\n│  (Handlers) │◀────│ (Business   │◀────│  (Database) │\n└─────────────┘      │    Logic)   │      └─────────────┘\n                     └─────────────┘\n```\n\n## 🔮 Future Improvements\n\n- Redis-based caching layer\n- PostgreSQL storage backend\n- Analytics dashboard\n- Rate limiting\n- Link expiration\n- Prometheus metrics integration\n\n## 📜 License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpushkarm029%2Frust_url_shortener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpushkarm029%2Frust_url_shortener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpushkarm029%2Frust_url_shortener/lists"}