{"id":15233869,"url":"https://github.com/codeandpepper/janush","last_synced_at":"2025-07-05T09:39:29.352Z","repository":{"id":36959884,"uuid":"403003301","full_name":"codeandpepper/janush","owner":"codeandpepper","description":"Set up a modern codebase for cloud-native web app with authentication features by running one command","archived":false,"fork":false,"pushed_at":"2023-03-15T02:26:47.000Z","size":18191,"stargazers_count":14,"open_issues_count":56,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T07:21:54.747Z","etag":null,"topics":["apollo-client","aws","aws-cdk","cognito","cypress","docusaurus","jest","lambda","material-ui","nodejs","playwright","react","s3","schematics","typescript"],"latest_commit_sha":null,"homepage":"https://janush.dev","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/codeandpepper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2021-09-04T08:22:18.000Z","updated_at":"2023-07-03T13:55:41.000Z","dependencies_parsed_at":"2022-09-03T19:00:15.790Z","dependency_job_id":null,"html_url":"https://github.com/codeandpepper/janush","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeandpepper%2Fjanush","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeandpepper%2Fjanush/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeandpepper%2Fjanush/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeandpepper%2Fjanush/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeandpepper","download_url":"https://codeload.github.com/codeandpepper/janush/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248166925,"owners_count":21058481,"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":["apollo-client","aws","aws-cdk","cognito","cypress","docusaurus","jest","lambda","material-ui","nodejs","playwright","react","s3","schematics","typescript"],"created_at":"2024-09-29T06:08:42.693Z","updated_at":"2025-04-10T06:11:51.340Z","avatar_url":"https://github.com/codeandpepper.png","language":"TypeScript","readme":" Janush ![License: MIT](https://img.shields.io/badge/License-MIT-green.svg) [![Test application generation](https://github.com/codeandpepper/janush/actions/workflows/main.yml/badge.svg)](https://github.com/codeandpepper/janush/actions/workflows/main.yml)\n# Janush\n\n## Quick Overview\nJanush is web based application for rapid setup and configure application with predefined sections:\n    - Security\n    - AWS integration\n    - Basic component creation\n\n#### Technology\n\nWe are using [serverless services on AWS](https://aws.amazon.com/serverless/#Serverless_Services_on_AWS) (Amazon Web Services) and TypeScript in all apects of the project, starting from React frontend, Node.js (AWS Lambda) backend and IaC (Infrastructure as Code) using AWS CDK v2 (Cloud Development Kit).\n\n\n### Requirements\nPackage | Version\n--- | ---\nNode.js | 16.x.x\n\n### Install Janush CLI\nYou can install the project directly with the following command:\n\n```sh\nnpm install -g @codeandpepper/janush\n```\n\nThe application will be available under the command `janush`\n\n### Local development\n\nCurrently, to generate a project, you must first  run the `npm install` command, after that `npm run build` and \nfinally `npm link`. After going through these steps you'll be able to generate project in\nevery directory\n\n```sh\nnpm install -g @angular-devkit/schematics-cli\n\nnpm install\nnpm run build\nnpm link\njanush --name=fancy-app --types={web,cloud}\n```\n\n#### Linking to local npm repositories\n\nIt's possible to link a package into your local npm packages by running:\n```sh\nnpm run build\nnpm link\n```\nand then easily use it:\n```\njanush --name=fancy-app --types={web,cloud}\n```\n\n Above command generated new application inside *janush* app folder\n\n ![generated application](https://janush-docs.s3.eu-central-1.amazonaws.com/images/generated-application.jpg)\n\n ## Steps to run application\n - Go to web or cloud folder inside generated application\n - execute `` npm ``\n - run `` npm start ``\n  - It may happend that `` npm start `` will throw error:\n  ```\n\n    To fix the dependency tree, try following the steps below in the exact order:\n\n    1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.\n    2. Delete node_modules in your project folder.\n    3. Remove \"babel-jest\" from dependencies and/or devDependencies in the package.json file in your project folder.\n    4. Run npm install or yarn, depending on the package manager you use.\n\n    In most cases, this should be enough to fix the problem.\n    If this has not helped, there are a few other things you can try:\n\n    1. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.\n        This may help because npm has known issues with package hoisting which may get resolved in future versions.\n\n    2. Check if /Users/[userdir]/janush/node_modules/babel-jest is outside your project directory.\n        For example, you might have accidentally installed something in your home folder.\n\n    3. Try running npm ls babel-jest in your project folder.\n        This will tell you which other package (apart from the expected react-scripts) installed babel-jest.\n\n    If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.\n    That would permanently disable this preflight check in case you want to proceed anyway.\n\n  ```\n\nError above can be resolve by creating **.env** file. execute `` code .env `` and paste **SKIP_PREFLIGHT_CHECK=true** then hit save\n\n`` npm start ``  should automatically open browser with generated application. Otherwise app by default is generated under *http://localhost:3000*\n\n![app started](https://janush-docs.s3.eu-central-1.amazonaws.com/images/landing-page.jpg)\n\nLoggin and sign up doesn't works by default - some configuration need to be completed [AWS Setup](#aws)\n\n# Schematics learning resources\n\nhttps://tomastrajan.medium.com/total-guide-to-custom-angular-schematics-5c50cf90cdb4\n# Debug schematics\n\nRun command\n``` node --inspect-brk $(which schematics) .:app --name=test123 --debug=false  ```\n1. Open chrome://inspect (for Chrome)\n2. Click on *Open deicated DevTools for Node*\n   ![DevTools](https://janush-docs.s3.eu-central-1.amazonaws.com/images/debug-devtools-1.jpg)\n3. Debugging panel is accesible\n![DevTools](https://janush-docs.s3.eu-central-1.amazonaws.com/images/debug-devtools-2.jpg)\n# Test e2e\n\n### `` npm run test ``\n\n If **babel-jest** is missing error is generated:\n \n```\n    The react-scripts package provided by Create React App requires a dependency:\n\n    \"babel-jest\": \"^26.6.0\"\n```\n\n\nIt may happend that error above is visible. It's indicating that babel is not installed, for fix this problem \n** npm install babel-jest@26.6.0 -g **\n\n# AWS\n## Setup AWS for Janush app\n## Requirements\n### [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)\n\n### [CDK](https://www.npmjs.com/package/aws-cdk)\n\nFirst install [AWS CDK v2](https://www.npmjs.com/package/aws-cdk)\n\n### Install the AWS CDK\nInstall the AWS CDK Toolkit globally using the following Node Package Manager command.\n\nnpm install -g aws-cdk\n### Run the following command to verify correct installation and print the version number of the AWS CDK.\n\ncdk --version\n\nExample output: `` 8.3.1 ``\n\nCommand to install **aws-cdk**\n\n`` npm i -g aws-cdk ``\n\n### AWS requries configuration and setup, to do this run following command:\nInitially you must configure your workstation with your AWS credentials and an AWS region If you have the AWS CLI installed, the easiest way to satisfy this requirement is issue the following command:\n\n\n`` aws configure `` (AWS CLI should be installed globally)\n\nThen:\n\n``` npm run cdk bootstrap ```\n\n And finally\n\n ``` npm run cdk deploy ```\n\n\n To connect newly generated app, following data need to be update inside\n\n```\nimport Amplify, { Auth } from \"aws-amplify\";\n\nexport const AUTH_CONFIG = {\n  Auth: {\n    identityPoolId: ****************************,\n    region: region,\n    userPoolId: **************************,\n    userPoolWebClientId: **************,\n  },\n};\n\nexport const configureAws = (): void =\u003e {\n  Amplify.Logger.LOG_LEVEL = \"DEBUG\";\n\n  try {\n    Auth.configure(AUTH_CONFIG);\n  } catch (err) {\n    console.error(\n      \"A problem with an authentication configuration occurred:\",\n      err\n    );\n  }\n};\n\n```\n\n## Get identityPoolId\n\n`` aws cognito-identity list-identity-pools --max-results 20 ``\n\n\nIt will return data with identity pool Id, and identity pool name. **identityPoolId** need to replaced in here  `` identityPoolId: eu-central-1:d6f28bfe-6d09-xxxxxxxxxxxxxxx ``\n\n## Get region\n\n`` aws configure get region ``\n\n ![Getting identity id](https://janush-docs.s3.eu-central-1.amazonaws.com/images/get-region.gif)\n\n## Get user pool\n\nUser pool can be found under Pool section on AWS portal\n\n![user pool](https://janush-docs.s3.eu-central-1.amazonaws.com/images/user-pool.jpg)\n\n## Get web client pool id\n\nWeb client Id is under App Settings inside cognito settings\n\n![user pool](https://janush-docs.s3.eu-central-1.amazonaws.com/images/app-identity.jpg)\n\n\nMore on AWS configuration can be cound in here: [AWS Configuration](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html)\n\n## What’s Included?\n\nYour environment will have everything you need to build a modern single-page React app with built-in Identity/AuthN/AuthZ features.\n\n## Contributing\n\nWe'd love to have your helping hand on `janush`! See [CONTRIBUTING.md](https://github.com/codeandpepper/janush/blob/main/CONTRIBUTING.md) for more information on what we're looking for and how to get started.\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n\nCopyright (c) 2021-2022, [Code \u0026 Pepper](https://codeandpepper.com/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeandpepper%2Fjanush","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeandpepper%2Fjanush","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeandpepper%2Fjanush/lists"}