{"id":22472525,"url":"https://github.com/theduardomaciel/dfl-api","last_synced_at":"2026-04-12T05:35:16.960Z","repository":{"id":38069041,"uuid":"494847806","full_name":"theduardomaciel/dfl-api","owner":"theduardomaciel","description":"An API responsible for the services required by the DFL application for the functioning of its subsystems (dashboard/mobile).","archived":false,"fork":false,"pushed_at":"2022-08-17T00:58:22.000Z","size":800,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T16:23:41.290Z","etag":null,"topics":["axios","cors","express","expressjs","javascript","nodejs","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/theduardomaciel/dfl-mobile","language":"TypeScript","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/theduardomaciel.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}},"created_at":"2022-05-21T17:15:29.000Z","updated_at":"2022-12-08T16:04:46.000Z","dependencies_parsed_at":"2022-07-08T01:40:35.010Z","dependency_job_id":null,"html_url":"https://github.com/theduardomaciel/dfl-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theduardomaciel/dfl-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theduardomaciel%2Fdfl-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theduardomaciel%2Fdfl-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theduardomaciel%2Fdfl-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theduardomaciel%2Fdfl-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theduardomaciel","download_url":"https://codeload.github.com/theduardomaciel/dfl-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theduardomaciel%2Fdfl-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31705574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-12T05:11:36.334Z","status":"ssl_error","status_checked_at":"2026-04-12T05:11:27.332Z","response_time":58,"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":["axios","cors","express","expressjs","javascript","nodejs","typescript"],"created_at":"2024-12-06T12:16:02.386Z","updated_at":"2026-04-12T05:35:16.931Z","avatar_url":"https://github.com/theduardomaciel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg alt=\"DFL - API\" height=\"80\" title=\"DFL - API\" src=\".github/app_icon.png\" /\u003e\n\u003c/h1\u003e\n\n\u003ch1 align=\"center\"\u003e\n  DFL - API\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"License\" src=\"https://img.shields.io/static/v1?label=license\u0026message=MIT\u0026color=346259\u0026labelColor=26413C\"\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?label=version\u0026message=api\u0026color=346259\u0026labelColor=26413C\" alt=\"API\" /\u003e\n  \u003cimg alt=\"Lines\" src=\"https://img.shields.io/tokei/lines/github/theduardomaciel/dfl-api?color=346259\u0026\u0026labelColor=26413C\u0026label=lines%20of%20code\" /\u003e\n\u003c/p\u003e\n\n\n![cover](.github/cover.png?style=flat)\n\n\n## 💻 Projeto\nAPI of the DFL (a.k.a GSD - Garbage Spot Detector) application, essential for the operation of the following sub-applications:\n* [Website (base/dashboard/blog)](https://github.com/theduardomaciel/dfl-web)\n* [Mobile app](https://github.com/theduardomaciel/dfl-mobile)\n\n## ✨ Technologies\n\n-   [ ] Node.js\n-   [ ] JavaScript (w/TypeScript)\n-   [ ] Prisma\n-   [ ] PostgreSQL\n-   [ ] Express\n-   [ ] Axios\n\n## Using the default application\n\nTo be able to download the default app on your Android mobile device (the only operating system currently available), visit the [DFL website](https://dfl.vercel.app) and navigate to the download area to install the .apk file of the application.\n\n\u003e To report an issue, please add an [issue](https://github.com/theduardomaciel/dfl-mobile/issues) so the bug can be tracked and resolved.\n\n# API Routes\n\n## User \u0026 Authentication\n| Route           | Description                                                                                                                                                 | Authentication? | Method | Body                        |\n| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | ------ | --------------------------- |\n| /authenticate   | Authenticate the user on the mobile app or create a account based on Google Accounts for him.\u003cbr\u003eReturns a access token to request authenticated api paths. | ❌               | POST   | { user_info, access_token } |\n| /user/[user_id] | Returns the user object.                                                                                                                                    | ADMIN           | GET    |\n\n~~~typescript\nuser_info: { \n    email: string, \n    id: number, //equivale ao ID do Google, e não ao ID que será criado pela API\n    familyName: string, // equivalente a \"lastName\"\n    givenName: string, //equivalente a \"firstName\"\n    photo: string \n}\n~~~\n\n~~~typescript\naccess_token: string \n// equivale ao token de acesso do Google para que informações adicionais sejam obtidas (ex.: gênero e data de nascimento)\n~~~\n\n## Profile\n| Route                            | Description                                                                                                          | Authentication? | Method | Body                                      |\n| -------------------------------- | -------------------------------------------------------------------------------------------------------------------- | --------------- | ------ | ----------------------------------------- |\n| /profile/[profile_id]            | Returns the user profile object.                                                                                     | ❌               | GET    |\n| /profile/[profile_id]            | Updates the user profile object.\u003cbr/\u003e                                                                                | ✅               | PATCH  | { username: string, defaultCity: string } |\n| /profile/[profile_id]/experience | Updates the user experience without needing to create a report.\u003cbr/\u003eOnly updates the equivalent to the player level. | ✅               | PATCH  |\n\n## Reports\n| Route               | Description                                              | Authentication? | Method | Body       |\n| ------------------- | -------------------------------------------------------- | --------------- | ------ | ---------- |\n| /report/[report_id] | Returns the report object.                               | ❌               | GET    |\n| /report             | Creates a report for a user profile with the given data. | ✅               | POST   | Post Body  |\n| /report/[report_id] | Updates the report object.                               | ✅               | PATCH  | Patch Body |\n|                     |\n\nPost Body:\n~~~typescript\n{ \n    profile_id: number,\n    tags: string || JSON, \n    address: string, \n    coordinates: Array\u003cnumber\u003e, \n    images: Array\u003cstring\u003e, // devem estar no formato base64 \n    suggestion: string, \n    hasTrashBins: boolean \n}\n~~~\n\nPatch Body:\n~~~typescript\n{ \n    profile_id: number, \n    rating: number, // a nota que está sendo adicionada pelo usuário (mobile app)\n    tags: string || JSON, \n    resolved: boolean, \n    approved: boolean, \n}\n~~~\n\n### Comments\n| Route                                    | Description                                       | Authentication? | Method | Body                                    |\n| ---------------------------------------- | ------------------------------------------------- | --------------- | ------ | --------------------------------------- |\n| /report/[report_id]/comment              | Creates a comment in a report                     | ✅               | POST   | { profile_id: number, content: string } |\n| /report/[report_id]/comment/[comment_id] | Returns a comment of a report with the given ID's | ✅               | GET    |\n| /report/[report_id]/comments             | Returns all the comments of a report.             | ✅               | GET    |\n\n## 📄 License\n\nThis project is under the MIT license. See the [LICENSE](LICENSE) file for more details.\n\n\u003cbr /\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheduardomaciel%2Fdfl-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheduardomaciel%2Fdfl-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheduardomaciel%2Fdfl-api/lists"}