{"id":25402054,"url":"https://github.com/pome1lo/avtobus1-test-task","last_synced_at":"2026-01-22T18:43:14.164Z","repository":{"id":276986901,"uuid":"930976706","full_name":"pome1lo/avtobus1-test-task","owner":"pome1lo","description":"Test assignment to Avtobus1 company","archived":false,"fork":false,"pushed_at":"2025-02-14T13:22:25.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T16:50:00.590Z","etag":null,"topics":["aspnetcore","avtobus1","dot-net","js","test-task","webapi"],"latest_commit_sha":null,"homepage":"","language":"C#","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/pome1lo.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-02-11T14:22:19.000Z","updated_at":"2025-03-25T19:45:31.000Z","dependencies_parsed_at":"2025-04-12T11:51:15.401Z","dependency_job_id":null,"html_url":"https://github.com/pome1lo/avtobus1-test-task","commit_stats":null,"previous_names":["pome1lo/avtobus1-test-task"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pome1lo/avtobus1-test-task","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pome1lo%2Favtobus1-test-task","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pome1lo%2Favtobus1-test-task/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pome1lo%2Favtobus1-test-task/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pome1lo%2Favtobus1-test-task/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pome1lo","download_url":"https://codeload.github.com/pome1lo/avtobus1-test-task/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pome1lo%2Favtobus1-test-task/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28668270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T17:07:18.858Z","status":"ssl_error","status_checked_at":"2026-01-22T17:05:02.040Z","response_time":144,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["aspnetcore","avtobus1","dot-net","js","test-task","webapi"],"created_at":"2025-02-16T01:31:02.696Z","updated_at":"2026-01-22T18:43:14.137Z","avatar_url":"https://github.com/pome1lo.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# URL Shortener\n\nA URL shortener service built with .NET Core 8 and MySQL (MariaDB 10.3). The application allows users to generate short links, track redirects, and manage URLs.\n\n## Features\n- Generate short and unpredictable URLs.\n- Track the number of visits.\n- CRUD operations for managing short links.\n- Automatic database migrations.\n- Input validation to ensure correct URL formatting.\n\n## Project Structure\nThe project follows a structured architecture to showcase clean coding practices and scalability.\n\n## Setup and Installation\n### Prerequisites\n- .NET Core 8\n- MySQL (MariaDB 10.3)\n\n### Steps to Run the Project\n1. Update the database connection string in `appsettings.json`.\n2. Apply migrations:\n   ```sh\n   dotnet ef database update\n   ```\n3. Ensure that the tables are successfully created in the database.\n4. Run the application:\n   ```sh\n   dotnet run\n   ```\n\n## API Endpoints\n### Create a Short Link\n```\nPOST /api/shortlinks\n```\n**Request Body:**\n```json\n\"https://example.com\"\n```\n\n### Get All Short Links\n```\nGET /api/shortlinks\n```\n\n### Redirect to Original URL\n```\nGET /api/shortlinks/redirect/{shortUrl}\n```\n\n### Update a Short Link\n```\nPUT /api/shortlinks/{id}\n```\n**Request Body:**\n```json\n{\n  \"newOriginalUrl\": \"https://new-example.com\"\n}\n```\n\n### Delete a Short Link\n```\nDELETE /api/shortlinks/{id}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpome1lo%2Favtobus1-test-task","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpome1lo%2Favtobus1-test-task","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpome1lo%2Favtobus1-test-task/lists"}