{"id":13719568,"url":"https://github.com/simonireilly/funk-stack","last_synced_at":"2025-05-07T11:32:20.147Z","repository":{"id":37524964,"uuid":"479804991","full_name":"simonireilly/funk-stack","owner":"simonireilly","description":"The Remix Stack for deploying to AWS with DynamoDB, authentication, testing, linting, formatting, etc.","archived":false,"fork":true,"pushed_at":"2022-05-21T18:09:42.000Z","size":4027,"stargazers_count":9,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-14T09:38:59.261Z","etag":null,"topics":["aws-cdk","remix-stack"],"latest_commit_sha":null,"homepage":"https://remix.run/stacks","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"remix-run/grunge-stack","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonireilly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-09T18:00:43.000Z","updated_at":"2023-07-27T12:08:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/simonireilly/funk-stack","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/simonireilly%2Ffunk-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonireilly%2Ffunk-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonireilly%2Ffunk-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonireilly%2Ffunk-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonireilly","download_url":"https://codeload.github.com/simonireilly/funk-stack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252869107,"owners_count":21816979,"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":["aws-cdk","remix-stack"],"created_at":"2024-08-03T01:00:51.758Z","updated_at":"2025-05-07T11:32:19.196Z","avatar_url":"https://github.com/simonireilly.png","language":"TypeScript","readme":"# Funk Stack\n\n![Placeholder image of the funk stack web page](funk-stack-placeholder-image.png)\n\n- [Funk Stack](#funk-stack)\n  - [What's in the stack](#whats-in-the-stack)\n  - [Architecture](#architecture)\n  - [Development](#development)\n    - [Relevant code](#relevant-code)\n  - [Deployment](#deployment)\n  - [GitHub Actions](#github-actions)\n  - [Testing](#testing)\n    - [Cypress (WIP)](#cypress-wip)\n    - [Vitest](#vitest)\n    - [Type Checking](#type-checking)\n    - [Linting](#linting)\n    - [Formatting](#formatting)\n\nLearn more about [Remix Stacks](https://remix.run/stacks).\n\n```\nnpx create-remix --template simonireilly/funk-stack\n```\n\n## What's in the stack\n\n- [AWS deployment](https://aws.com) with [AWS CDK](https://docs.aws.amazon.com/cdk/api/v2/)\n- Production-ready [DynamoDB Database](https://aws.amazon.com/dynamodb/)\n- [GitHub Actions](https://github.com/features/actions) for deploy on merge to production and staging environments\n- Email/Password Authentication with [cookie-based sessions](https://remix.run/docs/en/v1/api/remix#createcookiesessionstorage)\n- DynamoDB access via [`aws-sdk`](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/welcome.html)\n- Styling with [Tailwind](https://tailwindcss.com/)\n- End-to-end testing with [Cypress](https://cypress.io)\n- Local third party request mocking with [MSW](https://mswjs.io)\n- Unit testing with [Vitest](https://vitest.dev) and [Testing Library](https://testing-library.com)\n- Code formatting with [Prettier](https://prettier.io)\n- Linting with [ESLint](https://eslint.org)\n- Static Types with [TypeScript](https://typescriptlang.org)\n\nNot a fan of bits of the stack? Fork it, change it, and use `npx create-remix --template your/repo`! Make it your own.\n\n## Architecture\n\nThe diagram is provided by [cdk-dia](https://www.npmjs.com/package/cdk-dia).\n\n![The aws-sdk infrastructure diagram for what is deployed by the funk stack](./diagram.png)\n\n## Development\n\nYou need to have valid AWS credentials to run dev in live reload mode\n\n- Start dev server:\n\n```sh\nyarn dev\n```\n\nThis starts your app in development mode, which hot reloads changes to AWS.\n\n### Relevant code\n\nThis is a pretty simple note-taking app, but it's a good example of how you can build a full stack app with aws-cdk and Remix. The main functionality is creating users, logging in and out, and creating and deleting notes.\n\n- creating users, and logging in and out [./app/models/user.server.ts](./app/models/user.server.ts)\n- user sessions, and verifying them [./app/session.server.ts](./app/session.server.ts)\n- creating, and deleting notes [./app/models/note.server.ts](./app/models/note.server.ts)\n\n## Deployment\n\nDeployments to AWS are managed by the AWS CDK.\n\n```\nyarn cdk deploy\n```\n\n## GitHub Actions\n\nThe github actions are based on those blogged here:\n\n\u003e [Secure AWS-CDK deployments with GitHub Actions](https://dev.to/simonireilly/secure-aws-cdk-deployments-with-github-actions-3jfk)\n\n## Testing\n\n### Cypress (WIP)\n\nWe use Cypress for our End-to-End tests in this project. You'll find those in the `cypress` directory. As you make changes, add to an existing file or create a new file in the `cypress/e2e` directory to test your changes.\n\nWe use [`@testing-library/cypress`](https://testing-library.com/cypress) for selecting elements on the page semantically.\n\nTo run these tests in development, run `npm run test:e2e:dev` which will start the dev server for the app as well as the Cypress client. Make sure the database is running in docker as described above.\n\nWe have a utility for testing authenticated features without having to go through the login flow:\n\n```ts\ncy.login();\n// you are now logged in as a new user\n```\n\nWe also have a utility to auto-delete the user at the end of your test. Just make sure to add this in each test file:\n\n```ts\nafterEach(() =\u003e {\n  cy.cleanupUser();\n});\n```\n\nThat way, we can keep your local db clean and keep your tests isolated from one another.\n\n### Vitest\n\nFor lower level tests of utilities and individual components, we use `vitest`. We have DOM-specific assertion helpers via [`@testing-library/jest-dom`](https://testing-library.com/jest-dom).\n\n### Type Checking\n\nThis project uses TypeScript. It's recommended to get TypeScript set up for your editor to get a really great in-editor experience with type checking and auto-complete. To run type checking across the whole project, run `npm run typecheck`.\n\n### Linting\n\nThis project uses ESLint for linting. That is configured in `.eslintrc.js`.\n\n### Formatting\n\nWe use [Prettier](https://prettier.io/) for auto-formatting in this project. It's recommended to install an editor plugin (like the [VSCode Prettier plugin](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)) to get auto-formatting on save. There's also a `npm run format` script you can run to format all files in the project.\n","funding_links":[],"categories":["Starter"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonireilly%2Ffunk-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonireilly%2Ffunk-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonireilly%2Ffunk-stack/lists"}