{"id":21952033,"url":"https://github.com/systangotechnologies/koach-sql","last_synced_at":"2025-08-06T10:18:44.865Z","repository":{"id":29720765,"uuid":"122587946","full_name":"SystangoTechnologies/koach-sql","owner":"SystangoTechnologies","description":"A fork of the original KOACH with support for SQL database.","archived":false,"fork":false,"pushed_at":"2022-12-30T17:53:00.000Z","size":1927,"stargazers_count":14,"open_issues_count":13,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-23T04:04:54.558Z","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/SystangoTechnologies.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}},"created_at":"2018-02-23T07:31:34.000Z","updated_at":"2021-02-05T12:08:41.000Z","dependencies_parsed_at":"2023-01-14T15:31:42.305Z","dependency_job_id":null,"html_url":"https://github.com/SystangoTechnologies/koach-sql","commit_stats":null,"previous_names":[],"tags_count":3,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SystangoTechnologies%2Fkoach-sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SystangoTechnologies%2Fkoach-sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SystangoTechnologies%2Fkoach-sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SystangoTechnologies%2Fkoach-sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SystangoTechnologies","download_url":"https://codeload.github.com/SystangoTechnologies/koach-sql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250366726,"owners_count":21418771,"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":"2024-11-29T06:19:16.693Z","updated_at":"2025-04-23T04:05:00.106Z","avatar_url":"https://github.com/SystangoTechnologies.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![KOACH](https://github.com/SystangoTechnologies/Koach/blob/master/static/koach.png)\n\n## KOACH\nProduction ready boilerplate for building APIs with [koa2](https://github.com/koajs/koa/), sequelize and http/2 as the communication protocol.\n\n## Description\nThis project covers basic necessities of most APIs.\n* Authentication (passport \u0026 jwt)\n* Database (SQL)\n* Testing (mocha)\n* http/2 support for websites and apis\n* Doc generation with apidoc\n* linting using standard\n* Contains two versions of API\n\nPlease note, if you are planning to use this boilerplate for creating a web application then the 'https' protocol should be used to access its pages.\n\nVisit `https://localhost:3000/` to access the root page.\n\n## Requirements\n* node = v10.15.3\n* SQL Database\n\n## Installation\n```bash\ngit clone https://github.com/SystangoTechnologies/Koach-SQL.git\n```\n\n## Features\n* [koa2](https://github.com/koajs/koa)\n* [koa-router](https://github.com/alexmingoia/koa-router)\n* [koa-bodyparser](https://github.com/koajs/bodyparser)\n* [koa-generic-session](https://github.com/koajs/generic-session)\n* [koa-logger](https://github.com/koajs/logger)\n* [koa-helmet](https://github.com/venables/koa-helmet)\n* [koa-convert](https://github.com/koajs/convert)\n* [Sequelize](https://github.com/sequelize/sequelize)\n* [http/2](https://github.com/molnarg/node-http2)\n* [Passport](http://passportjs.org/)\n* [Nodemon](http://nodemon.io/)\n* [Mocha](https://mochajs.org/)\n* [apidoc](http://apidocjs.com/)\n* [Babel](https://github.com/babel/babel)\n* [ESLint](http://eslint.org/)\n* [PM2](https://github.com/Unitech/pm2/)\n* [Swagger](https://github.com/SystangoTechnologies/swagger-generator-koa/blob/master/README.md)\n\n## Structure\n```\n├── bin\n│   └── server.js                   # Bootstrapping and entry point\n├── cert\n│   ├── server.cert                 # SSL certificate\n│   └── server.key                  # SSL certificate key\n├── config                          # Server configuration settings\n│   ├── env                         # Environment specific config\n│   │   ├── common.js\n│   │   ├── development.js\n│   │   ├── production.js\n│   │   └── test.js\n│   ├── index.js                    # Config entrypoint\n│   └── passport.js                 # Passportjs config of strategies\n├── src                             # Source code\n│   ├── modules                     # Module-specific controllers\n│   │    ├── common                 # Contains common modules\n│   │    │   ├─── home              \n│   │    │   └─ index.js\n│   │    ├── v1                     # Version 1 of APIs\n│   │    │   ├─ Auth\n│   │    │   ├─ User   \n│   │    │   └─ index.js            \n│   │    └─── v2                    # Version 2 of APIs\n│   │         ├─ Auth\n│   │         ├─ User   \n│   │         └─ index.js\n│   ├── models                      # Sequelize models\n│   │   ├── index.js                # Creates connection from database and load model\n│   │   └── user.js                 # User model\n    ├── requestModel\n|   |   ├── v1\n|   |   |  ├── auth.js\n|   |   |  └── users.js\n|   |   └── v2\n|   |       ├── auth.js\n|   |       └── users.js\n|   ├── responseModel\n|   |   ├── v1\n|   |   |  ├── auth.js\n|   |   |  └── users.js\n|   |   └── v2\n|   |       ├── auth.js\n|   |       └── users.js\n│   └── middleware                  # Custom middleware\n│       └── validators              # Validation middleware\n└── test                            # Unit tests\n└── pm2.config.js                   # PM2 configuration file\n└── Dockerfile                      # Docker file\n└── docker-compose.yml              # Docker Compose file\n\n```\n\n## Usage\n* `npm start` Start server on development mode with Nodemon\n* `npm run prod` Start server on production mode with PM2\n* `npm run docs` Generate API documentation\n* `npm test` Run mocha tests\n\n## Running the server in Docker Container\n\nPrerequisite For Docker Configuration : Docker and docker compose must be installed on the system.\n\nSteps to run app in docker container :\n  1. CD to project dir\n  2. Create build using cmd: $ docker-compose build\n  3. Start the server in daemon thread using cmd: $ docker-compose up -d  \n  4. Stop the server using cmd : $ docker-compose down\n\n## Database\n##### And one of the following databases with Sequelize:\n* npm install --save pg pg-hstore\n* npm install --save mysql2\n* npm install --save sqlite3\n* npm install --save tedious\n\n## Environment Variables\n* NODE_ENV\n* PORT\n* SESSION\n* TOKEN\n* DATABASE\n* DB_USERNAME\n* DB_PASSWORD\n* DB_HOST\n* DB_DBPORT\n* DB_DIALECT\n\n## Documentation\nAPI documentation is written inline and generated by [apidoc](http://apidocjs.com/).\n\nVisit [https://localhost:3000/docs/](https://localhost:3000/docs/) to view docs\n\nTo view swagger API documentation\n\nVisit [https://localhost:3000/swagger](https://localhost:3000/swagger) to view Swagger UI.\n\n## Performance Comparison\nThe environment for the test caes are following-\n* Node Version: **8.9.4**\n* Number of Users: **1500**\n* Ramp-up Period: **300 seconds**\n* Loop Count: **100**\n\n![Average](https://raw.githubusercontent.com/SystangoTechnologies/Koach/master/static/Average.png)\n![Throughput](https://github.com/SystangoTechnologies/Koach/raw/master/static/Throughput.png)\n\n## Contributors\n[Arpit Khandelwal](https://github.com/arpit-systango)\n[Anurag Vikram Singh](https://www.linkedin.com/in/anuragvikramsingh/)\n[Vikas Patidar](https://www.linkedin.com/in/vikas-patidar-0106/)\n\n## License\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystangotechnologies%2Fkoach-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystangotechnologies%2Fkoach-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystangotechnologies%2Fkoach-sql/lists"}