{"id":21952023,"url":"https://github.com/systangotechnologies/koach-typescript","last_synced_at":"2025-07-01T18:02:35.062Z","repository":{"id":39765001,"uuid":"193502094","full_name":"SystangoTechnologies/koach-typescript","owner":"SystangoTechnologies","description":"Production ready Koa2 boilerplate written in Typescript . Uses http2 and sequelize .","archived":false,"fork":false,"pushed_at":"2023-03-05T13:46:25.000Z","size":4034,"stargazers_count":75,"open_issues_count":16,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-09T17:42:53.686Z","etag":null,"topics":["babel","boilerplate","crud-sample","http2","koa2","mvc-pattern","nodejs","production-ready","rest-api","sequelize","typescript"],"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/SystangoTechnologies.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":"2019-06-24T12:34:54.000Z","updated_at":"2025-01-12T17:49:24.000Z","dependencies_parsed_at":"2024-11-29T06:19:18.540Z","dependency_job_id":"3c41a77a-42cc-4a36-878b-b76032220605","html_url":"https://github.com/SystangoTechnologies/koach-typescript","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/SystangoTechnologies/koach-typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SystangoTechnologies%2Fkoach-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SystangoTechnologies%2Fkoach-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SystangoTechnologies%2Fkoach-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SystangoTechnologies%2Fkoach-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SystangoTechnologies","download_url":"https://codeload.github.com/SystangoTechnologies/koach-typescript/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SystangoTechnologies%2Fkoach-typescript/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263013701,"owners_count":23399812,"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":["babel","boilerplate","crud-sample","http2","koa2","mvc-pattern","nodejs","production-ready","rest-api","sequelize","typescript"],"created_at":"2024-11-29T06:19:11.888Z","updated_at":"2025-07-01T18:02:34.939Z","avatar_url":"https://github.com/SystangoTechnologies.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![KOACH](https://github.com/SystangoTechnologies/Koach/raw/master/static/koach.png)\n\n## KOACH-Typescript\nProduction ready boilerplate for building APIs in [Typescript(3.4)](https://www.typescriptlang.org/) with [koa2](https://github.com/koajs/koa/), and using SQL database and http/2 as the communication protocol.\n\n\n## Features\n* Object oriented\n* Typescript\n* Authentication (JWT)\n* http/2 support\n* Sequelize ORM\n* Doc generation with Swagger\n* TS linting\n* Dockerized Version\n\nPlease note, This boilerplate is for the API only application.\n\nVisit `https://localhost:3000/` to access the root page.\n\n## Requirements\n* Node v10.16.0\n* SQL Database (anyone MySQL, MariaDB, SQLite, PostgreSQL, MSSQL)\n* Docker\n\n## Environment Variables Configuration\nTo simulate environment variables\n#### Dev environment *(use anyone)*\n- src/resources/config/env.development.ts\n- .env file\n\n####  Production environment\n- /etc/environment file\n\nThe environment variables are as follows -\n```\nNODE_ENV=production                                 // Environment development/production\nSERVER_PORT=3000                                    // Server's Port\nSESSION=secret_key                                  // secret-boilerplate-token\nJWT_SECRET=token                                    // Jwt secret key\nDB_HOST=host                                        // DB Host address\nDB_PORT=3306                                        // DB Port number\nDB_DIALECT=db                                       // DB (mysql, PostgreSQL, MySQL, etc)\nDB_NAME=name                                        // DB name\nDB_USER=user                                        // DB user name\nDB_PASSWORD=password                                // DB password\n```\n\n## Installation\n```bash\ngit clone https://github.com/SystangoTechnologies/Koach-Typescript.git\n \n```\n\n## Modules Used\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* [http/2](https://github.com/molnarg/node-http2)\n* [Swagger](https://github.com/swagger-api/)\n* [grunt](https://github.com/gruntjs/grunt)\n* [typescript](https://github.com/Microsoft/TypeScript)\n* [dotenv](https://github.com/motdotla/dotenv)\n* [winston](https://github.com/winstonjs/winston)\n* [sequelize](https://github.com/sequelize/sequelize)\n* [sequelize-cli-typescript](https://github.com/douglas-treadwell/sequelize-cli-typescript)\n## Structure\n```\n│   .gitignore                                      // Standard git ignore file\n|   .env                                            // dotenv configuration file for environment variable\n│   docker-compose.yml                              // Standard docker compose file\n│   Dockerfile                                      // Standard docker file\n│   gruntfile.js                                    // Standard  gruntfile.js file\n│   package.json                                    // Standard package.json file\n│   README.md\n│   tslint.json                                     // Standard tslint.json file\n│\n├───log                                             // logs directory\n└───src                                             // source code\n    │   .sequelizerc                                // Standarded sequlize config file\n    │\n    ├───app\n    │   ├───constant                                // constants\n    │   │       httpConstants.ts                    // http status code constant file\n    │   │\n    │   ├───controller                              // controller\n    │   │       BookController.ts\n    │   │\n    │   ├───core\n    │   │   │   RouterGenerator.ts                  // Generating all routes\n    │   │   │   RouterManager.ts                    // Route depedency\n    │   │   │\n    │   │   └───middleware                          // middlewares\n    │   │           ErrorMiddleware.ts \n    │   │           RequestValidator.ts             // request body validator\n    │   │\n    │   ├───db\n    │   │   │   config.json\n    │   │   │   DatabaseConfigurationManager.ts\n    │   │   │\n    │   │   ├───entity                              // entities\n    │   │   |   ├───library\n    │   │   |   │       book.ts                     // book entity\n    │   │   |   │       index.ts\n    │   │   |   │\n    │   │   |   └───migrations                      // Migrations\n    │   │   |       │   20190703135002-create-book.ts\n    │   │   |       │\n    │   │   |       └───compiled                    // compiled migrations\n    │   │   |               20190703135002-create-book.js       \n    │   │   |\n    │   │   |\n    │   │   └───repository                          // repository\n    │   │          Book.ts        \n    │   │   \n    │   ├───model\n    │   │       Book.ts                             // book model\n    │   │ \n    │   ├───routes                                  // router\n    │   │       BookRouter.ts\n    │   │       index.ts\n    │   │\n    │   ├───service                                 // Service file for database\n    │   │       BookService.ts\n    │   │\n    │   └───validation                              // validations\n    │           BookValidator.ts\n    │\n    ├───logger                                      // logger file.\n    │      index.ts\n    │      LogManager.ts\n    │\n    ├───resources                                   // resources\n    │   ├───config                                  //  configuration setting\n    │   │       ConfigurationManager.ts\n    │   │       env.common.ts\n    │   │       env.development.ts\n    │   │       index.ts\n    │   │\n    │\t├───cert                                    // SSL certificates\n    │\t│      localhost.crt\n    │\t│      localhost.key\n    │\t│       \n    │   └───swagger                                 // Swagger\n    │\n    └───server                                      // server\n           server.ts\n```\n\n\n## Usage\n* `npm run build` compile the typescripts in src folder\n* `npm start` Starts the server on development mode in Typescript\n* `npm run dev` Starts the server on development mode in Javascript\n* `npm run grunt` Starts server using grunt file\n* `docker-compose up -d` Starts the server for production \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 the app in a 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## Documentation\nThe API documentation is written in Swagger (https://github.com/swagger-api/swagger-node#readme).\n\nTo view swagger API documentation\n\nVisit [https://localhost:3000/swagger](https://localhost:3000/swagger) to view Swagger UI.\n\n## Contributors\n\n[Sparsh Pipley](https://www.linkedin.com/in/sparsh-pipley-6ab0b1a4/)\n\n[Anurag Vikram Singh](https://www.linkedin.com/in/anuragvikramsingh/)\n\n[Abhishek Parmar](https://www.linkedin.com/in/abhishek-parmar-19a875122/)\n\n[Ayush Sharma](https://www.linkedin.com/in/ayush-sharma-40a520149)\n\n## License\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystangotechnologies%2Fkoach-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystangotechnologies%2Fkoach-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystangotechnologies%2Fkoach-typescript/lists"}