Skip to content

Commit 1db6fe2

Browse files
committed
documentation: Updated README, USER_GUIDE
refactor: cleaned package.json files up. Resolved lint findings Improved linting and documentation too re: #46 re: #45
1 parent 8e5012a commit 1db6fe2

File tree

65 files changed

+6264
-19755
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+6264
-19755
lines changed

CODE_OF_CONDUCT.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## Code of Conduct
2+
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
3+
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
4+
[email protected] with any additional questions or comments.

CONTRIBUTING.md

+58-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,59 @@
1-
# Contributing
1+
# Contributing Guidelines
22

3-
There are no contribution guidelines yet as this is still under initial development.
4-
If you'd like to get involved, contact [email protected]
3+
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
4+
documentation, we greatly value feedback and contributions from our community.
5+
6+
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
7+
information to effectively respond to your bug report or contribution.
8+
9+
10+
## Reporting Bugs/Feature Requests
11+
12+
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
13+
14+
When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already
15+
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
16+
17+
* A reproducible test case or series of steps
18+
* The version of our code being used
19+
* Any modifications you've made relevant to the bug
20+
* Anything unusual about your environment or deployment
21+
22+
23+
## Contributing via Pull Requests
24+
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
25+
26+
1. You are working against the latest source on the *main* branch.
27+
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
28+
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
29+
30+
To send us a pull request, please:
31+
32+
1. Fork the repository.
33+
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
34+
3. Ensure local tests pass.
35+
4. Commit to your fork using clear commit messages.
36+
5. Send us a pull request, answering any default questions in the pull request interface.
37+
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
38+
39+
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
40+
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
41+
42+
43+
## Finding contributions to work on
44+
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.
45+
46+
47+
## Code of Conduct
48+
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
49+
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
50+
[email protected] with any additional questions or comments.
51+
52+
53+
## Security issue notifications
54+
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
55+
56+
57+
## Licensing
58+
59+
See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.

README.md

+86-21
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,98 @@
1-
# Generative AI Powered Newsletters
1+
# Generative AI Newsletter Application
22

3-
This goal of this project is to create a sample application that showcases AWS Serverless and GenAI technology to subscribe to news feeds and publications, accurately summarize the data and generate visually appealing newsletters for end-user consumption.
3+
The Generative AI Newsletter Application sample is a ready-to-use serverless solution designed to allow users to create rich newsletters automatically with content summaries that are AI-generated.
44

5-
The project is currently in the initial design phase with a PRFAQ in the works.
5+
The application offers users the ability to influence the generative AI prompts to customize how content is summarized such as the tone, intended audience, and more. Users can stylize the HTML newsletter, define how frequently newsletters are created and share the newsletters with others.
66

7-
This document will be filled out more as the project evolves.
7+
## Deploying the Solution
88

9-
### Some High-Level Thoughts for the Project
9+
The solution is developed using AWS Cloud Development Kit (CDK), TypeScript, & NodeJS
1010

