{"id":22547630,"url":"https://github.com/firmanjs/auth-service","last_synced_at":"2025-10-30T03:59:43.799Z","repository":{"id":116872863,"uuid":"369078839","full_name":"firmanJS/auth-service","owner":"firmanJS","description":null,"archived":false,"fork":false,"pushed_at":"2021-05-20T04:28:57.000Z","size":322,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-30T08:47:41.413Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/firmanJS.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}},"created_at":"2021-05-20T04:28:56.000Z","updated_at":"2025-02-23T05:38:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6acdf52-471f-4aec-90dc-09acb5b8a1e1","html_url":"https://github.com/firmanJS/auth-service","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"firmanJS/express-template","purl":"pkg:github/firmanJS/auth-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firmanJS%2Fauth-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firmanJS%2Fauth-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firmanJS%2Fauth-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firmanJS%2Fauth-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firmanJS","download_url":"https://codeload.github.com/firmanJS/auth-service/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firmanJS%2Fauth-service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281742377,"owners_count":26553656,"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","status":"online","status_checked_at":"2025-10-30T02:00:06.501Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-12-07T15:12:29.288Z","updated_at":"2025-10-30T03:59:43.754Z","avatar_url":"https://github.com/firmanJS.png","language":"JavaScript","readme":"# Express  Template Boillerplate RestfullApi\r\n[![Maintainability](https://api.codeclimate.com/v1/badges/0dc437426c4b1f867461/maintainability)](https://codeclimate.com/github/firmanJS/express-template/maintainability)\r\n[![Test Coverage](https://api.codeclimate.com/v1/badges/0dc437426c4b1f867461/test_coverage)](https://codeclimate.com/github/firmanJS/express-template/test_coverage)\r\n[![Node.js CI](https://github.com/firmanJS/express-template/actions/workflows/node.js.yml/badge.svg)](https://github.com/firmanJS/express-template/actions/workflows/node.js.yml)\r\n[![made-with-nodejs](https://img.shields.io/badge/Made%20with-Nodejs-1f425f.svg)](https://nodejs.org)\r\n[![made-with-expressjs](https://img.shields.io/badge/Made%20with-Expressjs-1f425f.svg)](https://expressjs.com/)\r\n[![Ask Me Anything !](https://img.shields.io/badge/Ask%20me-anything-1abc9c.svg)](https://github.com/firmanJS)\r\n[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/firmanJS/express-template/blob/master/LICENSE)\r\n[![GitHub release](https://img.shields.io/github/release/firmanjs/express-template.svg)](https://github.com/firmanJS/express-template/releases)\r\n[![Github all releases](https://img.shields.io/github/downloads/firmanjs/express-template/total.svg)](https://github.com/firmanJS/express-template/releases)\r\n[![GitHub issues](https://img.shields.io/github/issues/firmanjs/express-template.svg)](https://github.com/firmanJS/express-template/issues/)\r\n[![GitHub pull-requests](https://img.shields.io/github/issues-pr/firmanjs/express-template.svg)](https://github.com/firmanJS/express-template/pulls/)\r\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\r\n\r\n## Core Stack\r\n- **Node.js** - [http://nodejs.org/](http://nodejs.org/)\r\n- **Express** - [http://expressjs.com/](http://expressjs.com/)\r\n- **nodemon** - [https://www.npmjs.com/package/nodemon](https://www.npmjs.com/package/nodemon)\r\n- **pm2** - [https://www.npmjs.com/package/pm2](https://www.npmjs.com/package/pm2)\r\n\r\n## Feature\r\n1. error handling\r\n1. database structure folder\r\n1. testing with jest\r\n1. coverage use jest\r\n1. with docker example\r\n1. validiation, use express-valdator and joi\r\n1. pagination example\r\n1. custom message api response\r\n1. eslint airbnb base\r\n\r\n## Unit testing\r\n- **jestjs** - [https://jestjs.io/](https://jestjs.io/)\r\n\r\n## How To run\r\n\r\n### copy environment variable\r\n\r\n```sh\r\ncp .env-sample .env\r\n```\r\n\r\n### run manualy\r\n\r\n* via yarn or npm :\r\n\r\n```sh\r\n# install package\r\nnpm install or yarn install\r\n\r\n#  running app\r\nnpm run dev or yarn dev\r\n\r\n# running unit tetsing\r\nnpm run test or yarn test\r\n```\r\n\r\n* via make :\r\n\r\n```sh\r\n# start aplication with docker\r\nmake docker-start \r\n\r\n# stop docker container\r\nmake docker-stop \r\n\r\n# remove docker container\r\nmake docker-down \r\n```\r\n\r\n### fill in the copied environment earlier\r\n\r\n```sh\r\nAPP_PORT=2000\r\nTZ=Asia/Jakarta\r\nMONGO_SERVICE=# uri mongodb\r\nAUTH_SOURCE= #auth service\r\nSECRET_KEY= #jwt secret key here\r\n\r\n#Mongodb config\r\nMONGO_PORT=27017\r\nMONGO_INITDB_ROOT_USERNAME= #username\r\nMONGO_INITDB_ROOT_PASSWORD= #password\r\nMONGO_INITDB_DATABASE= #db name\r\n```\r\n\r\n### run with docker-compose\r\n\r\n```sh\r\ndocker-compose up --build\r\n```\r\n\r\n### or run with background process\r\n\r\n```sh\r\ndocker-compose up --build -d\r\n```\r\n### execution npm with container docker\r\n```sh\r\n# install package\r\ndocker-compose exec boillerplate npm install\r\n\r\n# running unit testing\r\ndocker-compose exec boillerplate npm run test\r\n```\r\n\r\n## Documentation API \r\nusing swagger check in folder static\r\n\r\n## Project Structure\r\n```\r\n.\r\n├── api/              * all api file here\r\n├── config/           * all configuration file here\r\n|   └── db.js         * configuration database\r\n├── database/         * all models schema file here\r\n|   └── models        * all models file\r\n|   └── migrations    * all migrations file\r\n|   └── seeders       * all seeders file\r\n├── helpers/          * all helper or middleware file here\r\n├── middleware/       * all middleware file here, for check before next to api\r\n├── routes/           * all file route here\r\n|   └── index.js      * register all route\r\n├── static/           * all configuration swagger\r\n|   └── path          * custom your path api\r\n|   └── schema        * custom schema body\r\n├── test/             * all test file here\r\n|   └── index.js      * test apps\r\n├── utils/            * all utils file here\r\n\r\n```\r\n\r\n## Code Style Guides\r\n* Guideline:\r\n  * Use camelCase for variable name, naming function, load module or other functions\r\n  * Use UpperCase for Constant Variable\r\n  * Use PascalCase for class name, models, api, route, load module model\r\n  * Use snake_case for file name as variable\r\n  * Function name use Verb\r\n  * Variable name use Noun\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirmanjs%2Fauth-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirmanjs%2Fauth-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirmanjs%2Fauth-service/lists"}