Skip to content

Commit

Permalink
Update readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
gugzkumar committed Jan 1, 2020
1 parent 34ccaeb commit ed52293
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
</p>
<br/>

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.
<br/><br/>
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)***
<br/><br/>
Here is my own instance of the application: https://cheet-sheet.gugz.net/
<br/><br/>
If you use the app and like it please leave a star. If you find bugs please submit an issue.

<h1>Features</h1>

Expand All @@ -33,14 +35,17 @@ Cheet Sheet is fairly simple to understand. Code snippets are are organized as s
width="700"
/>
</p>

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.

<p align="left">
<img
alt="Personal View Edit Mode"
src="/docs/images/Personal_View_Edit_Mode.png"
width="700"
/>
</p>

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.

<h2>Teams</h2>
Expand All @@ -51,6 +56,7 @@ You can enter Edit mode by manually toggling it on and off. When on, you can add
width="450"
/>
</p>

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.
<br/><br/>
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.
Expand Down
14 changes: 14 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -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
60 changes: 60 additions & 0 deletions docs/setup.md
Original file line number Diff line number Diff line change
@@ -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:<br/>
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.**<br/>
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.**<br/>
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.
<br/><br/>
https://nodejs.org/en/

0 comments on commit ed52293

Please sign in to comment.