{"id":18750095,"url":"https://github.com/ssoaresleo/crud-users-api","last_synced_at":"2025-11-26T15:30:17.962Z","repository":{"id":152656825,"uuid":"626741114","full_name":"ssoaresleo/crud-users-api","owner":"ssoaresleo","description":"Este projeto é um exemplo de um CRUD de usuários usando Node.js, TypeScript e Prisma para se conectar ao MongoDB, permitindo criar, atualizar, listar e excluir usuários no banco","archived":false,"fork":false,"pushed_at":"2023-04-20T15:16:55.000Z","size":372,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-28T22:28:08.860Z","etag":null,"topics":["crud","mongodb","node-js","prisma","prisma-client","typescript"],"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/ssoaresleo.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":"2023-04-12T04:21:47.000Z","updated_at":"2023-04-13T13:41:40.000Z","dependencies_parsed_at":"2023-08-13T17:31:14.586Z","dependency_job_id":null,"html_url":"https://github.com/ssoaresleo/crud-users-api","commit_stats":null,"previous_names":["ssoaresleo/crud-users-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssoaresleo%2Fcrud-users-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssoaresleo%2Fcrud-users-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssoaresleo%2Fcrud-users-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssoaresleo%2Fcrud-users-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssoaresleo","download_url":"https://codeload.github.com/ssoaresleo/crud-users-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239635534,"owners_count":19672190,"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","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":["crud","mongodb","node-js","prisma","prisma-client","typescript"],"created_at":"2024-11-07T17:10:18.778Z","updated_at":"2025-11-26T15:30:17.911Z","avatar_url":"https://github.com/ssoaresleo.png","language":"TypeScript","readme":"# Users CRUD with Node.js\n\nHello devs👋, how are you? I came here to show my project, a user CRUD made with Node.js. I decided to create this project to remember some Node.js concepts and practice my skills 🤗\n\n\u003chr/\u003e\n\n## 📦Install\nBefore you start, you need to have Node.js and npm or yarn (Node.js package manager) installed on your machine. Then clone this repository and, inside the project folder, run the following command to install the dependencies:\n  \n```bash\nyarn install\n```\n\n```bash\nnpm install\n```\n\n## 🎲Run the app\nNow that we have all the project dependencies installed, make sure that: \u003cbr/\u003e\n\n-  The project uses the ORM the prism that connects with the mongodb so it is necessary to edit the DATABASE_URL with your connection URL inside the .env.example\n- To execute, use the command:\n\n```bash\nyarn start:dev\n```\n\n```bash\nnpm run start:dev\n```\n\nThe API will be available from http://localhost:3000 or http://localhost:3333 depending on the port configuration defined in the .env.example file\n\n## **Routes**\n\n## `GET /users`\n\nReturns a list of all registered users.\n\n### Response\n\n```json\n{\n  \"statusCode\": 200,\n  \"success\": true,\n  \"message\": \"Ok here is the list of users\",\n  \"data\": [\n  \"id\": \"6439f413df01d602184fab76\",\n  \"name\": \"user test\",\n  \"email\": \"user@gmail.com\"\n  ]\n}\n```\n\n## `GET /users/:id`\n\nSearch for a user with the entered ID.\n\n### Response\n\n```json\n{\n  \"statusCode\": 200,\n  \"success\": true,\n  \"message\": \"Here is your quest\",\n  \"data\": {\n  \"id\": \"6439f413df01d602184fab76\",\n  \"name\": \"user test\",\n  \"email\": \"usertest@gmail.com\"\n  }\n}\n```\n\nIt is important to insert the user id in the url parameter!\n\n## `POST /users`\n\nCreate a new user\n\n### Example of request\n\n```json\n{\n  \"name\": \"user test\",\n  \"email\": \"usertest@gmail.com\"\n}\n```\n\n### Response\n\n```json\n{\n  \"statusCode\": 201,\n  \"success\": true,\n  \"message\": \"Congratulations, your user has been successfully registered!\",\n  \"data\": {\n  \"id\": \"6439f413df01d602184fab76\",\n  \"name\": \"user test\",\n  \"email\": \"usertest@gmail.com\"\n  }\n}\n```\n\n## `PUT /users/:id`\n\nUpdates an existing user by its ID.\n\n### Example of request\n\n```json\n{\n  \"name\": \"user test modified\",\n  \"email\": \"usertestmodified@gmail.com\"\n}\n```\nIt is important to insert the user id in the url parameter!\n\n### Response\n\n```json\n{\n  \"statusCode\": 200,\n  \"success\": true,\n  \"message\": \"User updated successfully\",\n  \"data\": {\n  \"id\": \"6439f413df01d602184fab76\",\n  \"name\": \"user test modified\",\n  \"email\": \"usertestmodified@gmail.com\"\n  }\n}\n```\n\n## `DELETE /users/:id`\n\nDelete the user.\n\n### Response\n\n```json\n{\n  \"statusCode\": 200,\n  \"success\": true,\n  \"message\": \"User deleted successfully\",\n  \"data\": [\n  \"id\": \"6439f413df01d602184fab76\",\n  \"name\": \"user test\",\n  \"email\": \"user@gmail.com\"\n  ]\n}\n```\n\nIt is important to insert the user id in the url parameter!\n\n\u003chr/\u003e\n\n## 🛠Technologies and tools used\n\n- Node.s\n- Typescript\n- Prisma ORM (for MongoDB connection)\n- Jest (for automated testing)\n\n## Conclusion\n\nThis is my API, built in Node.js where I practiced some Node.js concepts and tested Prisma(ORM) to connect to a database, which I chose to be MongoDB. Possible updates may occur in the project, as I can bring improvements and more functionality to the API as I continue to develop it. So see you soon.\n\n💜 Built by Leonardo\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssoaresleo%2Fcrud-users-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssoaresleo%2Fcrud-users-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssoaresleo%2Fcrud-users-api/lists"}