aws-amplify / aws-amplify/amplify-cli
Folder Organization Suggestions
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
## Request
Improve the organization of source code and amplify generated files.
## Issue
Currently when you generate a project with the Amplify CLI, it can be very difficult to follow the code because it mixes source code, dependencies, configuration (often generated) and built files. Additionally, when you have deeply nested projects managing the node_modules and nested scripts are difficult.
## Solutions
[Yarn Packages](https://yarnpkg.com/lang/en/docs/workspaces/) make organizing this type of things really easy. I have a project that I built with the AWS CDK and Yarn Workspaces and the end result was very clean. The project is broke down into a few different packages:
- `api` - lambda + api gateway
- `aws` - CDK generation code
- `web` - create react app
- `notification` - bot notification lambda
- `aggregator` - data aggregation lambda

The organization of the generated code is nicely contained in the `cdk.out` folder and all my source code just is consumed by the `aws` project here. Now if you compare this to what one of my AWS Amplify projects looks like, its very difficult to understand...

The Firebase examples aren't as 'clean' as the workspaces but they are still easier to follow. Here is one example: https://github.com/firebase/friendlychat-web
Contributor guide
Assessment
This issue has not been assessed yet.