From ed522933f61b37e53f7a3366b2906fc89d2f99f6 Mon Sep 17 00:00:00 2001
From: Gagan Tunuguntla
Date: Wed, 1 Jan 2020 02:54:10 -0500
Subject: [PATCH] Update readmes
---
README.md | 10 +++++--
docs/getting-started.md | 14 ++++++++++
docs/setup.md | 60 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 82 insertions(+), 2 deletions(-)
create mode 100644 docs/getting-started.md
create mode 100644 docs/setup.md
diff --git a/README.md b/README.md
index e7b8367..7eb92c1 100644
--- a/README.md
+++ b/README.md
@@ -7,11 +7,13 @@
-Cheet Sheet is an open source Content management system for developers and development teams to Create, Edit and Share code snippets. This accelerates development by having a centralized place where one can see how they or teammates have solved common problems in the past.
+Cheet Sheet is an open source Content Management System for developers and development teams to Create, Edit and Share code snippets. This accelerates software engineering by having a centralized place where one can see how they or teammates have solved common problems in the past.
-Setting up Cheet Sheet for you or your organization is simple. All you need is Docker, node and an AWS account. It's 100% Serverless so your costs and infrastructure will scale and grow with minimal effort on your part.
+Setting up Cheet Sheet for you or your organization is simple. All you need is Docker, node and an AWS account. It's 100% Serverless so your costs and infrastructure will scale and grow with minimal effort on your part. ***Read [Getting Started](/docs/getting-started.md)***
Here is my own instance of the application: https://cheet-sheet.gugz.net/
+
+If you use the app and like it please leave a star. If you find bugs please submit an issue.
Features
@@ -33,7 +35,9 @@ Cheet Sheet is fairly simple to understand. Code snippets are are organized as s
width="700"
/>
+
If you sign up for an account and log in, you will have access to your own Personal Cheet Sheet workspace. AWS Cognito handles authentication for this app. Sheets in your personal workspace are only accessible to you. They are completely separate from the ones in the Public View. As a logged in user you have to ability to Create, Modify and Delete sheets in your personal workspace.
+
+
You can enter Edit mode by manually toggling it on and off. When on, you can add and modify index cards. All changes to your sheet are transient and won't be permanent unless you save. Refreshing the page, moving between sheets, or workspaces will cause you to loose all progress so be careful.
Teams
@@ -51,6 +56,7 @@ You can enter Edit mode by manually toggling it on and off. When on, you can add
width="450"
/>
+
Team workspaces are also available for logged in users. Everything you can do on a Personal workspace applies here except that this workspace can be viewed and edited by anyone who is on your team. To create a new workspace all you need to do is simply make a group in the Cognito user pool and add users to it. The name of the group is the name of team.
The sheets and index cards that are viewable by the public, are part of the Public Workspace. For a user to modify the sheets in this workspace they must be added to the `admin` user group in cognito.
diff --git a/docs/getting-started.md b/docs/getting-started.md
new file mode 100644
index 0000000..546a151
--- /dev/null
+++ b/docs/getting-started.md
@@ -0,0 +1,14 @@
+# Getting Started
+
+This document and the following ones will help you set up Cheet Sheet.
+
+### Setup
+Click [here](/docs/setup.md) to
+
+### Run Locally
+
+### Deploy to AWS
+
+### Architecture Overview
+
+### Environment Variable Glossary
diff --git a/docs/setup.md b/docs/setup.md
new file mode 100644
index 0000000..25985dc
--- /dev/null
+++ b/docs/setup.md
@@ -0,0 +1,60 @@
+# Setup and Preparation
+
+## Repo
+First fork or clone this repo on your own Github account. I strongly suggest you use github since it will be easy to automate code deployments through Circle CI.
+
+## Docker
+Install Docker for Desktop and Docker Compose for your machine:
+- https://www.docker.com/
+
+## AWS
+You will need to have an AWS IAM account, with permissions to the following services:
+
+- Cloudformation
+- S3
+- API Gateway
+- Lambda
+- Cognito
+- Cloudwatch
+- Cloudfront
+- Route53
+- IAM *create roles and policies for lambda*
+
+Next you will need to have or create the following resources.
+
+#### Lambda Layer
+Have a **Python 3.7** Lambda Layer you can use with the following libraries:
+
+- pyjwt==1.7.1
+- cryptography==2.8
+
+If you need help creating one look at this repo here:
+https://github.com/gugzkumar/my-python-lambda-layers
+
+
+#### Route53 Domain
+**You can skip this if you only want to run the app locally on your machine.**
+Route53 is Amazon's DNS Webservice. You can buy domains for pretty cheap here. Cheet Sheet is setup, to integrate with Route53 so it is your best option. Be prepared to have a subdomain that you are ready to use. We will deploy the app to use the following routes:
+
+- UI: https://`{SUB_DOMAIN}`.`{DOMAIN}`
+- API: https://`{SUB_DOMAIN}`.api.`{DOMAIN}`
+
+For example if your domain is *mydomain.com* and the subdomain is *cheet-sheet*, you will use the following routes:
+
+- https://cheet-sheet.mydomain.com
+- https://cheet-sheet.api.mydomain.com
+
+#### ACM Certificate
+**You can skip this if you only want to run the app locally on your machine.**
+Set up an SSL Certificate throw through AWS' Certificate Manager. You will want to create a single certificate has the following domains:
+
+- https://`{SUB_DOMAIN}`.`{DOMAIN}`
+- https://`{SUB_DOMAIN}`.api.`{DOMAIN}`
+
+**Tip:** I like to use wild cards for my domain so I can use the same certificate for multiple environments (dev, staging, prod, etc.)
+
+
+## Setup Utility CLI
+To streamline the creation of configuration variables and files we have some cli tools built with Node JS. Download node if you do not have it. Then from the the `.utils` folder run `npm install` to install the cli. Run `node main.js --help` to confirm the utility cli works.
+
+https://nodejs.org/en/