{"id":14970062,"url":"https://github.com/grafe-team/grafe-framework","last_synced_at":"2026-02-12T14:32:15.196Z","repository":{"id":49091555,"uuid":"365334631","full_name":"grafe-team/grafe-framework","owner":"grafe-team","description":"This is the main repository of the grafe-framework project. It includes the CLI as well as the core","archived":false,"fork":false,"pushed_at":"2021-09-08T17:20:36.000Z","size":457,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-19T23:34:57.224Z","etag":null,"topics":["back-end","backend","express","expressjs","framework","node-module"],"latest_commit_sha":null,"homepage":"","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/grafe-team.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}},"created_at":"2021-05-07T19:31:09.000Z","updated_at":"2024-04-26T17:53:29.000Z","dependencies_parsed_at":"2022-09-26T20:22:12.448Z","dependency_job_id":null,"html_url":"https://github.com/grafe-team/grafe-framework","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/grafe-team/grafe-framework","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafe-team%2Fgrafe-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafe-team%2Fgrafe-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafe-team%2Fgrafe-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafe-team%2Fgrafe-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grafe-team","download_url":"https://codeload.github.com/grafe-team/grafe-framework/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafe-team%2Fgrafe-framework/sbom","scorecard":{"id":443200,"data":{"date":"2025-08-11","repo":{"name":"github.com/grafe-team/grafe-framework","commit":"f76d133ae80b69d710172eb549249123cd51ef2f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/grafe-team/grafe-framework/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/grafe-team/grafe-framework/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/grafe-team/grafe-framework/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/grafe-team/grafe-framework/main.yml/main?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   2 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"30 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T06:02:20.187Z","repository_id":49091555,"created_at":"2025-08-19T06:02:20.187Z","updated_at":"2025-08-19T06:02:20.187Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29368689,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"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":["back-end","backend","express","expressjs","framework","node-module"],"created_at":"2024-09-24T13:42:58.323Z","updated_at":"2026-02-12T14:32:15.178Z","avatar_url":"https://github.com/grafe-team.png","language":"TypeScript","readme":"\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"460\" src=\"https://i.ibb.co/mT0TMQG/garfe-logo.png\"\u003e\n\u003c/p\u003e\n\n\n\n\u003ch1 align=\"center\"\u003e Grafe\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eThe easiest way to create a backend\u003c/b\u003e\n\u003c/p\u003e\n\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=grafe-team_grafe-framework\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=grafe-team_grafe-framework)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=grafe-team_grafe-framework\u0026metric=bugs)](https://sonarcloud.io/dashboard?id=grafe-team_grafe-framework)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=grafe-team_grafe-framework\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=grafe-team_grafe-framework)\n\n##### Table of Contents  \n- [Installation](#installation)  \n- [Getting started](#getting-started)\n\t- [start a new project](#start-your-project)\n\t- [generate your first route](#generate-your-first-route)\n\t- [generate your first middleware](#generate-your-first-middleware)\n- [Commands](#Commands)  \n\t- [grafe start](#grafe-start)\n\t\t- [Syntax](#syntax)\n\t\t- [Details](#details)\n\t\t- [Examples](#examples)\n\t- [grafe generate](#grafe-generate)\n\t\t- [Syntax](#syntax-1)\n\t\t- [Details](#details-1)\n\t\t- [Examples](#examples-1)\n\t- [grafe generate route](#grafe-generate-route)\n\t\t- [Syntax](#syntax-2)\n\t\t- [Details](#details-2)\n\t\t- [Examples](#examples-2)\n\t- [grafe generate middleware](#grafe-generate-middleware)\n\t\t- [Syntax](#syntax-3)\n\t\t- [Details](#details-3)\n\t\t- [Examples](#examples-3)\n\t- [grafe generate static](#grafe-generate-static)\n\t\t- [Syntax](#syntax-3)\n\t\t- [Details](#details-3)\n\t\t- [Examples](#examples-3)\n\t- [grafe serve](#grafe-serve)\n\t\t- [Syntax](#syntax-4)\n\t\t- [Details](#details-4)\n\t\t- [Examples](#examples-4)\n- [Packages](#packages)\n- [License](#license)\n\n## Installation \nEither through cloning with git or by using [npm](http://npmjs.org) (recommended way):\n```bash\nnpm install -g @grafe/grafe-cli\n```\n## Getting started\n\u003eThis is a simple tutorial of how to use grafe. It will teach you how to start a new Project, how you can add new components and many other things.\n\n### Start your Project \nWelcome to grafe!\n  \nIf you have already installed the package `@grafe/grafe-cli`, we will start by creating a new Grafe project. For this we use the `grafe start` command with the integrated options, which you can have a look at in the documentation under [syntax](#syntax).\n\n```bash\ngrafe start HelloWorld -t express --yes\n```\n\nAs template we use express and as project name we take 'HelloWorld'.\n\u003cbr/\u003e\nTo check if everything worked correctly, we run the project with the `grafe serve` command. By the way, this command detects if you have made a change, then re-compiles the project and restarts it.\n\n```bash\ngrafe serve\n```\nIf you have not changed the port, your back-end is now running on port 3000 with a default route \n`GET localhost:300/index/` which does nothing.\n\u003cbr/\u003e\n### Generate your first route\nLet us now create our first route, which should greet us with a `Hello World`.\nFor this we use the `grafe generate route` command with its integrated options, which you can read again in the documentation under [syntax](#syntax-2).\n```bash\ngrafe generate route -r /helloworld/greet -m get -w --yes\n```\nNow we have a new file under `src/routes/helloworld/`. The contents of this file look like this:\n```javascript\nimport { Request, Response } from  'express';\n\nexport  =  async (req:  Request, res:  Response) =\u003e {\n\n};\n```\nTo see a result we now write a response into the function:\n```javascript\nres.send({ message: 'hello world'});\n```\nWe can test it with our browser, since it is a `GET` method, or with [Postman](https://www.postman.com/).  If you want to test the route with your browser, go to the url `http://localhost:3000/helloworld/greet/`.\n\u003cbr/\u003e\n### Generate your first middleware\nThe next step is to take a closer look at middleware. This allows another function to be called before the route function is called. We create one with the `grafe generate middleware` command with its integrated options, which can be found in the documentation under [syntax](#syntax-3).\n```bash\ngrafe generate middleware -n grafe-greets -s grf -d \"This middleware will greet grafe\" --yes\n```\nThis creates a new file for us under `src/middlewares/grf/grafe-greets.ts` with the following content:\n```javascript\nimport { NextFunction, Request, Response } from  'express';\n\nexport  = (req:  Request, res:  Response, next:  NextFunction) =\u003e {\n\n\tnext();\n}\n```\nTo see that this middleware is called we first write a simple `console.log` which should output a message to the console:\n```javascript\nconsole.log('Grafe greets!');\n```\nWe write this above the `next()` method. Now we generate a new route with our new middleware preceding:\n```bash\ngrafe generate route -r /helloworld/grafe -m get -w grf --yes\n```\nIn this route we write the same response as in [generate your first route](#generate-your-first-route). If we now call this route via our browser (`http://localhost:3000/helloword/grafe/`), we see our 'hello world' in the browser and a 'Grafe greets!' in our console.\n## Commands\n### grafe start\nCreates a new grafe project.\n#### Syntax\n```bash\ngrafe start [projectName]\n```\n#### Details\n`grafe start` will start the prompts to create a new grafe project. \n| Option| Alias| Description|\n| :--- | :--- | :--- |\n| --help | - / - | Shows a list of all available options |\n| --template | -t | Sets the template of the project |\n| --testing | - / - | Enables testing for the grafe project|\n| [projectName] | - / - | Sets the project name |\n| --yes | - / - | confirms the creation of the new project\n#### Examples\n```bash\ngrafe start project_1\ngrafe start project_2 -t express\ngrafe start project_3 --testing\n```\n------\n### grafe generate\nCreates a new grafe component.\n#### Syntax\n```bash\ngrafe generate\n```\n#### Details\n`grafe generate` will start the prompts of which component should be generated. \n| Option| Alias| Description|\n| :--- | :--- | :--- |\n| --help | - / - | Shows a list of all available options |\n| [route](#grafe-generate-route) | - / - | Will generate a new route |\n| [middleware](#grafe-generate-middleware) | - / - | Will generate a new middleware |\n| [static](#grafe-generate-static) | - / - | Will generate a new static-directory |\n#### Examples\n```bash\ngrafe generate\ngrafe generate --help\ngrafe generate route\n```\n------\n### grafe generate route\nAutomatically creates a new grafe-route-component,\n#### Syntaxt\n```bash\ngrafe generate route\n```\n#### Details\n`grafe generate route` will start the prompts of the route properties and automatically generate a new route component. \n| Option| Alias| Description|\n| :--- | :--- | :--- |\n| --help | - / - | Shows a list of all available options |\n| --routePath | -r | Sets the path of the new route |\n| --method | -m | Sets the method of the new route. `get | post | put | delete` |\n| --middlewares |-w | Sets the preceding middlewares of the route |\n| --yes | - / - | confirms the generation of the new component\n#### Examples\n```bash\ngrafe generate route \ngrafe generate route --help\ngrafe generate route -r /auth/login -m post \ngrafe generate route -r /auth/is-authenticated -m get -w pt --yes\n```\n------\n### grafe generate middleware\nAutomatically creates a new grafe-middleware-component\n#### Syntaxt\n```bash\ngrafe generate middleware\n```\n#### Details\n`grafe generate middleware` will start the prompts of the middleware properties and automatically generate a new middleware component. \n| Option| Alias| Description|\n| :--- | :--- | :--- |\n| --help | - / - | Shows a list of all available options |\n| --name | -n | Sets the name of the middleware |\n| --short | -s | Sets the shortcut of the middleware |\n| --description |-d | Sets the description of the middleware |\n| --yes | - / - | confirms the generation of the new component\n#### Examples\n```bash\ngrafe generate middleware\ngrafe generate middleware --help\ngrafe generate middleware -n protected -s pt \ngrafe generate middleware -n admin-only -s adm -d \"Only for Admins\" --yes\n```\n------\n### grafe generate static\nCreates a new folder which can be used for static files. \n#### Syntaxt\n```bash\ngrafe generate static\n```\n#### Details\n`grafe generate static` will start the prompts of the static properties and automatically create a new static directory. \n| Option| Alias| Description|\n| :--- | :--- | :--- |\n| --help | - / - | Shows a list of all available options |\n| --name | -n | Sets the name of new folder |\n| --prefix | -p | Sets the prefix with which you access the folder |\n| --yes | - / - | confirms the generation of the new component\n#### Examples\n```bash\ngrafe generate static\ngrafe generate static --help\ngrafe generate static -n images \ngrafe generate static -n pictures -p public/pictures --yes\n```\n------\n### grafe serve\nStarts the project and watches for file changes.\n#### Syntax\n```bash\ngrafe serve\n```\n#### Details\n`grafe serve` will start the project, watches for file changes, re-compiles and restarts it.\n| Option| Alias| Description|\n| :--- | :--- | :--- |\n| --help | - / - | Shows a list of all available options |\n#### Examples\n```bash\ngrafe serve\n```\n## Packages\n\n| Project| Package | Version |\n| --- | --- | --- |\n| Garfe CLI | [@garfe/grafe-cli](https://www.npmjs.com/package/@grafe/grafe-cli) | [![npm version](https://badge.fury.io/js/%40grafe%2Fgrafe-cli.svg)](https://badge.fury.io/js/%40grafe%2Fgrafe-cli) |\n| Grade Core | [@garfe/grafe-core](https://www.npmjs.com/package/@grafe/grafe-core) | [![npm version](https://badge.fury.io/js/%40grafe%2Fgrafe-core.svg)](https://badge.fury.io/js/%40grafe%2Fgrafe-core) |\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrafe-team%2Fgrafe-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrafe-team%2Fgrafe-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrafe-team%2Fgrafe-framework/lists"}