{"id":19723987,"url":"https://github.com/vs4vijay/narvi","last_synced_at":"2026-02-23T12:56:28.803Z","repository":{"id":37021164,"uuid":"294991108","full_name":"vs4vijay/NARVI","owner":"vs4vijay","description":"A Microservice in NodeJS, Express and MongoDB ","archived":false,"fork":false,"pushed_at":"2026-02-02T19:02:42.000Z","size":1572,"stargazers_count":2,"open_issues_count":92,"forks_count":0,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2026-02-03T09:14:50.582Z","etag":null,"topics":["api","crud","crud-application","docker","docker-compose","kubernetes","microservice","mongodb","nodejs","restful","restful-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vs4vijay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-09-12T17:17:56.000Z","updated_at":"2026-01-06T18:47:37.000Z","dependencies_parsed_at":"2023-10-01T16:58:22.886Z","dependency_job_id":"65dadb0f-83e0-4868-86da-ebf3db38a4f4","html_url":"https://github.com/vs4vijay/NARVI","commit_stats":{"total_commits":23,"total_committers":3,"mean_commits":7.666666666666667,"dds":"0.21739130434782605","last_synced_commit":"4f1941dd51b8cb49b28136bfe1f9edb835a36505"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vs4vijay/NARVI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vs4vijay%2FNARVI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vs4vijay%2FNARVI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vs4vijay%2FNARVI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vs4vijay%2FNARVI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vs4vijay","download_url":"https://codeload.github.com/vs4vijay/NARVI/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vs4vijay%2FNARVI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29743662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"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":["api","crud","crud-application","docker","docker-compose","kubernetes","microservice","mongodb","nodejs","restful","restful-api"],"created_at":"2024-11-11T23:24:08.462Z","updated_at":"2026-02-23T12:56:28.786Z","avatar_url":"https://github.com/vs4vijay.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nodejs-mongodb-microservice\n\n## Data Model\n\n- User:\n  - name (required)\n  - email (required)\n  - phone\n\n---\n\n## Pre-requisites\n\n- NodeJS\n- MongoDB\n\n## Installation\n\n```shell\n# Using npm\nnpm install\n\n# Using yarn\nyarn add\n```\n\n---\n\n## Running\n\n- Make sure to create `.env` file from `.env.example` and fill values accordingly\n\n### Run without Docker\n\n```shell\n# For Local Development\nnpm run dev\n\n# On Production, Use pm2 or docker container\npm2 start src/app.js\n\n# OR\nnode src/app.js\n```\n\n### Run using Docker\n\n```shell\n# Build Image\ndocker build -t nodejs-microservice .\n\n# Run Container\ndocker run -it -p 9000:9000 --env-file .env nodejs-microservice\n```\n\n### Run using Docker Compose\n\n```shell\n# Using Docker Compose\ndocker-compose up\n\n# Stop Docker Compose\ndocker-compose down\n```\n\n### Run on Kubernetes\n\n- Make sure kubernetes cluster is setup already (use Minikube, Kind, k3s, or MicroK8S)\n- This deploys the node application only, DB should be hosted somewhere else. Update the env variables from file (`./kubernetes/deploy-node-app.yml`)\n- Using Minikube: Run following\n  - `$(minikube docker-env)`\n  - `minikube start --insecure-registry`\n  - `docker build -t nodejs-microservice .`\n\n```shell\n# Deploy to Kubernetes Cluster\nkubectl apply -f ./kubernetes/deploy-node-app.yml\n\n# Remove from Kubernetes Cluster\nkubectl delete -f ./kubernetes/deploy-node-app.yml\n```\n\n---\n\n## APIs\n\n| Method | Endpoint | Description |\n| --- | --- | --- |\n| GET | /api/v1/healthz | Health Check |\n| GET | /api/v1/users | Get All Users |\n| POST | /api/v1/users | Create a User |\n| GET | /api/v1/users/\\\u003cid\\\u003e | Get User By Id |\n| PUT | /api/v1/users/\\\u003cid\\\u003e | Update a User |\n| DELETE | /api/v1/users/\\\u003cid\\\u003e | Delete a User |\n\n---\n\n## PR Gate Process\n\nTo ensure the quality and integrity of the codebase, all pull requests must pass through a PR gate before being merged. This process involves automated checks that are run via GitHub Actions as defined in the `.github/workflows/pr-gate.yml` file.\n\n### Running Tests Locally\n\nBefore submitting a pull request, you can run tests locally to ensure your changes pass all checks:\n\n```shell\nnpm test\n```\n\nThis command will run all unit tests in the project, ensuring that your changes do not break any existing functionality.\n\n### GitHub Actions Workflow\n\nThe GitHub Actions workflow for the PR gate includes steps for linting with ESLint, running unit tests, and building the Docker image. This workflow is triggered automatically upon the creation of a pull request to the main branch. A pull request can only be merged once all checks have passed successfully.\n\n---\n\n## Features\n\n- Follows RESTful API Patterns\n- Used ES6\n- Modular Structure\n- Graceful Shutdown\n\n## Enhancement Scope\n\n- Can create OpenAPI Specs (or Swagger API Specs)\n- Can use Dependency Injection / IoC\n- API result can be paginated\n- Can use TypeScript\n- Handle CORS Headers\n- Add Security Headers\n\n---\n\n### Screenshots\n\n- Docker Compose Output\n\n![Docker Compose](./screenshots/docker-compose.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvs4vijay%2Fnarvi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvs4vijay%2Fnarvi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvs4vijay%2Fnarvi/lists"}