Giter VIP home page Giter VIP logo

resumatic's Introduction

resumatic

Resumes that wins bids, or CVs ¯_(ツ)_/¯

Project

This project is constructed used AWS native and managed services. They are deployed using the Serverless Framework. The current deployment creates the following architecture diagram. There are a few resources such as IAM Role, policies and security groups that are not represented on this diagram.

Usage

CLI tools and scripts use the AWS SDK and CLI. Access Keys, secrets and regions will need to be configured prior to running any of the tools or deploying agents.

Environment Variables

We recommend using Direnv for managing environment variables. A stage which serverless consumes is also used in the utility commands as well. For an example environment configuration see below.

export STAGE=dev
export DB_PORT=5432
export DB_NAME=postgres
export DB_USERNAME=test
export DB_PASSWORD=password-to-change
export DB_SCHEMA=listings
export DB_ANON_ROLE=anon
export AWS_REGION=ap-southeast-2
# For login: (Sean's Ids)
export REACT_APP_AWS_REGION="ap-southeast-2"
export REACT_APP_COGNITO_IDENTITY_ID="unused"
export REACT_APP_COGNITO_USER_POOL_ID="ap-southeast-2_9y53D9NEU"
export REACT_APP_COGNITO_WEB_CLIENT_ID="3340vaq49dc2d9alrn77k6gaa"

These variables can also be passed in as command-line arguments to Serverless, e.g.

npm run sls deploy -- -s some_stage --DB_PORT 1234 --DB_PASSWORD aBetterPassword

Deploying

YOU NEED NODE 14

To deploy everything, run:

npm install
cd cli-tools
npm install
npm run build
cd ..
npm run sls deploy -- -s $STAGE
npm run sls client deploy

Testing

You will need to generate a user. From can be done from a command line tool from the root directory.

./tools add-user --username <Username> --password <Password> --email <Email> --role <standard/admin>

The user will need to have either standard or admin for the role types. These are what align with the postgres roles.

To get a token from that user to use with the api requests use the command line tool.

./tools get-token --username <Username> --password <Password>

To change the role a user has in cognito use the following command.

./tools change-user-role --username <Username> --role <standard/admin>

Postgrest Config

Internally, the lambda handler generates a PostgREST configuration. If you want to test outside the AWS lambda environment, the generated configuration needs to - at a minimum - have the following data:

db-uri = "postgres://<DB_USERNAME>:<DB_PASSWORD>@<HOST>:<DB_PORT>/<DB_NAME>"
db-schema = "<DB_SCHEMA>"
db-anon-role = "<DB_ANON_ROLE>"

Note the double quotes around string variables; these are important. For the full list of configuration variables you can set, see the PostgREST documentation.

Utility Commands

Some commands are available to make background tasks easier.

See Commands Readme for how to use them.

Add permission to role to access table

GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA resumatic TO admin;
GRANT ALL ON resumatic.resume TO admin;
GRANT INSERT ON resumatic.resume TO admin;
GRANT SELECT ON resumatic.resume TO admin;

resumatic's People

Contributors

kn-ad avatar shouvsarker avatar github-actions[bot] avatar

Stargazers

 avatar

Watchers

David Balmain avatar Daniel Spasojevic avatar James Cloos avatar Rory Stokes avatar Haolin Jiang avatar Sean Dawson avatar

resumatic's Issues

[Security] Workflow on-push-generate-plantuml.yml is using vulnerable action actions/checkout

The workflow on-push-generate-plantuml.yml is referencing action actions/checkout using references v1. However this reference is missing the commit a6747255bd19d7a757dbdda8c654a9f84db19839 which may contain fix to the some vulnerability.
The vulnerability fix that is missing by actions version could be related to:
(1) CVE fix
(2) upgrade of vulnerable dependency
(3) fix to secret leak and others.
Please consider to update the reference to the action.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.