{"id":19297380,"url":"https://github.com/shimisnow/poc-nestjs-serverless","last_synced_at":"2026-05-03T17:31:22.266Z","repository":{"id":261632276,"uuid":"882304848","full_name":"shimisnow/poc-nestjs-serverless","owner":"shimisnow","description":"This monorepo contains a set of REST APIs microservices built with NestJS, deployed using the Serverless Framework","archived":false,"fork":false,"pushed_at":"2024-11-09T13:48:23.000Z","size":867,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T01:11:39.494Z","etag":null,"topics":["api-gateway","aws-lambda","nestjs","serverless-framwork","terraform","webpack"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":false,"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/shimisnow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2024-11-02T13:17:26.000Z","updated_at":"2024-11-09T13:48:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"031d06ca-889b-4a0e-b54e-44fab76d6c47","html_url":"https://github.com/shimisnow/poc-nestjs-serverless","commit_stats":null,"previous_names":["shimisnow/poc-nestjs-serverless"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shimisnow/poc-nestjs-serverless","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimisnow%2Fpoc-nestjs-serverless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimisnow%2Fpoc-nestjs-serverless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimisnow%2Fpoc-nestjs-serverless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimisnow%2Fpoc-nestjs-serverless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shimisnow","download_url":"https://codeload.github.com/shimisnow/poc-nestjs-serverless/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimisnow%2Fpoc-nestjs-serverless/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32578577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"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-gateway","aws-lambda","nestjs","serverless-framwork","terraform","webpack"],"created_at":"2024-11-09T23:04:19.907Z","updated_at":"2026-05-03T17:31:22.261Z","avatar_url":"https://github.com/shimisnow.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](docs/markdown/images/serverless-framework.png)\n\n# NestJS and Serveless Framework\n\n## Technology Stack\n\n- **Monorepo**: This is a [monorepo](https://docs.nestjs.com/cli/monorepo#monorepo-mode) containing multiple Lambda functions and shared infrastructure\n- **REST API**: The functions are built using REST APIs to enable communication between components\n- **NestJS**: Uses [NestJS framework](https://docs.nestjs.com/) for building scalable server-side application\n- **Cloud-Native Architecture**: Built using cloud-native patterns and best practices to maximize the benefits of the cloud infrastructure, such as scalability and high availability\n- **Serverless Framework**: Deployed using the [Serverless Framework](https://www.serverless.com/) for easy management of serverless applications\n- **AWS Lambda**: Used for serverless function execution, where business logic is run in response to events\n- **AWS API Gateway**: Used to create and manage APIs, providing endpoints for client applications to interact with the functions\n- **Infrastructure as Code (IaC)**: Manages shared infrastructure using [Terraform](https://www.terraform.io/)\n- **AWS Cloud**: Uses [RDS](https://aws.amazon.com/rds/) (relational database services), and [ElastiCache](https://aws.amazon.com/elasticache/) (distributed caching)\n- **Tests**: Unit and integration testing ([Jest](https://jestjs.io/))\n- **Documentation**: [OpenAPI](https://swagger.io/specification/), [Mermaid (diagram-as-code)](https://mermaid.js.org/)\n- **Others**: [TypeORM](https://typeorm.io/), [Webpack](https://webpack.js.org/), [JWT](https://jwt.io/)\n\n## Deployment flow\n\nSee details as [how to deploy](docs/markdown/how-to-deploy.md) in the deployment documentation.\n\n```mermaid\nstateDiagram-v2\ndirection LR\n\nclassDef docker_style fill:#1d63ed\nclassDef terraform_style fill:#7b42bc\nclassDef serverless_style fill:#fd5750\n\nstate \"Docker\" as docker_group {\n    direction TB\n    state \"Build node_modules in Linux environment\" as node_modules_build\n    state \"Download Amazon RDS Certificates\" as rds_cert\n    state docker_join \u003c\u003cjoin\u003e\u003e\n    state \"Export layer content to zip file\" as layer_zip\n    [*] --\u003e node_modules_build\n    [*] --\u003e rds_cert\n    node_modules_build --\u003e docker_join\n    rds_cert --\u003e docker_join\n    docker_join --\u003e layer_zip\n    layer_zip --\u003e [*]\n}\ndocker_group:::docker_style\n\nstate \"Terraform\" as terraform_group {\n    state \"Build shared infrastructure\" as terraform_build\n    state \"Amazon RDS - PostgreSQL\" as aws_database\n    state \"Amazon ElastiCache - Redis\" as aws_cache\n    state terraform_join \u003c\u003cjoin\u003e\u003e\n    [*] --\u003e terraform_build\n    terraform_build --\u003e aws_database\n    terraform_build --\u003e aws_cache\n    aws_database --\u003e terraform_join\n    aws_cache --\u003e terraform_join\n    terraform_join --\u003e [*]\n}\nterraform_group:::terraform_style\n\nstate start_fork \u003c\u003cfork\u003e\u003e\n[*] --\u003e start_fork\nstart_fork --\u003e docker_group\nstart_fork --\u003e terraform_group\n\nstate start_join \u003c\u003cjoin\u003e\u003e\ndocker_group --\u003e start_join\nterraform_group --\u003e start_join\n\nstate \"Build code\" as build_code\n\nstart_join --\u003e build_code\n\nstate \"Deploy AWS Lambda Layer\" as lambda_layer\nstate \"Deploy AWS Lambda Function - Login\" as lambda_login\nstate \"Deploy AWS Lambda Function - Logout\" as lambda_logout\nstate \"Deploy AWS API Gateway\" as api_gateway\n\nstate \"Serverless Framework\" as serverless_group {\n    lambda_layer --\u003e lambda_login\n    lambda_layer --\u003e lambda_logout\n    state lambda_join \u003c\u003cjoin\u003e\u003e\n    lambda_login --\u003e lambda_join\n    lambda_logout --\u003e lambda_join\n    lambda_join --\u003e api_gateway\n}\nserverless_group:::serverless_style\n\nbuild_code --\u003e lambda_layer\napi_gateway --\u003e [*]\n```\n\n## General organization\n\nThe project has two endpoints for a simple [authentication flow](/docs/markdown/authentication-flow.md), each one is an app inside the monorepo and run in its own lambda function:\n\n- **Login**: receives username and password and issue an access token\n- **Logout**: invalidates the token that made the logout\n\n```mermaid\nstateDiagram-v2\ndirection LR\n\nstate \"Consumer\" as consumer\n[*] --\u003e consumer\n\nstate \"AWS API Gateway\" as aws_api_gateway {\n    state \"API Entrypoint\" as api_entrypoint\n    state \"REST API login\" as api_login\n    state \"REST API logout\" as api_logout\n    api_entrypoint --\u003e api_login\n    api_entrypoint --\u003e api_logout\n    api_login --\u003e lambda_login\n    api_logout --\u003e lambda_logout\n}\n\nstate \"AWS Lambda\" as aws_lambda {\n    state \"Function login\" as lambda_login\n    state \"Function logout\" as lambda_logout\n}\n\nstate \"AWS RDS\" as aws_rds {\n    state \"PostgreSQL Database\" as database\n}\n\nstate \"AWS ElastiCache\" as aws_elasticache {\n    state \"Redis\" as cache\n}\n\nlambda_login --\u003e database\nlambda_login --\u003e cache\n\nlambda_logout --\u003e database\nlambda_logout --\u003e cache\n\nconsumer --\u003e api_entrypoint\n```\n\n## Documentation about\n\n- [How to contribute](./CONTRIBUTING.md)\n- [How to run from code](docs/markdown/how-to-run.md)\n- [How to deploy](docs/markdown/how-to-deploy.md)\n- [OpenAPI documentation](docs/markdown/documentation.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshimisnow%2Fpoc-nestjs-serverless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshimisnow%2Fpoc-nestjs-serverless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshimisnow%2Fpoc-nestjs-serverless/lists"}