{"id":20006827,"url":"https://github.com/caerusjs/caerus","last_synced_at":"2026-01-21T21:34:03.788Z","repository":{"id":38756324,"uuid":"261889269","full_name":"caerusjs/caerus","owner":"caerusjs","description":"Caerus, an opinionated framework for building web applications with the goal of rapid development and low maintenence.","archived":false,"fork":false,"pushed_at":"2022-12-11T23:28:52.000Z","size":3906,"stargazers_count":2,"open_issues_count":44,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-03T23:52:39.539Z","etag":null,"topics":["apollo-client","apollo-server-express","caerus","expressjs","framework","graphql","javascript","opinionated","react-router","reactjs","typegraphql","typeorm","typescript","web-application"],"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/caerusjs.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-06T22:08:19.000Z","updated_at":"2020-11-27T23:17:07.000Z","dependencies_parsed_at":"2023-01-27T09:16:08.937Z","dependency_job_id":null,"html_url":"https://github.com/caerusjs/caerus","commit_stats":null,"previous_names":["krisquigley/caerus"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/caerusjs/caerus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caerusjs%2Fcaerus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caerusjs%2Fcaerus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caerusjs%2Fcaerus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caerusjs%2Fcaerus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caerusjs","download_url":"https://codeload.github.com/caerusjs/caerus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caerusjs%2Fcaerus/sbom","scorecard":{"id":261661,"data":{"date":"2025-08-11","repo":{"name":"github.com/caerusjs/caerus","commit":"acf4f47863cbb4f37a41054c063fdd64e12b455d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/30 approved changesets -- score normalized to 0","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":"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/node.js.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":"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":"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":"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/caerusjs/caerus/node.js.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/caerusjs/caerus/node.js.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction 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":"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":"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":"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 8 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":"102 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-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-257v-vj4p-3w2h","Warn: Project is vulnerable to: GHSA-7gc6-qh9x-w6h8","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-r6rj-9ch6-g264","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-vxf5-wxwp-m7g9","Warn: Project is vulnerable to: GHSA-9gr3-7897-pp7m","Warn: Project is vulnerable to: GHSA-25mp-g6fv-mqxx","Warn: Project is vulnerable to: GHSA-fmvm-x8mv-47mj","Warn: Project is vulnerable to: GHSA-c59h-r6p8-q9wc","Warn: Project is vulnerable to: GHSA-g77x-44xx-532m","Warn: Project is vulnerable to: GHSA-7gfc-8cq8-jh5f","Warn: Project is vulnerable to: GHSA-qpjv-v59x-3qc4","Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-g954-5hwp-pp24","Warn: Project is vulnerable to: GHSA-h755-8qp9-cq85","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-gp95-ppv5-3jc5","Warn: Project is vulnerable to: GHSA-54xq-cgqr-rpm3","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-wpg7-2c88-r8xv","Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-pq67-2wwv-3xjx","Warn: Project is vulnerable to: GHSA-8cj5-5rvv-wf4v","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-px4h-xg32-q955","Warn: Project is vulnerable to: GHSA-3j8f-xvm3-ffx4","Warn: Project is vulnerable to: GHSA-4p35-cfcx-8653","Warn: Project is vulnerable to: GHSA-7f3x-x4pr-wqhj","Warn: Project is vulnerable to: GHSA-jpp7-7chh-cf67","Warn: Project is vulnerable to: GHSA-q6wq-5p59-983w","Warn: Project is vulnerable to: GHSA-j9fq-vwqv-2fm2","Warn: Project is vulnerable to: GHSA-pqw5-jmp5-px4v","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7"],"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-17T10:57:36.421Z","repository_id":38756324,"created_at":"2025-08-17T10:57:36.421Z","updated_at":"2025-08-17T10:57:36.421Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28644124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T21:29:11.980Z","status":"ssl_error","status_checked_at":"2026-01-21T21:24:31.872Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["apollo-client","apollo-server-express","caerus","expressjs","framework","graphql","javascript","opinionated","react-router","reactjs","typegraphql","typeorm","typescript","web-application"],"created_at":"2024-11-13T06:13:49.591Z","updated_at":"2026-01-21T21:34:03.770Z","avatar_url":"https://github.com/caerusjs.png","language":"TypeScript","readme":"# Caerus Framework\n\n![](https://github.com/krisquigley/caerus/workflows/Node.js%20CI/badge.svg)\n\n## What is it?\n\nAn opinionated framework for building web applications with the goal of rapid development and low maintenence.\n\nThe stack will evolve over time by adopting newer and better technologies, in order to improve performance and power; whilst identifying common, stable patterns for abstraction and generation, leading to increases in productivity.\n\n## Project Goal\n\nProductivity, Power and Performance.\n\n## Values\n\n- Fast\n- Extensible\n- Maintainable\n- Productive\n- Experimental\n\n## What Caerus Provides\n\n- A default tech stack proven to work together, which provide rapid development, low maintenence, security and accessibility out of the box.\n- Atomic approach to frontend development.\n- A CLI tool to generate the project folder structure. Resource scaffolding, database migrations and type generation.\n- A standard library with commonly used functions, e.g. pluralize, titalize, async forEach() and more.\n- Templating support for generating projects with a different default stack.\n\n## Folder Structure\n\n```\n{project-name}/\n  client/\n    src/\n      atoms/\n      molecules/\n      organisms/\n      routes/\n        {resource}.routes.tsx\n        index.tsx\n      support/\n        fixtures/\n      views/\n        {resource}/\n          new.view.tsx\n          edit.view.tsx\n          show.view.tsx\n          index.view.tsx\n        layouts/\n          application.layout.tsx\n      index.tsx\n  server/\n    src/\n      config/\n        index.ts\n        routes.ts\n        apollo.ts\n      db/\n        migrations/\n        seeds.ts\n      entities/\n        {resource}.entity.ts\n      features/\n        {story}.feature\n        {story}.tests.ts\n      lib/\n      resolvers/\n        {resource}/\n          {resource}.args.ts\n          {resource}.input.ts\n          {resource}.resolver.ts\n          {resource}.test.ts\n      support/\n        factories/\n        fixtures/\n        jest/\n        puppeteer/\n      server.ts\n      ormconfig.js\n```\n\n## Test suite\n\n- End-to-end acceptance tests through `jest-cucumber` (WIP)\n- Resolver tests through `jest`\n\n## Clientside\n\n### Packages\n\n- TypeScript\n- create-react-app\n- React Router\n- Apollo Client\n- Formik\n- Yup\n- Jest\n- React Testing Library\n\n## Serverside\n\n### Packages and Services\n\n- TypeScript\n- Apollo Server\n- Express\n- TypeORM\n- TypeGraphQL\n- Class Validator\n- DotEnv\n- Jest\n- Jest Puppeteer\n- Jest Cucumber\n\n## Getting Started\n\nThe Caerus Command Line Interface (CLI) makes it easy to initialise new projects and to generate scaffolding for existing projects. It’s an essential part of using Caerus.\n\n## Pre-requisite for running on Windows\n\nThe commands that are executed require you to have access to a Bash shell. Assuming you have installed e.g. Git on your machine, the following command will configure your environment such that the Bash shell is used when executing the `caerus` commands:\n\nFor x64 variants:\n\n`npm config set script-shell \"c:\\Program Files\\Git\\bin\\bash.exe\"`\n\nFor x32 variants:\n\n`npm config set script-shell \"c:\\Program Files (x86)\\Git\\bin\\bash.exe\"`\n\nIf you haven't got Git, but you have a Bash shell installed somewhere, replace the path above the with path to your local `bash.exe` file.\n\nIf you want to revert this, for any reason, the following command should be executed:\n\n`npm config delete script-shell`\n\n### Installing the Caerus CLI Tool\n\nInstall the Caerus package from your workspace folder to get started:\n\n`$ yarn add @caerusjs/cli`\n\n## Initializing a new project\n\nFrom your workspace folder run the following:\n\n`$ yarn caerus init \u003cname\u003e`\n\nWhere `name` is the name of your project. Use `-` for multiple words, e.g. `my-project`.\n\nThis will then create a folder based on the project name you provided and generate all relevant files and folders needed to get you started.\n\n### Installing Dependencies\n\nFrom the root of your newly generated project folder run:\n\n`$ yarn`\n\nThis will install all the dependencies needed for both the client and server.\n\n### Booting the application\n\nStill from the root of your project folder, run:\n\n`$ yarn dev`\n\nThis will start all relevant services for your project. Once booted you will likely receive a TypeScript error, this is due to GraphQL types not being generated on first boot.\n\nTo resolve this, open a new terminal window and navigate to the root of your project folder again. With the app still running, run the following command:\n\n`$ yarn codegen`\n\nThis will generate the relevant types and the app should restart without error now. This mild annoyance will be addressed in a future version of Caerus\n\n## Generating your First Resource\n\nIn this example we will be generating a resource called `post` which will be used for adding posts to our project.\n\n### Running the Generate Resource Command\n\nFrom the root folder of your application run the following command:\n\n`$ yarn caerus g resource post`\n\nThis will then generate the relevant files and folders associated with your resource.\n\n- In a future version of Caerus the following steps will be automated by the generator. The proposed API being `yarn caerus g resource \u003cname\u003e [column:type:options] `. For example, `yarn caerus g resource post title:string author:string:null`, would generate a Post resource with the columns title and author; both of which are strings with author being nullable.\n\n### Adding extra columns to our entity\n\nLets start by adding a title column to our Post entity.\n\n```typescript\n@Field()\n@Column()\ntitle: string\n```\n\n`@Field()` Exposes the column for the GraphQL API.\n`@Column()` Defines the column for the database.\n\nSee https://typeorm.io/#/entities for more information about defining entities for the database, and https://typegraphql.com/docs/types-and-fields.html about exposing GraphQL fields.\n\nUpdate `post.entity.ts` to the following:\n\n```typescript\nimport {\n  Entity,\n  PrimaryGeneratedColumn,\n  CreateDateColumn,\n  UpdateDateColumn,\n  Column,\n} from 'typeorm';\nimport { ObjectType, Field, ID } from 'type-graphql';\n\n@ObjectType()\n@Entity()\nexport class Post {\n  @Field((type) =\u003e ID)\n  @PrimaryGeneratedColumn('uuid')\n  readonly id: string;\n\n  @Field()\n  @Column()\n  title: string;\n\n  @CreateDateColumn({ type: 'date' })\n  createdAt: Date;\n\n  @UpdateDateColumn({ type: 'date' })\n  updatedAt: Date;\n}\n```\n\n### Create a New Database Migration\n\nFrom the root of your server folder run the following command:\n\n`$ yarn typeorm migration:generate -n AddPosts`\n\nThis will create a new db migration based on the entity details, which will be automatically run once the server restarts.\n\n### Updating Resolver Input\n\nNext we need to update our resolver input to be aware of the new title column.\n\nWithin `post.input.ts`, update the classes to the following:\n\n```typescript\n@InputType()\nexport class AddPostInput implements Partial\u003cPost\u003e {\n  @Field()\n  title: string;\n}\n\n@InputType()\nexport class UpdatePostInput implements Partial\u003cPost\u003e {\n  @Field((type) =\u003e ID)\n  id: string;\n\n  @Field()\n  title: string;\n}\n```\n\n### Updating Clientside GraphQL Documents\n\nUpdate `get-post.graphql` to the following:\n\n```typescript\nquery getPost($id: ID!) {\n  getPost(id: $id) {\n    id\n    title\n  }\n}\n```\n\nUpdate `get-posts.graphql` to the following:\n\n```typescript\nquery getPosts {\n  getPosts {\n    id\n    title\n  }\n}\n```\n\nUpdate `add-post.graphql` to the following:\n\n```typescript\nmutation AddPost($post: AddPostInput!) {\n  addPost(post: $post) {\n    id\n    title\n  }\n}\n```\n\nUpdate `update-post.graphql` to the following:\n\n```typescript\nmutation UpdatePost($post: UpdatePostInput!) {\n  updatePost(post: $post) {\n    id\n    title\n  }\n}\n```\n\n- In a future version of Caerus, these documents will share a common fragment so that only one document need updating.\n\n### Adding a Title Field to our Form\n\nWithin `post-form-fields/index.tsx` add the following `Field` **AND** `yup` validation:\n\n```typescript\nimport React from 'react';\nimport { object, string } from 'yup';\n\nimport { IFormFields } from 'types/props';\nimport { Field } from 'formik';\n\nexport const postFormSchema = object().shape({\n  title: string().required(),\n});\n\nconst PostFormFields: React.FC\u003cIFormFields\u003e = ({\n  errors,\n  handleChange,\n  values,\n}) =\u003e {\n  return (\n    \u003c\u003e\n      \u003clabel htmlFor='title'\u003eTitle *\u003c/label\u003e\n      \u003cField\n        name='title'\n        type='text'\n        aria-labelledby='title'\n        placeholder='Title'\n        value={values.title}\n        onChange={handleChange}\n      /\u003e\n      \u003cdiv\u003e{errors.name}\u003c/div\u003e\n    \u003c/\u003e\n  );\n};\n\nexport default PostFormFields;\n```\n\nThis adds a title field to our form and also validates it's presence when submitting the form. For more information on form fields see https://formik.org/docs/api/field and https://github.com/jquense/yup about validation.\n\n### Adding a Default Value for the Title Field\n\nWithin `add-post/index.tsx`, add title to the list of initial values:\n\n```typescript\nconst initialPostValues: IAddPostInput = {\n  title: '',\n};\n```\n\n### Adding the Post Routes to our application\n\nUpdate `routes/index.tsx` to the following:\n\n```typescript\nimport React, { Suspense, lazy } from 'react';\nimport { BrowserRouter as Router, Switch, Route } from 'react-router-dom';\nimport Loading from 'molecules/loading';\n\nconst ExampleRoutes = lazy(() =\u003e import('routes/example.routes'));\nconst PostRoutes = lazy(() =\u003e import('routes/post.routes'));\n\nconst AppRoutes = () =\u003e {\n  return (\n    \u003cRouter\u003e\n      \u003cSuspense fallback={\u003cLoading /\u003e}\u003e\n        \u003cSwitch\u003e\n          \u003cRoute path='/posts' component={PostRoutes} /\u003e\n          \u003cRoute path='/' component={ExampleRoutes} /\u003e\n        \u003c/Switch\u003e\n      \u003c/Suspense\u003e\n    \u003c/Router\u003e\n  );\n};\n\nexport default AppRoutes;\n```\n\nVoila, you should now be able to visit `http://localhost:3000/posts` to start adding some new posts!\n\n## CLI Commands\n\nThe Caerus CLI supports the following abilities:\n\n- Initialising projects\n- Generating end-to-end resources including tests (v0.5.0)\n- Generating entities\n- Generating resolvers\n- Generating views\n- Generating migrations (v0.6.0)\n- Generating types (v0.6.0)\n\n### Generating Scaffolding\n\n### Generating Entities\n\nTo generate an entity with default columns (id, createdAt and updatedAt) and graphql typedefs; run the following command from the root of your project:\n\n`$ yarn caerus generate entity \u003cname\u003e`\n\nWhere `name` is the name of your entity. Entities should be singular and use `-` for multiple words, e.g. `blog-post`.\n\n### Generating Resolvers\n\nTo generate a resolver, as well as input and arguments types and test scaffold, which covers the basic CRUD actions; run the following command from the root of your project:\n\n`$ yarn caerus generate resolver \u003cname\u003e`\n\nWhere `name` is the name of your resolver. Resolvers should be singular and use `-` for multiple words, e.g. `blog-post`.\n\n### Generating Views\n\nTo generate views and routes for a given resource, run the following command from the root of your project:\n\n`$ yarn caerus generate views \u003cname\u003e`\n\nWhere `name` is the name of your resource. Views should be singular and use `-` for multiple words, e.g. `blog-post`.\n\n### Generating Resources\n\nTo generate an entity, resolvers, organisms, views, routes and tests for a given resource, run the following command from the root of your project:\n\n`$ yarn caerus generate resource \u003cname\u003e`\n\nWhere `name` is the name of your resource. Views should be singular and use `-` for multiple words, e.g. `blog-post`.\n\n## Roadmap\n\nRoad to v1.0.0:\n\n| Feature                                        |    Implemented?    |\n| ---------------------------------------------- | :----------------: |\n| Generate Entity Command                        | :white_check_mark: |\n| Generate Resolver Command                      | :white_check_mark: |\n| Generate Views Command                         | :white_check_mark: |\n| Initialize Project Command                     | :white_check_mark: |\n| Generate Resource Command                      | :white_check_mark: |\n| Generate Entity Column Argument Support        |                    |\n| Generate Resource with Column Argument Support |                    |\n| More Atoms and Molecules                       | :white_check_mark: |\n| Default Styling                                | :white_check_mark: |\n| Theme Support                                  | :white_check_mark: |\n| Feature Tests                                  |                    |\n| Better Code Splitting                          |                    |\n| SSR Support                                    |                    |\n| Stack Template Support                         |                    |\n\n# How to contribute\n\n- Pull down repo\n- `yarn` in root\n- `yarn` in galileo\n- `yarn build` in helpers then, dalton, themes, cli\n- `yarn dev` to boot the application\n- create env file with the following in client\n\n```\nBROWSER=none\nREACT_APP_SERVER_HOST=http://caerus:4000\nSKIP_PREFLIGHT_CHECK=true\n```\n\n- create env file with the following in server\n\n```\nORIGINS=*\n```\n\n- run yarn build in packages/helpers\n- run yarn build in packages/dalton\n- run yarn build in packages/themes\n- run yarn build in packages/cli\n- link all of the packages\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaerusjs%2Fcaerus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaerusjs%2Fcaerus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaerusjs%2Fcaerus/lists"}