{"id":19739801,"url":"https://github.com/stpfeffer/rust-api","last_synced_at":"2025-08-12T12:34:03.082Z","repository":{"id":236866540,"uuid":"793311474","full_name":"StPfeffer/rust-api","owner":"StPfeffer","description":"A simple API in Rust","archived":false,"fork":false,"pushed_at":"2024-05-15T15:38:53.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T05:59:51.966Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/StPfeffer.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":"2024-04-29T01:15:20.000Z","updated_at":"2024-05-15T15:38:56.000Z","dependencies_parsed_at":"2024-11-12T01:28:48.929Z","dependency_job_id":null,"html_url":"https://github.com/StPfeffer/rust-api","commit_stats":null,"previous_names":["stpfeffer/rust-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/StPfeffer/rust-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StPfeffer%2Frust-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StPfeffer%2Frust-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StPfeffer%2Frust-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StPfeffer%2Frust-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StPfeffer","download_url":"https://codeload.github.com/StPfeffer/rust-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StPfeffer%2Frust-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270061393,"owners_count":24520291,"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-08-12T02:00:09.011Z","response_time":80,"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":[],"created_at":"2024-11-12T01:18:28.518Z","updated_at":"2025-08-12T12:34:03.061Z","avatar_url":"https://github.com/StPfeffer.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust API\n\nThis is a simple API written in [Rust](https://www.rust-lang.org/).\n\n## How to run\n\nThis code is using a [PostgreSQL](https://www.postgresql.org/) container in [Docker](https://www.docker.com/).\n\n### Docker\n\nTo start the PostgreSQL container:\n\n`docker-compose -f docker-compose.no_api.yml up -d`\n\nTo end the container:\n\n`docker-compose -f docker-compose.no_api.yml down`\n\n### Cargo\n\nAfter the container is running, you can execute the application using the following command:\n\n`cargo run`\n\n## Migrations\n\nGenerate reversible migration scripts containing both \"up\" and \"down\" SQL files:\n\n`sqlx migrate add -r \"description\"`\n\nTo syncronize the database schema with the migration scripts in \"`./migrations`\", execute:\n\n`sqlx migrate run`\n\n## Endpoints\n\n### Authentication\n\n#### /api/auth/register\n\nHandles the user registration within the API by invoking the `register` route function.\n\n#### /api/auth/login\n\nHandles the user login by invoking the `login` route function.\n\n#### /api/auth/logout\n\nHandles the user logout by invoking the `logout` route function.\n\n### User\n\n#### /api/users/me\n\nThis endpoint is accessible exclusively to users with a valid JWT. This function extracts the user's information from the request, filters out sensitive files such as the password, and then returns the result.\n\n#### /api/users\n\nThis endpoint is restricted to users having the \"admin\" role and a valid JWT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstpfeffer%2Frust-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstpfeffer%2Frust-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstpfeffer%2Frust-api/lists"}