Git Product home page Git Product logo

abode-demo-site's Introduction

NOTE:
-   We have uploaded our final submission to our team’s GitHub repo.
-   You should use 2 different terminals to setup/run the backend and frontend as outlined below.
-   Backticks (`) indicate a terminal command and should not be included when running the command.

# Setup

## Setting up the backend

### Prerequisites

1. Ensure you have python version >= 3.6.4. You can find the downloads here: https://www.python.org/downloads/
2. Ensure you have PostgreSQL 10.14. You can find the appropriate installer for your platform here: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
    - Your PostgreSQL installation should have the superuser as postgres and its password as password and should listen on the default port of 5432.
    - If your superuser is not postgres, then change that in the commands for the rest of the setup instructions
    - If your superuser password is not password then run: `psql -U postgres "ALTER USER postgres PASSWORD 'password'"`;

### Further Setup

1. `cd backend`
2. `python -m venv env` or `python3 -m venv env`
    - This creates a virtual environment where we isolate the projects dependencies
3. Activate the virtual environment:

    - If on a Windows terminal, run `env\Scripts\activate.bat`
    - If on Windows but using a bash terminal, run `source env/Scripts/activate`
    - Otherwise run `source env/bin/activate`

    You should see '(env)' on your terminal prompt. If you do not then you have not activated the environment and should try another method of running the `activate` file.

4. Install the dependencies via `pip install -r requirements.txt` or `pip3 install -r requirements.txt`
    - If this fails for some module try to uninstall it with `pip uninstall <module>`
    - Then try to install it with `pip install <module>`
5. `psql -U postgres -f init_db.sql`
6. `gunzip -c populate_db.gz | psql -U postgres -d abode`
    - Note that this may take 20-30 seconds and could pause on lines beginning with COPY

### Running the backend

-   Now you can run the backend with: `uvicorn src.main:app --reload`
    -   Ensure you are still in the backend directory when doing so

## Setting up the frontend

### Prerequisites

1. You must have node version >= 13.
    - If you don't have it you have two options to download it:
        1. You can download it from the website, but this may conflict with your local version: https://nodejs.org/en/download/releases/
        2. Or you can use nvm to manage different versions.
            - You can install it following these instructions: (installation instructions here: https://github.com/nvm-sh/nvm#installing-and-updating)
            - Then run: nvm install 13.0.0
            - then: nvm use 13.0.0

### Further Setup

1. `npm install -g yarn`
2. In the frontend directory, run `yarn install`

### Running the frontend

-   Now you can run the frontend with: `yarn start`
    -   Ensure you are still in the frontend directory when doing so

abode-demo-site's People

Contributors

edzo491 avatar teresa-canva avatar treesa-f avatar jwen00 avatar jeremyyg avatar edzobel491 avatar

Watchers

James Cloos avatar

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.