{"id":25269822,"url":"https://github.com/n9mi/contact-api","last_synced_at":"2025-04-06T05:42:06.459Z","repository":{"id":257700455,"uuid":"854966251","full_name":"n9mi/contact-api","owner":"n9mi","description":"A RESTful API example for simple contacts and adress CRUD operation built with Typescript, Express, and Prisma.","archived":false,"fork":false,"pushed_at":"2024-09-18T02:12:59.000Z","size":135,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-12T11:19:52.531Z","etag":null,"topics":["expess-docker","express-prisma","express-rest-api"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/n9mi2/contact-api","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/n9mi.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-09-10T04:23:39.000Z","updated_at":"2024-09-18T02:14:55.000Z","dependencies_parsed_at":"2024-09-18T06:31:29.718Z","dependency_job_id":"c3b0cf6c-fe85-4512-989b-ed86a4c2259c","html_url":"https://github.com/n9mi/contact-api","commit_stats":null,"previous_names":["n9mi/contact-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n9mi%2Fcontact-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n9mi%2Fcontact-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n9mi%2Fcontact-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n9mi%2Fcontact-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/n9mi","download_url":"https://codeload.github.com/n9mi/contact-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441004,"owners_count":20939233,"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":["expess-docker","express-prisma","express-rest-api"],"created_at":"2025-02-12T11:19:58.274Z","updated_at":"2025-04-06T05:42:06.435Z","avatar_url":"https://github.com/n9mi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# contact-api\nA RESTful API example for simple contacts and adress CRUD operation built with Typescript, Express, and Prisma. Included with CI using Github Actions and automatic push on Dockerhub. My own version of [Programmer Zaman Now belajar-typescript-restful-api](https://github.com/ProgrammerZamanNow/belajar-typescript-restful-api/).\n\n## Installation\n- Copy .env.example to .env\n```bash\ncp .env.example .env\n```\n\n- Run the app with Docker\n```bash\ndocker compose up\n\n# or\n\ndocker-compose up\n\n# API Endpoint : http://127.0.0.1:3000 or set the port according to your .env\n# basePath is default to api/v1/\n```\n\n## Structure\n```\n.\n├── __test__/\n├── .github\n├── prisma/\n│   └── migrations\n├── src/\n│   ├── application/\n│   ├── controller/\n│   ├── error/\n│   ├── middleware/\n│   ├── model/\n│   ├── router/\n│   ├── service/\n│   ├── types/\n│   ├── validation/\n│   └── main.ts\n├── .env\n├── package.json\n├── babel.config.json\n├── tsconfig.json\n├── docker-compose.yml\n└── Dockerfile\n```\n\n## API\n#### api/v1/auth/register\n* `POST`: Registering an user\n\n#### api/v1/auth/login\n* `POST`: Getting a token from registered user\n\n#### api/v1/user/info\n* `GET`: Getting an user info (username, name, password)\n\n#### api/v1/user/update\n* `GET`: Updating user info (username, name, password)\n\n#### api/v1/contacts\n* `GET`: Getting all contacts with pagination and search parameter \n* `POST`: Creatin a contact\n\n#### api/v1/contacts/:contactId\n* `GET`: Getting a contact by id \n* `PUT`: Updating a contact specified by contact id\n* `DELETE`: Deleting a contact specified by id\n\n#### api/v1/contacts/:contactId/addresses\n* `GET`: Getting all address within specified contact\n* `POST`: Creatin an address for specified contact\n\n#### api/v1/contacts/:contactId/addresses/:addressId\n* `PUT`: Updating an address specified by address id\n* `DELETE`: Deleting an address specified by address id","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn9mi%2Fcontact-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn9mi%2Fcontact-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn9mi%2Fcontact-api/lists"}