{"id":15495121,"url":"https://github.com/samchon/nestia-start","last_synced_at":"2025-10-24T18:42:48.596Z","repository":{"id":152227836,"uuid":"551794409","full_name":"samchon/nestia-start","owner":"samchon","description":"Nestia template project installed by \"npx nestia start\"","archived":false,"fork":false,"pushed_at":"2025-04-16T12:42:23.000Z","size":903,"stargazers_count":17,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-20T03:32:21.490Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/samchon.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-15T05:22:54.000Z","updated_at":"2025-04-16T12:42:26.000Z","dependencies_parsed_at":"2023-10-12T23:42:25.207Z","dependency_job_id":"b0c0efbc-64b6-4971-a898-a6e7bf613a79","html_url":"https://github.com/samchon/nestia-start","commit_stats":{"total_commits":459,"total_committers":6,"mean_commits":76.5,"dds":0.3289760348583878,"last_synced_commit":"d3d0ab237b78a7239f49476a036611f18713a418"},"previous_names":["samchon/nestia-template"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fnestia-start","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fnestia-start/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fnestia-start/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fnestia-start/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samchon","download_url":"https://codeload.github.com/samchon/nestia-start/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250318001,"owners_count":21410861,"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-02T08:16:10.714Z","updated_at":"2025-10-24T18:42:48.585Z","avatar_url":"https://github.com/samchon.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nestia Template\n## Outline\n[![Build Status](https://github.com/samchon/nestia-start/workflows/build/badge.svg)](https://github.com/samchon/nestia-start/actions?query=workflow%3Abuild)\n\nA template repository for backend projects using [nestia](https://github.com/samchon/nestia).\n\nYou can create a new project from this boilerplate by running below command:\n\n```bash\nnpx nestia start \u003cdirectory\u003e\n```\n\nFor reference, this is a minimal boilerplate project concentrating only on [nestia](https://github.com/samchon/nestia) SDK generation. \n\nIf you wanna much detailed boilerplate project, visit [`@samchon/backend`](https://github.com/samchon/backend).\n\n\n\n\n## Directories and Files\nThis template project has categorized directories like below.\n\nAs you can see from the below, all of the Backend source files are placed into the [src](src/) directory. When you build the TypeScript source files, compiled files would be placed into the `lib` directory following the [tsconfig.json](tsconfig.json) configuration. Otherwise you build client [SDK](#32-sdk) library for npm publishing and their compiled files would be placed into the [packages](packages) directory.\n\n  - [packages/api/](packages/api): SDK module built by `npm run build:api`\n  - [src/](src): Backend source directory\n    - [src/api/](src/api/): Client SDK that would be published to the `@ORGANIZATION/PROJECT-api`\n      - [**src/api/functional/**](src/api/functional/): API functions generated by the [`nestia`](https://github.com/samchon/nestia)\n      - [**src/api/structures/**](src/api/structures/): DTO structures\n    - [src/controllers/](src/controllers/): Controller classes of the Main Program\n  - [**test/**](test): Test Automation Program\n  - [nestia.config.ts](nestia.config.ts): Configuration file of [`nestia`](https://github.com/samchon/nestia)\n  - [package.json](package.json): NPM configuration\n  - [tsconfig.json](tsconfig.json): TypeScript configuration for the main program\n\n\n\n\n## NPM Run Commands\nList of the run commands defined in the [package.json](package.json) are like below:\n\n  - Test\n    - **`test`**: Run test automation program\n    - `benchmark`: Run performance benchmark program\n  - Build\n    - `build`: Build everything\n    - `build:main`: Build main program (`src` directory)\n    - `build:test` Build test automation program (`test` directory)\n    - `build:sdk`: Build SDK into main program only\n    - `build:swagger`: Build Swagger Documents\n    - **`dev`**: Incremental build for development (test program)\n  - Deploy\n    - `package:api`: Build and deploy the SDK library to the NPM\n    - `start`: Start the backend server\n    - `start:dev`: Start the backend server with incremental build and reload\n  - Webpack\n    - `webpack`: Run webpack bundler\n    - `webpack:start`: Start the backend server built by webpack\n    - `webpack:test`: Run test program to the webpack built\n\n\n\n\n## Specialization\nTransform this template project to be yours.\n\nWhen you've created a new backend project through this template project, you can specialize it to be suitable for you by changing some words. Replace below words through IDE specific function like `Edit \u003e Replace in Files` (*Ctrl + Shift + H*), who've been supported by the VSCode.\n\n| Before          | After\n|-----------------|----------------------------------------\n| ORGANIZATION | Your account or corporation name\n| PROJECT      | Your own project name\n| AUTHOR       | Author name\n| https://github.com/samchon/nestia-start | Your repository URL\n\n\n\n\n## Test Driven Development\nWith [nestia](https://github.com/samchon/nestia) helps to accomplish TDD (Test Driven Development). \n\nJust define DTOs and API controllers' methods (only declarations) first. After the definitions, and build SDK (Software Development Kit) through [nestia](https://github.com/samchon/nestia) (`npm run build:sdk`). After buildling those SDK, develop test automation program using the SDK, following use-case scenarios in the framework of client side.\n\nDuring the test automation program development, you can find that which API is miss-designed or which requirement analysis is not exact. Development of the main program must be the last step after such validation process during TDD.\n\n\u003e Visit the [samchon/backend](https://github.com/samchon/backend), then you may find much detailed story about this TDD.\n\u003e\n\u003e 1. Definitions\n\u003e 2. SDK\n\u003e 3. Test Automation Program\n\u003e 4. Main Program\n\n```typescript\nimport {\n  ArrayUtil,\n  GaffComparator,\n  RandomGenerator,\n  TestValidator,\n} from \"@nestia/e2e\";\n\nimport api from \"@ORGANIZATION/PROJECT-api/lib/index\";\nimport { IBbsArticle } from \"@ORGANIZATION/PROJECT-api/lib/structures/bbs/IBbsArticle\";\nimport { IPage } from \"@ORGANIZATION/PROJECT-api/lib/structures/common/IPage\";\n\nexport async function test_api_bbs_article_index_sort(\n  connection: api.IConnection,\n): Promise\u003cvoid\u003e {\n  // GENERATE 100 ARTICLES\n  const section: string = \"general\";\n  await ArrayUtil.asyncRepeat(100, () =\u003e\n    api.functional.bbs.articles.create(connection, {\n      section,\n      body: {\n        writer: RandomGenerator.name(),\n        title: RandomGenerator.paragraph(),\n        body: RandomGenerator.content(),\n        format: \"txt\",\n        files: [],\n        password: RandomGenerator.alphabets(8),\n      },\n    }),\n  );\n\n  // PREPARE VALIDATOR\n  const validator = TestValidator.sort(\n    \"BbsArticleProvider.index()\",\n    async (sort: IPage.Sort\u003cIBbsArticle.IRequest.SortableColumns\u003e) =\u003e {\n      const page: IPage\u003cIBbsArticle.ISummary\u003e =\n        await api.functional.bbs.articles.index(connection, {\n          section,\n          body: {\n            limit: 100,\n            sort,\n          },\n        });\n      return page.data;\n    },\n  );\n\n  // DO VALIDATE\n  const components = [\n    validator(\"created_at\")(GaffComparator.dates((x) =\u003e x.created_at)),\n    validator(\"updated_at\")(GaffComparator.dates((x) =\u003e x.updated_at)),\n    validator(\"title\")(GaffComparator.strings((x) =\u003e x.title)),\n    validator(\"writer\")(GaffComparator.strings((x) =\u003e x.writer)),\n    validator(\n      \"writer\",\n      \"title\",\n    )(GaffComparator.strings((x) =\u003e [x.writer, x.title])),\n  ];\n  for (const comp of components) {\n    await comp(\"+\", false);\n    await comp(\"-\", false);\n  }\n}\n```\n\nFor reference, if you run `npm run benchmark` command, your test functions defined in the [test/features/api](test/features/api) directory would be utilized for performance benchmarking. If you want to see the performance bench result earlier, visit below link please:\n\n  - [docs/benchmarks/AMD Ryzen 9 7940HS w Radeon 780M Graphics.md](https://github.com/samchon/nestia-start/blob/master/docs/benchmarks/AMD%20Ryzen%209%207940HS%20w%20Radeon%20780M%20Graphics.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamchon%2Fnestia-start","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamchon%2Fnestia-start","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamchon%2Fnestia-start/lists"}