{"id":23586836,"url":"https://github.com/mae776569/fatura-task","last_synced_at":"2026-04-11T19:02:39.535Z","repository":{"id":91936625,"uuid":"355572430","full_name":"MAE776569/fatura-task","owner":"MAE776569","description":"Fatura is a small application that represents products and their providers.","archived":false,"fork":false,"pushed_at":"2021-04-08T12:33:44.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T16:19:44.541Z","etag":null,"topics":["api","database","expressjs","mysql","nodejs","sql"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/MAE776569.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":"2021-04-07T14:20:15.000Z","updated_at":"2021-08-09T14:50:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"3fc461d0-ab9b-4c92-a2e1-76939413c90f","html_url":"https://github.com/MAE776569/fatura-task","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MAE776569/fatura-task","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAE776569%2Ffatura-task","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAE776569%2Ffatura-task/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAE776569%2Ffatura-task/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAE776569%2Ffatura-task/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MAE776569","download_url":"https://codeload.github.com/MAE776569/fatura-task/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAE776569%2Ffatura-task/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31691503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["api","database","expressjs","mysql","nodejs","sql"],"created_at":"2024-12-27T04:14:44.046Z","updated_at":"2026-04-11T19:02:39.493Z","avatar_url":"https://github.com/MAE776569.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fatura\n\nFatura is a small application that represents products and their providers.\n\n## How to start\n\n1. Set environment variables to properly connect the database and start the server by creating a `.env` file and adding the variables. A sample of the env variables can be found in `.env.example`.\n\n2. install all project dependencies with `npm install`\n\n3. start the development server with `npm start`\n\n## Structure\n\nSQL (DDL Script) that describes the database schema can be found in [`/sql`](sql) folder.\n\nMiddlewares can be found in [`/middlewares`](middlewares) folder.\n\nRoutes can be found in [`/routes`](routes) folder.\n\n## API\n\n| Method | Endpoint                        | Query string                                                        | Description                                                                                  |\n| ------ | ------------------------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |\n| GET    | `/products`                     | **page**, **limit**, optional **category** to filter by category id | paginate products and filter products by category if category id is provided as query string |\n| PUT    | `/products/:id/toggle-featured` |                                                                     | toggle product as featured inside its category                                               |\n\n## Database\n\n- MySQL is used to connect the application, so make sure you have a MySQL driver that is running.\n\n- For consistency, a SQL query is used for querying the database as it was required to write DDL script.\n\n## Middlewares\n\n- Pagination middleware is used to append a pagination object to req so that it becomes available for the endpoints using the middleware.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmae776569%2Ffatura-task","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmae776569%2Ffatura-task","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmae776569%2Ffatura-task/lists"}