{"id":14957619,"url":"https://github.com/kazi-naimul/node-express-mysql-boilerplate","last_synced_at":"2025-10-30T10:40:33.239Z","repository":{"id":52282258,"uuid":"482332378","full_name":"kazi-naimul/node-express-mysql-boilerplate","owner":"kazi-naimul","description":"A boilerplate for any enterprise rest api or service with Node.js, Express and Sequelize ORM for mysql, postgresql or others.","archived":false,"fork":false,"pushed_at":"2023-12-24T07:50:14.000Z","size":25,"stargazers_count":74,"open_issues_count":0,"forks_count":22,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-02T07:51:07.244Z","etag":null,"topics":["boilerplate-template","express-js","nodejs","orm","rest-api","sequelize"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/kazi-naimul.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":"2022-04-16T18:33:34.000Z","updated_at":"2025-03-18T10:41:59.000Z","dependencies_parsed_at":"2023-12-24T07:20:23.689Z","dependency_job_id":"1798e7b1-be54-4256-a110-5d4cd8f6d6a1","html_url":"https://github.com/kazi-naimul/node-express-mysql-boilerplate","commit_stats":null,"previous_names":["kazi-naimul/node-express-mysql-boilerplate"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/kazi-naimul/node-express-mysql-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazi-naimul%2Fnode-express-mysql-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazi-naimul%2Fnode-express-mysql-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazi-naimul%2Fnode-express-mysql-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazi-naimul%2Fnode-express-mysql-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kazi-naimul","download_url":"https://codeload.github.com/kazi-naimul/node-express-mysql-boilerplate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazi-naimul%2Fnode-express-mysql-boilerplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281793559,"owners_count":26562612,"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":["boilerplate-template","express-js","nodejs","orm","rest-api","sequelize"],"created_at":"2024-09-24T13:15:14.936Z","updated_at":"2025-10-30T10:40:33.202Z","avatar_url":"https://github.com/kazi-naimul.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Boilerplate for Node-Express with sequelize ORM\n\nA boilerplate for any enterprise rest api or service with Node.js, Express and Sequelize ORM for mysql, postgresql or others.\n\nBy running this project you will get a production ready environment with all necessary supports for validation, unit testing, socket, redis and many more.\n\n## Manual Installation\n\nClone the repo:\n\n```bash\ngit clone https://github.com/kazi-naimul/node-express-mysql-boilerplate\ncd node-express-mysql-boilerplate\n```\n\nInstall the dependencies:\n\n```bash\nyarn install\n```\n\nSet the environment variables:\n\n```bash\ncp .env.example .env\n\n# open .env and modify the environment variables (if needed)\n```\n\n\n## Features\n\n- **ORM**: [Sequelize](https://sequelize.org/)  orm for object data modeling\n- **Migration and Seed**: DB migration and Seed using [Sequelize-CLI](https://github.com/sequelize/cli) \n- **Authentication and authorization**: using [passport](http://www.passportjs.org)\n- **Error handling**: centralized error handling\n- **Validation**: request data validation using [Joi](https://github.com/hapijs/joi)\n- **Logging**: using [winston](https://github.com/winstonjs/winston) \n- **Testing**: unittests using [Mocha](https://mochajs.org/)\n- **Caching**: Caching using [Redis](https://redis.io/)\n- **Bidirectional Communication**: using [Scoket](https://socket.io/)\n- **Job scheduler**: with [Node-cron](https://www.npmjs.com/package/node-cron)\n- **Dependency management**: with [Yarn](https://yarnpkg.com)\n- **Environment variables**: using [dotenv](https://github.com/motdotla/dotenv) and [cross-env](https://github.com/kentcdodds/cross-env#readme)\n- **CORS**: Cross-Origin Resource-Sharing enabled using [cors](https://github.com/expressjs/cors)\n- **Docker support**\n- **Linting**: with [ESLint](https://eslint.org) and [Prettier](https://prettier.io)\n\n## Commands\n\nRunning locally:\n\n```bash\nyarn dev\n```\n\nRunning in production:\n\n```bash\nyarn start\n```\n\nTesting:\n\n```bash\n# run all tests\nyarn test\n\n```\n\n## Environment Variables\n\nThe environment variables can be found and modified in the `.env` file. They come with these default values:\n\n```bash\n#Server environment\nNODE_ENV=development\n#Port number\nPORT=5000\n\n#Db configuration\nDB_HOST=db-host\nDB_USER=db-user\nDB_PASS=db-pass\nDB_NAME=db-name\n\n\n# JWT secret key\nJWT_SECRET=your-jwt-secret-key\n# Number of minutes after which an access token expires\nJWT_ACCESS_EXPIRATION_MINUTES=5\n# Number of days after which a refresh token expires\nJWT_REFRESH_EXPIRATION_DAYS=30\n\n#Log config\nLOG_FOLDER=logs/\nLOG_FILE=%DATE%-app-log.log\nLOG_LEVEL=error\n\n#Redis\nREDIS_HOST=redis-host\nREDIS_PORT=6379\nREDIS_USE_PASSWORD=no\nREDIS_PASSWORD=your-password\n\n```\n\n## Project Structure\n\n```\nspecs\\\nsrc\\\n |--config\\         # Environment variables and configuration related things\n |--controllers\\    # Route controllers (controller layer)\n |--dao\\            # Data Access Object for models\n |--db\\             # Migrations and Seed files\n |--models\\         # Sequelize models (data layer)\n |--routes\\         # Routes\n |--services\\       # Business logic (service layer)\n |--helper\\         # Helper classes and functions\n |--validations\\    # Request data validation schemas\n |--app.js          # Express app\n |--cronJobs.js     # Job Scheduler\n |--index.js        # App entry point\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazi-naimul%2Fnode-express-mysql-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkazi-naimul%2Fnode-express-mysql-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazi-naimul%2Fnode-express-mysql-boilerplate/lists"}