treesa-f / abode-demo-site Goto Github PK
View Code? Open in Web Editor NEWThis project forked from unsw-cse-capstone-project/capstone-project-comp3900-w17a-csyeet
capstone-project-comp3900-w17a-csyeet created by GitHub Classroom
This project forked from unsw-cse-capstone-project/capstone-project-comp3900-w17a-csyeet
capstone-project-comp3900-w17a-csyeet created by GitHub Classroom
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.