{"id":20189281,"url":"https://github.com/create-node-app/cna-templates","last_synced_at":"2025-08-21T12:11:42.921Z","repository":{"id":50227418,"uuid":"298953142","full_name":"Create-Node-App/cna-templates","owner":"Create-Node-App","description":"This repository contains templates and extensions for the https://www.npmjs.com/package/create-awesome-node-app package.","archived":false,"fork":false,"pushed_at":"2025-07-22T02:09:43.000Z","size":2477,"stargazers_count":8,"open_issues_count":4,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-22T02:41:31.079Z","etag":null,"topics":["create-awesome-node-app","devcontainer","docker","docker-compose","github-actions","hacktoberfest","nestjs","reactjs","typescript"],"latest_commit_sha":null,"homepage":"","language":"Less","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/Create-Node-App.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,"zenodo":null}},"created_at":"2020-09-27T04:31:21.000Z","updated_at":"2025-07-22T02:09:47.000Z","dependencies_parsed_at":"2023-01-23T12:45:44.932Z","dependency_job_id":"c10546be-851c-4419-85d5-c9827ee59b8b","html_url":"https://github.com/Create-Node-App/cna-templates","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Create-Node-App/cna-templates","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Create-Node-App%2Fcna-templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Create-Node-App%2Fcna-templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Create-Node-App%2Fcna-templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Create-Node-App%2Fcna-templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Create-Node-App","download_url":"https://codeload.github.com/Create-Node-App/cna-templates/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Create-Node-App%2Fcna-templates/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271477990,"owners_count":24766423,"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","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["create-awesome-node-app","devcontainer","docker","docker-compose","github-actions","hacktoberfest","nestjs","reactjs","typescript"],"created_at":"2024-11-14T03:35:31.211Z","updated_at":"2025-08-21T12:11:42.866Z","avatar_url":"https://github.com/Create-Node-App.png","language":"Less","readme":"# Cna Templates\n\nThis repository contains templates and extensions for the \u003chttps://www.npmjs.com/package/create-awesome-node-app\u003e package.\n\n## How to add new templates or extensions?\n\n1. Fork this repository.\n2. Add your template or extension to the `templates` or `extensions` folder respectively (see below for more details).\n3. Add your template or extension to the `templates.json` file in the `templates` or `extensions` property respectively with the following format:\n\n   ```json\n   {\n     \"slug\": \"template-slug\",\n     \"name\": \"Template Name\",\n     \"description\": \"Template description\",\n     \"url\": \"https://github.com/username/repository/tree/branch/path/to/template\",\n     \"type\": \"template_type\",\n     \"category\": \"template_category\",\n     \"labels\": [\"template\", \"labels\"]\n   }\n   ```\n\n   Check the [template properties](#template-properties) section for more details.\n\n4. Create a pull request!\n\n## Understanding `templates.json`\n\nThe `templates.json` file is the core configuration file that defines all available templates, extensions, and categories.\n\n### Categories\n\nThe `categories` property provides metadata about the types of templates available. Each category includes:\n\n- **slug**: A unique identifier for the category.\n- **name**: The display name of the category.\n- **description**: A short description of the category.\n- **details**: Additional details about the category.\n- **labels**: Keywords associated with the category.\n\n### Example `categories` Structure\n\n```json\n{\n  \"categories\": [\n    {\n      \"slug\": \"frontend-applications\",\n      \"name\": \"Frontend Applications\",\n      \"description\": \"Templates for building modern web interfaces.\",\n      \"details\": \"Discover templates for React, Vue, and other frontend frameworks to build beautiful user interfaces.\",\n      \"labels\": [\"Frontend\", \"UI\", \"React\", \"Vue\", \"Web\"]\n    }\n  ]\n}\n```\n\n### How Templates and Extensions Work Together\n\nWhen you run `create-awesome-node-app`, you can specify a base template and a list of extensions. The CLI uses the `templates.json` file to:\n\n1. Match the selected template by its `slug`.\n2. Filter compatible extensions based on the `type` of the selected template.\n3. Apply the template and extensions to generate your project.\n\nFor example:\n\n```sh\ncreate-awesome-node-app --template react-vite-boilerplate --addons material-ui github-setup\n```\n\n- The `react-vite-boilerplate` template is selected as the base.\n- The `material-ui` and `github-setup` extensions are added, as they are compatible with the `react` type.\n\n### Template Properties\n\n| Property        | Description                                                                                                                                                                                                                               | Type       |\n| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |\n| **slug**        | A unique identifier for the template or extension, typically a URL-friendly version of the name.                                                                                                                                          | `string`   |\n| **name**        | The name of the template or extension                                                                                                                                                                                                     | `string`   |\n| **description** | A short description of the template or extension                                                                                                                                                                                          | `string`   |\n| **url**         | The URL to the template or extension. For example, if you want to use a template from a GitHub repository, you can use the following format: `https://github.com/username/repository/tree/branch/path/to/template`                        | `string`   |\n| **type**        | The type of the template or extension. Can be any value that will be used to group templates and extensions. For example, if you want to add a new template and five extensions related to it, you can use the same type for all of them. | `string`   |\n| **category**    | The category of the template or extension. Can be any value that will be used to group templates and extensions.                                                                                                                          | `string`   |\n| **labels**      | An array of labels that will be used to filter templates and extensions.                                                                                                                                                                  | `string[]` |\n\n### Example `templates.json` Structure\n\n```json\n{\n  \"templates\": [\n    {\n      \"name\": \"React Vite Boilerplate\",\n      \"slug\": \"react-vite-boilerplate\",\n      \"description\": \"A highly opinionated React boilerplate with Vite, TypeScript, ESLint, Prettier, and more.\",\n      \"url\": \"https://github.com/Create-Node-App/cna-templates/tree/main/templates/react-vite-starter\",\n      \"type\": \"react\",\n      \"category\": \"Frontend Application\",\n      \"labels\": [\"React\", \"Vite\", \"TypeScript\", \"ESLint\", \"Prettier\"]\n    }\n  ],\n  \"extensions\": [\n    {\n      \"name\": \"Material UI\",\n      \"slug\": \"material-ui\",\n      \"description\": \"Extension to add Material UI to your React app\",\n      \"url\": \"https://github.com/Create-Node-App/cna-templates/tree/main/extensions/react-material-ui\",\n      \"type\": \"react\",\n      \"category\": \"UI\",\n      \"labels\": [\"React\", \"Material UI\"]\n    }\n  ]\n}\n```\n\n### Adding Compatibility Between Templates and Extensions\n\nTo ensure compatibility, the `type` property of an extension must match the `type` of the template. For example:\n\n- A template with `type: \"react\"` can use extensions with `type: \"react\"`.\n- An extension with `type: [\"react\", \"nextjs\"]` can be used with both `react` and `nextjs` templates.\n\n### Creating a Project with Templates and Extensions\n\nTo create a project, use the CLI as follows:\n\n```sh\ncreate-awesome-node-app --template \u003ctemplate-slug\u003e --addons \u003cextension-slug-1\u003e \u003cextension-slug-2\u003e\n```\n\nFor example:\n\n```sh\ncreate-awesome-node-app --template react-vite-boilerplate --addons material-ui github-setup\n```\n\nThis will scaffold a React project with Vite and add Material UI and GitHub setup extensions.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreate-node-app%2Fcna-templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreate-node-app%2Fcna-templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreate-node-app%2Fcna-templates/lists"}