11-
- Leverage serverless technology as much as possible, avoid provisioned resources like SageMaker endpoints, to reduce cost of running the sample
12-
- Leverage Bedrock for LLM for summarization, text embedding, etc.
13-
- Aim to provide methods to reduce hallucination and enable the user to validate information. This can be, for example, including links to sources
14-
- Develop a Front-End UI that leverages [Cloudscape](https://cloudscape.design) React framework
15-
- Aim to leverage newer technology that may not have samples, such as Bedrock Agents
16-
- Enable Newsletter subscriptions (users could get an emailed newsletter, a text with a link to a newsletter, a slack notification, etc)
11+
### Prerequisites
12+
* You will need an [AWS Account](https://repost.aws/knowledge-center/create-and-activate-aws-account).
1713

18-
## Deploying the Solution
14+
* Either an [IAM User](https://console.aws.amazon.com/iamv2/home?#/users/create) or [IAM Identity Center User](https://aws.amazon.com/iam/identity-center/) with `AdministratorAccess` policy granted to your user. *Not recommended for a production environment.*
15+
* [AWS CLI](https://aws.amazon.com/cli/) installed and configured to use with your AWS account.
16+
* [NodeJS 16 or 18](https://nodejs.org/en/download/) installed
17+
* The `ARN` of your [verified email identity](https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-email-manage-verify.html) that you will send newsletter emails from. You will also be asked to provide an email address that will be the sender, which must be associated with the verified email identity.
18+
19+
20+
### Deployment
21+
22+
1. Clone the repository
23+
```
24+
git clone https://gitlab.aws.dev/awsrudy/genai-newsletter/
25+
```
26+
1. Change directory into the cloned repository
27+
```
28+
cd genai-newsletter
29+
```
30+
1. Install the project dependencies & build the project
31+
```
32+
npm install && npm run build
33+
```
34+
1. Run the configuration wizard to create a deployment configuration file.
35+
```
36+
npm run config manage
37+
```
38+
The configuration wizard will generate a configuration file in `bin/config.json`. This file will be used during the deployment. Unless you need to change the configuration file, you do not need to run the configuration wizard for future deployments. If you change the **Stack Name**, it will cause a new deployment to occur.
39+
40+
1. [*Optional*] Bootstrap AWS CDK on the target AWS Account & Region.
41+
> Note: This is required if you have never used AWS CDK on this account and region combination. ([More information on CDK bootstrapping](https://docs.aws.amazon.com/cdk/latest/guide/cli.html#cli-bootstrap)).
42+
43+
1. Deploy the solution
44+
```
45+
npx cdk deploy
46+
```
47+
You can view the progress of your CDK deployment in the [CloudFormation console](https://console.aws.amazon.com/cloudformation/home) in the selected region.
48+
49+
1. Once the deployment is complete, CDK should show outputs that resemble the following. (Note: terms in brackets represents a generated/dynamic value)
50+
```
51+
...
52+
Outputs:
53+
[stackName].AppLink = https://dxxxxxxxxxxxxx.cloudfront.net/
54+
[stackName].UserPoolLink = https://[region].console.aws.amazon.com/cognito/v2/idp/user-pools/xxxxx_XXXXX/users?region=[region]
55+
...
56+
```
57+
If you need these outputs again, you can view the deployment in the [CloudFormation console](https://console.aws.amazon.com/cloudformation/home) by navigating to the deployed stack and visiting the "Outputs" tab.
58+
59+
### Creating Users
60+
61+
User accounts for the application are managed using [Amazon Cognito](https://aws.amazon.com/cognito/).
62+
63+
1. Navigate to the Amazon Cognito in the AWS Console and select the User Pool deployed with the solution. Alternatively, you can navigate directly to the user pool by navigating to the `UserPoolLink` provided in the CDK output/CloudFormation output.
64+
1. In the **Users** box, click the **Create user** button.
65+
1. Complete the user information form.
66+
It is recommended to select "Send an email invitation".
67+
The Email address is required.
68+
1. Once the form is complete, click the **Create user** button.
69+
70+
### First Time Login
71+
72+
1. Navigate to the `AppLink` URL provided in the CDK or CloudFormation output. This is the main URL for the application.
73+
1. Login with the email and temporary password.
74+
1. If login is successful, you will be asked to provide your name and update your password.
75+
1. After you complete the name and password update, you will be logged into the application and can get started.
76+
77+
78+
### User Guide
79+
To learn how to start ingesting data with Data Feeds and creating dynamic Newsletters, visit the [User Guide](./USER_GUIDE.md).
80+
81+
## Author
82+
83+
* [Addie Rudy](https://www.linkedin.com/in/addierudy/)
1984

20-
The following steps will guide you through deploying the CDK Application to your environment.
85+
## Threat Model
2186

22-
1. In your project root folder, install package dependencies: `npm install --save-dev`
23-
2. After all packages are installed, you will need to build the solution by running `npm run build`. This will trigger amplify codegen to create the API files from the `schema.graphql` file. If generated files exist, they will simply be regenerated. Once the generation is complete, `tsc` will compile the typescript project.
24-
3. Run the configuration CLI to setup the necessary CDK context file. To run the configuration creation CLI, run `npm run config create`. This will will you through setting up your configuration. If a config exists, you can optionally update values. If you'd like to view the existing config, you can run `npm run config show`
25-
4. Deploy the stack to AWS. `npm run deploy`
87+
Review the threat model developed for the solution [here](documentation/ThreatModel.md). Additionally, you can download the [Threat Model JSON](documentation/GenAINewsletter_ThreatComposer.json) and view the visualized threat model by importing the JSON into [Threat Composer](https://awslabs.github.io/threat-composer/workspaces/default/dashboard).
2688

27-
### Project Leads
89+
## License
2890

29-
This project is currently lead by Addie Rudy ([awsrudy@](https://phonetool.amazon.com/users/awsrudy)) and Pete Conrad ([peteconr@](https://phonetool.amazon.com/users/peteconr))
91+
This library is licensed under the MIT-0 License. See the LICENSE file.
3092

31-
### Additional Documentation
93+
## Additional Resources
3294

33-
To find additional documentation, please visit the `documentation/` directory from the root of the repo.
95+
- [Changelog](CHANGELOG.md)
96+
- [License](LICENSE)
97+
- [Code of Content](CODE_OF_CONDUCT.md)
98+
- [Contributing](CONTRIBUTING.md)

USER_GUIDE.md

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# **AWS Serverless Feed Summarizer and Newsletter Solution**
2+
3+
## Table of Contents
4+
5+
- [User Guide](#user-guide)
6+
- [Setting up Data Feeds](#setting-up-data-feeds)
7+
- [Subscribing to Newsletters](#subscribing-to-newsletters)
8+
- [Flagging Bad Data](#flagging-bad-data)
9+
- [Deleting Data](#deleting-data)
10+
11+
## User Guide
12+
13+
### Setting up Data Feeds
14+
Data Feeds automate ingesting data and summarizing the content for use within Newsletters. All Newsletters will require at least one Data Feed. Currently, only RSS & ATOM feeds are supported Data Feed types.
15+
16+
To create your data feed:
17+
18+
1. Click **Create Data Feed** from the side panel menu.
19+
20+
1. Complete the details of the data feed form including a title, optional description, URL of the ATOM or RSS feed.
21+
22+
1. The **Summarization Prompt** instructs the Data Feed ingestion process on how to summarize the articles it consumes. Because this makes Data Feed summaries unique, you can create multiple Data Feeds for the same source and prompt each one to summarize differently.
23+
![Data Feed Create](./documentation/DataFeed-Create-Image.png)
24+
25+
1. Click **Add** to create the Data Feed.
26+
You will be navigated to the Data Feed Details page.
27+
28+
Once a Data Feed is created, the first run of ingestion will begin. Generally within 5 minutes, all articles currently on the RSS feed will have been ingested and summarized. You can revist the Data Feed page or simply refresh the page if you haven't navigated away.
29+
30+
### Creating Newsletters
31+
32+
1. To create a newsletter, go to the Newsletters Dashboard and click **Create Newsletter**.
33+
1. In the Newsletter Wizard, completed the newsletter details and click **Next** to proceed.
34+
![Newsletter Create Wizard](./documentation/Newsletter-Create-Image.png)
35+
1. Add one or more data feeds to your newsletter. If you don't have any data feeds, you will need to create at least one first. See [Setting up Data Feeds](#setting-up-data-feeds).
36+
![Newsletter Create Wizard](./documentation/Newsletter-Create-AddDataFeeds-Image.png)
37+
1. *Optionally* add a Newsletter Introduction Prompt. This prompt will be used to influence how the each Newsletter publication's introduction will be written.
38+
![Newsletter Create Wizard - Prompt](./documentation/Newsletter-Create-Prompt-Image.png)
39+
1. *Optionally* customize the style of the newsletter to have a unique look and feel. Click the **Show Preview** button to live preview a sample newsletter with your custom style.
40+
![Newsletter Create Wizard - Style](./documentation/Newsletter-Create-Style-Image.png)
41+
1. Finally, review the newsletter settings to confirm everything is correct. Then click the **Create Newsletter** button to create your newsletter.
42+
![Newsletter Create Wizard - Style](./documentation/Newsletter-Create-Review-Image.png)
43+
1. Once the newsletter is successfully created, you will be taken to the Newsletter detail page. By default **you are not subscribed** to the newly created Newsletter.
44+
![Newsletter Details](./documentation/Newsletter-Details-Image.png)
45+
46+
47+
### Subscribing to Newsletters
48+
49+
Subscribing to a newsletter allows you to receive the newsletter automatically in your email on the set schedule. Newsletters, by default, have no subscribes, including the newsletter owner. If a Newsletter has no subscribes, the Newsletter will still be generated and viewable in the application, but won't be emailed out.
50+
51+
To subscribe to a Newsletter:
52+
53+
1. Go to the Newsletter Dashboard. The Dashbaord shows newsletters that you have access to, including your private and non-private newsletters, and newsletters created by others that are non-private.
54+
1. *Optionally,* you can use the *Filter Newsletters* search box to filter the table results.
55+
1. Click the Newsletter Name of the Newsletter you'd like to view or subscribe to.
56+
1. Below the Newsletter details, the number of subscribes and your current suibscription status will be shown. If you are not subscribed, you can click the **Subscribe** button. If you are already subscribed, the button will show **Unsubscribe**.
57+
58+
*All emails include a footer unique to the recipient that allows them to unsubscribe from the newsletter without having to login to the application*
59+
60+
### Viewing My Subscriptions
61+
To view Newsletters that you are currently subscribed to, simply click **My Newsletter Subscriptions** from the side panel. This will show you all Newsletters that you are currently subscribed to.
62+
> *Note: If a Newsletter owner decides to make their Newsletter private, it will no longer be visible to you. In this case, you will see a notice on the **My Subscriptions Page** indicating how many Newsletters are no longer visible.*
63+
64+
From the page, click on the desired Newsletter to view the details and past publications.
65+
66+
### Unsubscribing From a Newsletter
67+
To unsubscribe from a Newsletter, simply navigate to the Newsletter in the application and click the **Unsubscribe** button.
68+
69+
Alternatively, users can unsubscribe from any Newsletter using the **Unsubscribe from this newsletter** link in the footer of all Newsletter emails. This is a unique-to-the-user link.
70+
71+
> *Note: In the event that a newsletter is no longer visible, but you are still subscribed, the unsubscribe link in the email is the only way to unsubscribe. If you unsubscribe from a Newsletter you no can view, you will not be able to resubscribe to the Newsletter unless the owner updates the privacy.*
72+
73+
### Flagging Bad Data
74+
Occassionally, a summary may not be generated in a way that is deemed accurate. To create transparency that data has been deemed inaccurate, users can opt to flag a summary. Below are the ways to flag data.
75+
76+
- Data Feed Article Summary
77+
- From the Data Feed Details page, click the flag on the row of the article summary that is incorrect
78+
- From the Newsletter Details page, when looking at generated Newsletter, if the "Flag this summary" link is available under an article, you can click the link to flag the article summary.This is a deep-link directly to the Data Feed detail page that will mark the article summary as flagged.
79+
- From the Newsletter email a user receives. Below the summary, users can select "Flag this summary". This is a deep-link directly to the Data Feed detail page that will mark the article summary as flagged.
80+
81+
- Newsletter Intro Summary
82+
- Flagging not yet available
83+
84+
85+
### Deleting Data
86+
Deleting newsletters, feeds, articles, summaries, etc. does not natively exist in the solution at this point. If you require data to be removal, please contact us for support.
87+
117 KB
Loading
Loading
92.4 KB
Loading
95.8 KB
Loading
Loading
Loading
103 KB
Loading

documentation/newsletter-data-schemas.md

-68
This file was deleted.

lib/api/functions/package-lock.json

+1-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)