{"id":25963382,"url":"https://github.com/angelomca09/investments-backend","last_synced_at":"2026-05-16T22:31:27.773Z","repository":{"id":277244783,"uuid":"931747756","full_name":"angelomca09/investments-backend","owner":"angelomca09","description":"An Investments backend application in Node","archived":false,"fork":false,"pushed_at":"2025-09-11T13:52:39.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-11T16:34:52.148Z","etag":null,"topics":["backend","investments","node"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/angelomca09.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-12T19:40:54.000Z","updated_at":"2025-09-11T13:52:43.000Z","dependencies_parsed_at":"2025-02-12T23:22:44.314Z","dependency_job_id":"1c4b4315-a391-4a0c-be2f-4fe58e83df58","html_url":"https://github.com/angelomca09/investments-backend","commit_stats":null,"previous_names":["angelomca09/investments-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/angelomca09/investments-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelomca09%2Finvestments-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelomca09%2Finvestments-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelomca09%2Finvestments-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelomca09%2Finvestments-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angelomca09","download_url":"https://codeload.github.com/angelomca09/investments-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelomca09%2Finvestments-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33121060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"ssl_error","status_checked_at":"2026-05-16T18:38:29.903Z","response_time":115,"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":["backend","investments","node"],"created_at":"2025-03-04T20:30:03.311Z","updated_at":"2026-05-16T22:31:27.750Z","avatar_url":"https://github.com/angelomca09.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Investments Backend\n\nInitialy built with `tsc --init` and `npm init`, this project uses `tsx` to run Typescript files easier (no config).\nPrisma was installed with `npx prisma init --datasource-provider sqlite` and then `npx prisma generate` to generate the prisma client.\n\n## Setup\n\nFirst be sure to have a `.env` file created with the same structure as `.env.example`.\n\nTo setup prisma: `npm run db:migrate`.\n\nTo run the application: `npm run dev`.\n\n## Routes\n\n| HTTP Method | Endpoint | Description | Request Body | Response Body |\n|-|-|-|-|-|\n| GET | `/investments` | Fetch all investments | N/A | Array of investments |\n| POST | `/investments` | Create a new investment | `{ description, value, date, status, type }` | Created investment object |\n| PUT | `/investments/:id` | Update an existing investment| Partial `{ description, value, date, status, type }` | Updated investment object |\n| DELETE | `/investments/:id` | Delete an investment | N/A | N/A |\n\n### Examples\n\n**GET** `/investments` : Fetch all investments from the database.\n\nResponse:\n```json\n[\n  {\n    \"id\": \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n    \"description\": \"Investment\",\n    \"value\": 1000,\n    \"date\": \"2025-01-01T00:00:00.000Z\",\n    \"status\": \"DONE\",\n    \"type\": \"BILLS\"\n  }\n]\n```\n\n\u003cbr/\u003e\n\n**POST** `/investments` : Create a new investment.\n\nRequest:\n```json\n{\n  \"description\": \"Investment in home\",\n  \"value\": 500,\n  \"date\": \"2025-01-01\",//\"2025-01-01T00:00:00.000Z\" would work too.\n  \"status\": \"PENDING\",\n  \"type\": \"HOME\"\n}\n```\n\nResponse:\n```json\n{\n  \"id\": \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n  \"description\": \"Investment in home\",\n  \"value\": 500,\n  \"date\": \"2025-01-01T00:00:00.000Z\",\n  \"status\": \"PENDING\",\n  \"type\": \"HOME\"\n}\n```\n\n**PUT** `/investments:id` : Update an existing investment.\n\nRequest:\n```json\n{\n  \"description\": \"Updated investment description\"\n}\n```\n\nResponse:\n```json\n{\n  \"id\": \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n  \"description\": \"Updated investment description\",\n  \"value\": 500,\n  \"date\": \"2025-01-01T00:00:00.000Z\",\n  \"status\": \"PENDING\",\n  \"type\": \"HOME\"\n}\n```\n\n**DELETE** `/investments:id` : Delete an investment by its ID.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangelomca09%2Finvestments-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangelomca09%2Finvestments-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangelomca09%2Finvestments-backend/lists"}