{"id":15715278,"url":"https://github.com/crazyoptimist/lambda-template-typescript","last_synced_at":"2025-03-30T20:18:04.324Z","repository":{"id":187063927,"uuid":"676252877","full_name":"crazyoptimist/lambda-template-typescript","owner":"crazyoptimist","description":"A Node.js lambda service template written in Typescript","archived":false,"fork":false,"pushed_at":"2023-08-31T07:17:11.000Z","size":1405,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T23:00:51.266Z","etag":null,"topics":[],"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/crazyoptimist.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":"2023-08-08T19:24:03.000Z","updated_at":"2023-08-09T06:56:04.000Z","dependencies_parsed_at":"2024-10-03T21:40:57.188Z","dependency_job_id":"8f2b5746-faf5-4c22-8ea6-72f9cd15d19e","html_url":"https://github.com/crazyoptimist/lambda-template-typescript","commit_stats":null,"previous_names":["crazyoptimist/lambda-template-typescript"],"tags_count":1,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazyoptimist%2Flambda-template-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazyoptimist%2Flambda-template-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazyoptimist%2Flambda-template-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazyoptimist%2Flambda-template-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crazyoptimist","download_url":"https://codeload.github.com/crazyoptimist/lambda-template-typescript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246372743,"owners_count":20766635,"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-10-03T21:40:51.532Z","updated_at":"2025-03-30T20:18:04.298Z","avatar_url":"https://github.com/crazyoptimist.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serverless Template Typescript\n\nThis is a serverless template written in Typescript.\n\n## Style Guide\n\n### Project Structure\n\n- `src/functions` is where we organize serverless functions for this service. Keep function files as simple as possible and organize broken down business logics inside `src/helpers`.\n- `src/helpers` is where we organize broken-down modules that runs business logics, create sub folders if needed.\n- `src/config` is where we organize application global configurations and constants. Every environment variables should be verified(and maybe re-organized as nested objects if we prefer) in `src/config`. We should not read env vars directly like `process.env.FOO`, because it's hard to track what's used where.\n- `src/utils` is where we organize utility functions that doesn't contain any business logics\n- `src/common` is where we organize shared code which is reused and is shared between different modules, and is specific to this project. Create sub folders if needed.\n- `src/scripts` is where we organize one-off scripts.\n- `testdata` is where test sample data live. Create sub folders as needed.\n\n### Naming Conventions\n\n- Use `kebab-case` for folders\n- Use `camelCase` for variables, functions, and files\n- Use `PascalCase` for classes, types, interfaces, enums\n- Use `ALL_UPPER_CASE` for constants\n\n### Tests\n\n- Place test files in the same folder as the code that the tests are written for.\n\n## Development\n\n- Node.js(\u003e v18.x) is required\n- Install dependencies\n\n  ```bash\n  npm i\n  ```\n\n- Run the application\n\n  ```bash\n  npm run dev\n  ```\n\n## Logging\n\n- Structured logging for lambda functions is setup using `pino` and `pino-lambda`.\n- We can import logger from `src/utils/logger` and use it anywhere in the application.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazyoptimist%2Flambda-template-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrazyoptimist%2Flambda-template-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazyoptimist%2Flambda-template-typescript/lists"}