Skip to content

Latest commit

 

History

History
121 lines (67 loc) · 4.84 KB

saythanks_development.md

File metadata and controls

121 lines (67 loc) · 4.84 KB

Development Environment Setup Guide for Windows OS

  1. Go to run (Windows + R) and type appwiz.cpl

    C:\Users\dinesh.p\Pictures\My Screen Shots\Screen Shot 04-16-21 at 12.39 PM.PNG

  2. Click Turn windows features on or off in the left hand side menu

  3. Check “Windows subsystem for Linux” and click OK. After the successful installation restart your PC.

    C:\Users\dinesh.p\Pictures\My Screen Shots\Screen Shot 04-16-21 at 12.39 PM 001.PNG

  4. Go to windows store and search for Ubuntu 18 and install

  5. During first run on Ubuntu, configure the user name and password

  • Execute below commands:
    • sudo apt update
    • sudo apt install libpq-dev python3-dev (Project needs python version <= 3.6, which is default for Ubuntu 18)
    • sudo apt install python3-pip
  1. Get the repository by using below command:

    git clone https://github.com/BlitzKraft/saythanks.io.git

  2. Saythanks uses pipenv as dependency managment tool. You can read more about pipenv here. Install pipenv using pip. Install the required packages by using below command:

    pipenv install
    

    Note: If any error is faced in requirements.txt installation, Run the below command:

    python3 -m pip install --upgrade pip python3 -m pip install --upgrade pillow

  3. Go to Auth0 login website - https://auth0.com/docs/login

  1. Click Applications in the left hand side menu - > Applications - > Create Application - > Regular Web Applications -> Create

  2. Open “Saythanks” application (Regular web applications) to get the below keys:

  3. And add Call back URL as below (in the same page) and click “Save”:

  1. Click APIs in Applications (Refer below image )and Create API

  2. Click Auth0 Management API - > API Explorer - > Copy Token (AUTH0_JWT_V2_TOKEN)

    image

  3. ** Go to https://app.sendgrid.com

  4. Create and get API Key as mentioned below:

  1. Make a copy of sample.env and save it as .env. Then update environmental variables values related to project in .env file.

  2. Go to “https://www.enterprisedb.com/downloads/postgres-postgresql-downloads” , download and install the required version of “Postgres”

  3. Go inside “postgres” installation path

  4. Configure password and create database in “Postgres” (Refer below image):

  5. Download the schema.sql file from the link : “https://github.com/BlitzKraft/saythanks.io/tree/master/saythanks/sqls” and paste it in required local drive

  6. To Configure development environment in Visual Source Code:

  • Go to powershell - > and then Type

  • wsl

  • Go to saythanks folder (Refer below image) -> and then Type

  • code .

  • It will automatically open the project in Visual Source Code (VSC)

Congratulations for having setup your own local development environment for saythanks.io!

  • Godspeed!

Steps to resolve AUTH0 expiry:

  1. Go to Auth0 login website - https://auth0.com/docs/login

image

  1. Click Applications in the left hand side menu - > Applications

  2. Click “API Explorer Application”

image

  1. Go to APIs tab and Click “Auth0 Management API”

image

  1. Go to API Explorer tab and Copy the token (as mentioned in below image):

image

  1. Paste the token in .bashrc file and save it

    image

  2. Run the command “source ~/.bashrc”

  3. If virtual environment is used, activate it using the command “source YOUR_VIRTUAL_ENV_NAME/bin/activate”

  4. Re-run the saythanks.io application