Coder Social home page Coder Social logo

320-f20-track-ii's Introduction

320-F20-Track-II

Track 2 Repo: https://github.com/david-fisher/320-F20-Track-II

Track 4 Repo: https://github.com/david-fisher/320-F20-Track-IV

Differential Team database: how to build

  1. Install postgreSQL:
    https://www.postgresql.org/download/

  2. Add PostgreSQL/[version, either 12 or 13]/bin and PostgreSQL/[version, either 12 or 13]/lib to PATH (on Windows) or make it an environment variable on Mac/Linux

  3. in command prompt or terminal, call psql -U postgres -f [full filepath to database_setup.sql]. note: The file database_setup.sql can currently be found in the erd-implementation branch in the database folder.

how to connect to database from react.js

  1. run npm install all within the directory containing package.json to install all dependencies for the pg package, which is the library used to communicate between the PostgreSQL database and the react.js app, as well as all other dependencies outlined in the package_lock.json file

  2. In goon-universe, the app can be run with node app.js.

  3. Using the functions outlined in queries.js, which implements the REST API enumerated in app.js, frontend teams can now interact with the database from their React.js app as usual.

  4. Worth noting: the pg package's use depends on certain user credentials used to access a common database (namely, the username/password for the postgresql database which you've set up using database_setup.sql). Since the git repository is public, it's a security risk to store these credentials in public on the clear web. Thus, we are using a .env file (locally, for now) to store these credentials. You will not be able to access the database from the React app without a properly configured .env file!

how to run the frontend react app

  1. Install Node.js:
    https://nodejs.org/en/download/

  2. Go into the folder frontend in the command line.

  3. Run npm install in the command line to install all dependencies required to run the app.

  4. Run npm start in the command line to start the app.

For testing: populating the database with dummy data

  1. in command prompt or terminal, run psql -U [user] -f [full filepath to insert_example_data.sql]. This file can currently be found in the erd-implementation branch in the database directory.

320-f20-track-ii's People

Contributors

rlee287 avatar rasdy avatar sspathak avatar kungoyal avatar thuang814 avatar songchen1999 avatar miesoz avatar marcottecaleb avatar satwikgoyal avatar agalperina avatar abhiz123 avatar suboptimalcoder avatar zpolak1 avatar manavkulshrestha avatar pluto-de avatar qingchuand avatar david-fisher avatar dependabot[bot] avatar

Stargazers

Ron Arbo avatar Eilat Tabak avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

prachi-18

320-f20-track-ii's Issues

Implement back-end (database) component

Your team is responsible for the database of the scenario player.
In your implementation, you will need to coordinate with the other back-end team on your track. Please work together to decide what the stack of the scenario player will be.
You will also need to coordinate with Track IV, who will make the corresponding
scenario editor.

complete user story

Instructor scenario create

Student receives the project task and responds to initial questions

basic outline for database schema

Create a rough sketch of our potential database schema

  • Database schema for scenarios (coordinate with Track IV)
  • Database schema for scenario responses

Coordinate with Track IV to decide on a database and a schema

We (Differential Team) decided on PostgreSQL, while other teams may have decided on something different. Agreement needs to be reached on the following:

  • Decide on a database program to use (PostgreSQL)
  • Decide on a database schema for storing scenarios
  • Decide on a database schema for storing scenario results (so that the editor team can present these results to scenario creators)

Implement the scenario player frontend

This will be your goal for throughout the semester. Track 4 will be creating the editor. Be sure to break this up into smaller issues as stories get finished. This likely will be the last issue you move to 'done'!

Create ER diagram for database schema

  • Add 'users' table to ERD
  • Add 'students' table to ERD
  • Add 'instructors' table to ERD
  • Add 'courses table to ERD
  • Add 'scenarios' table to ERD
  • Add 'stakeholders table to ERD
  • Add tables for pages to ERD
  • Add MCQ questions and options tables to ERD
  • Add MCQ responses table to ERD
  • Add stakeholder choices table to ERD

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.