{"id":19002652,"url":"https://github.com/kumarshivesh/toy-directory-app","last_synced_at":"2026-04-13T06:03:12.467Z","repository":{"id":251394409,"uuid":"837245723","full_name":"kumarshivesh/toy-directory-app","owner":"kumarshivesh","description":"This is backend of a toy directory app.","archived":false,"fork":false,"pushed_at":"2024-08-02T16:09:45.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-21T13:43:48.140Z","etag":null,"topics":["expressjs","nodejs","prisma","sqlite","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/kumarshivesh.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-08-02T14:19:36.000Z","updated_at":"2024-08-06T08:47:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"421aaa7c-b345-4f8e-8c74-01faec1b0ae7","html_url":"https://github.com/kumarshivesh/toy-directory-app","commit_stats":null,"previous_names":["kumarshivesh/toy-directory-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kumarshivesh/toy-directory-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kumarshivesh%2Ftoy-directory-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kumarshivesh%2Ftoy-directory-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kumarshivesh%2Ftoy-directory-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kumarshivesh%2Ftoy-directory-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kumarshivesh","download_url":"https://codeload.github.com/kumarshivesh/toy-directory-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kumarshivesh%2Ftoy-directory-app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265802039,"owners_count":23830507,"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":["expressjs","nodejs","prisma","sqlite","typescript"],"created_at":"2024-11-08T18:15:31.634Z","updated_at":"2026-04-13T06:03:12.406Z","avatar_url":"https://github.com/kumarshivesh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Toy Directory App\n\nThis is a RESTful API using Node.js for a toy directory app.\n\n## Prerequisites\n\n- Node.js \n\n## Getting Started\n\nFollow these steps to clone and run the application locally.\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/kumarshivesh/toy-directory-app.git\ncd toy-directory-app\n```\n\n### 2. Install Dependencies\n\n```bash\nnpm install\n```\n\n### 3. Set up Prisma:\n\n```bash\nnpx prisma migrate dev --name init\nnpx prisma generate\n```\n\n### 4. Start the server:\n\n```bash\nnpx ts-node src/index.ts\n```\n\n## API Endpoints\n\nHere are the next steps you can take to test your API and ensure everything is working correctly:\n\n\n### 1. Register a New User\n\n1. Open Postman and create a new request.\n2. Select the Method: Choose `POST` from the dropdown menu.\n3. Enter the URL: Paste http://localhost:3000/register into the URL field. \n4. Select `Body` as `raw (JSON)`. Paste the follwing in the `Body`:\n```\n{\n  \"email\": \"xyz@example.com\",\n  \"password\": \"password123\"\n}\n```\n5. Send the Request: Click the \"Send\" button.\n\n### 2. Login\n\n1. Open Postman and create a new request.\n2. Select the Method: Choose `POST` from the dropdown menu.\n3. Enter the URL: Paste http://localhost:3000/login into the URL field. \n4. Select `Body` as `raw (JSON)`. Paste the follwing in the `Body`:\n```\n{\n  \"email\": \"xyz@example.com\",\n  \"password\": \"password123\"\n}\n```\n5. Send the Request: Click the \"Send\" button.\n6. Copy the token from the response, as you will need it for the next requests.\n\n### 3. Add a New Toy\n\n1. Open Postman and create a new request.\n2. Select the Method: Choose `POST` from the dropdown menu.\n3. Enter the URL: Paste http://localhost:3000/toys into the URL field.\n4. Go to the Headers tab and add a new header:\n   Key: Authorization\n   Value: Bearer \u003cyour_jwt_token\u003e (replace \u003cyour_jwt_token\u003e with the actual token you copied from the login response).\n5. Select `Body` as `raw (JSON)`. Paste the follwing in the `Body`:\n```\n{\n  \"name\": \"Barbie Doll\",\n  \"description\": \"A soft and cuddly barbie doll\",\n  \"price\": 19.99\n}\n```\n6. Send the Request: Click the \"Send\" button.\n\n\n### 4. Get Toy Information\n\n1. Open Postman and create a new request.\n2. Select the Method: Choose `GET` from the dropdown menu.\n3. Enter the URL: Paste http://localhost:3000/toys/Barbie%20Doll into the URL field.\n4. Select `Body` as `raw (JSON)`. Paste the follwing in the `Body`:\n5. Send the Request: Click the \"Send\" button.\n\n\n### 5. Modify Toy Information\n\n1. Open Postman and create a new request.\n2. Select the Method: Choose `PUT` from the dropdown menu.\n3. Enter the URL: Paste http://localhost:3000/toys/3 into the URL field (assuming the toy ID is 3). \n4. Go to the Headers tab and add a new header:\n   Key: Authorization\n   Value: Bearer \u003cyour_jwt_token\u003e (replace \u003cyour_jwt_token\u003e with the actual token you copied from the login response).\n5. Select `Body` as `raw (JSON)`. Paste the follwing in the `Body`:\n```\n{\n  \"name\": \"Updated Barbie Doll\",\n  \"description\": \"Updated a soft and cuddly barbie doll\",\n  \"price\": 29.99\n}\n```\n6. Send the Request: Click the \"Send\" button.\n\n### 6. Delete a Toy\n\n1. Open Postman and create a new request.\n2. Select the Method: Choose `DELETE` from the dropdown menu.\n3. Enter the URL: Paste http://localhost:3000/toys/3 into the URL field (assuming the toy ID is 3). \n4. Go to the Headers tab and add a new header:\n   Key: Authorization\n   Value: Bearer \u003cyour_jwt_token\u003e (replace \u003cyour_jwt_token\u003e with the actual token you copied from the login response).\n5. Send the Request: Click the \"Send\" button.\n\n## License\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Acknowledgements\n[Node.js](https://nodejs.org/en)\n[express.js](https://expressjs.com/)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkumarshivesh%2Ftoy-directory-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkumarshivesh%2Ftoy-directory-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkumarshivesh%2Ftoy-directory-app/lists"}