{"id":26710754,"url":"https://github.com/mohnate/restful-api","last_synced_at":"2025-10-12T00:08:36.320Z","repository":{"id":247109702,"uuid":"825049332","full_name":"mohnate/RESTful-API","owner":"mohnate","description":"A RESTful API built with NodeJS, Express, TypeScript. Prisma and PostgreSQL are used as database. This API is developed with Test Driven Development approach.","archived":false,"fork":false,"pushed_at":"2024-08-07T23:04:37.000Z","size":255,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T09:42:36.104Z","etag":null,"topics":[],"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/mohnate.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-07-06T16:12:39.000Z","updated_at":"2024-12-08T14:58:31.000Z","dependencies_parsed_at":"2024-07-06T17:09:48.390Z","dependency_job_id":"47110765-c92f-4950-b8e5-aa59e9081c9b","html_url":"https://github.com/mohnate/RESTful-API","commit_stats":null,"previous_names":["andrewclarker0524/restful-api","mohnate/restful-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohnate%2FRESTful-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohnate%2FRESTful-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohnate%2FRESTful-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohnate%2FRESTful-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohnate","download_url":"https://codeload.github.com/mohnate/RESTful-API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248766004,"owners_count":21158296,"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":[],"created_at":"2025-03-27T09:35:08.098Z","updated_at":"2025-10-12T00:08:31.301Z","avatar_url":"https://github.com/mohnate.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Haru-Fashion API\n\nRESTful API for Haru-Fashion e-commerce web application. Developed with NodeJS, Express, TypeScript, Prisma and PostgreSQL.\n\n## Badges\n\n![ts](https://badgen.net/badge/Built%20With/TypeScript/blue)\n[![CircleCI](https://circleci.com/gh/satnaing/haru-api/tree/master.svg?style=shield)](https://circleci.com/gh/satnaing/haru-api/tree/master)\n[![Heroku](https://pyheroku-badge.herokuapp.com/?app=angularjs-crypto\u0026style=flat)](https://haru-fashion.herokuapp.com/)\n[![Jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)\n[![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n\n## Demo\n\n[🚀 API Demo](https://haru-fashion.herokuapp.com/api/v1/categories)  \n[📖 API Docs](https://satnaing.github.io/haru-api/)\n\n## Features\n\nHere are some of the project's features\n\n- CRUD Operations\n- Authentication\n- Authorization and RBAC\n- Forgot/Reset Password\n- Full-Text Search (for products)\n\n## Tech Stack\n\n**Backend:** Node, Express, TypeScript  \n**Database:** Prisma + PostgreSQL  \n**Testing:** Jest  \n**Containerization:** Docker  \n**CI/CD:** CircleCI\n\n## Running Locally\n\nClone the project\n\n```bash\ngit clone https://github.com/softking0503/haru-api.git\n```\n\nGo to the project directory\n\n```bash\ncd haru-api\n```\n\nRemove remote origin\n\n```bash\ngit remote remove origin\n```\n\nInstall dependencies\n\n```bash\nnpm install\n```\n\nAdd Environment Variables  \n_add the following environment variables to .env file. (some env var include example values)_\n\n\u003cdetails\u003e\n  \u003csummary\u003eClick to expand!\u003c/summary\u003e\n  \n  - `NODE_ENV`  \n  - `PORT`  \n  - `POSTGRES_USER=testuser`\n  - `POSTGRES_PASSWORD=test123`\n  - `POSTGRES_DB=haru`\n  - `JWT_SECRET`\n  - `SMTP_HOST`\n  - `SMTP_PORT`\n  - `SMTP_USER`\n  - `SMTP_PASS`\n  - `FROM_NAME`\n  - `FROM_MAIL`\n  - `DATABASE_URL=\"postgresql://testuser:test123@postgres:5432/haru?schema=public\"`\n\u003c/details\u003e\n\nMigrate and seed database\n\n```bash\nnpx prisma migrate dev --name init\n```\n\n```bash\nnpx prisma db seed\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eCan't reach database server Error ?\u003c/summary\u003e\n\n- _Change_ **@postgres** _to_ **@localhost** _in_ `DATABASE_URL` _inside .env **for a while**_\n\n```bash\nDATABASE_URL=\"postgresql://testuser:test123@postgres:5432/test_db?schema=public\"\n```\n\n\u003cp align=\"center\"\u003e⬇️\u003c/p\u003e\n\n```bash\nDATABASE_URL=\"postgresql://testuser:test123@localhost:5432/test_db?schema=public\"\n```\n\n\u003c/details\u003e\n\nStart the server\n\n```bash\nnpm run dev\n```\n\nStop the server\n\n```bash\nnpm run dev:down\n```\n\n## Running Tests\n\nTo run tests, create a file called **.env.test** at the root of the project.\nThen add the following environment variables.  \n`NODE_ENV=testing`  \n`DATABASE_URL=\"postgresql://prisma:prisma@localhost:5437/tests\"`\n\nNote! dotenv-cli must be installed golbally before running any test\n\n```bash\nsudo npm install -g dotenv-cli\n```\n\nRun the test\n\n```bash\nnpm run test\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eCan't reach database server Error ?\u003c/summary\u003e\n\n- Run the test again\n\n\u003c/details\u003e\n\nStop the test\n\n```bash\nnpm run test:down\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohnate%2Frestful-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohnate%2Frestful-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohnate%2Frestful-api/lists"}