Giter VIP home page Giter VIP logo

sdcta-data-visualization-website's People

Contributors

anthonyp0329 avatar brentonmdunn avatar jamesluo09 avatar meganleongg avatar miyuki-l avatar nirmalagnihotri avatar samvritsrinath avatar vs2961 avatar wllmwu avatar

Stargazers

 avatar

Watchers

 avatar  avatar

sdcta-data-visualization-website's Issues

Navbar

  • Create the frontend for the SDCTA navbar
  • The navbar should be able to route between 4 dummy pages (with Data museum being the landing page).
  • I recommend using react router to implement navigation between pages.

image

Login Saga

Create Saga to update login Redux State.

Modals

Add signup and subscribe modals

Refactor

Change type of zipCode in the User model from string to number

Stripe Payment

Look into how payment details will be stored, is there a way to remember payment details without having to store them ourself?

Step 1:
Functionality to add a card and then add a reference from the card to the user (will have to probably change user schema) so that card can be retrieved if user is known.
https://stripe.com/docs/stripe-js/react

Data Museum landing page frontend

  • Create the Data Museum landing page frontend.
  • For right now, you can pull the images for the data visualizations straight from the Figma.

User Profile - Info From Redux State

STEP 1: Info From Redux State
Get all user info - ex. First name, email, last name, etc... , from the Redux state using a selector instead of it just being hardcoded.
Example of selector:

const isLoggedIn = useAppSelector(selectLogin);
const isSubscribed = useAppSelector(selectSubscribe);

Bring in tier images and decide which one to display based off info in Redux state.
Add Type for user info, follow this link for example: https://github.com/TritonSE/SDCTA-Data-Visualization-Website/pull/37/files#diff-b420719a1fd281d562d81e8346abd281e82cafba1af2fa4c527d3e2d2b1b6850

STEP 2: Saving to Backend

When the user hits save, the edited info should be saved to the backend. Call this function in consumer.ts https://github.com/TritonSE/SDCTA-Data-Visualization-Website/blob/main/SDCTA/src/api/consumer.ts

However, this function must be called in a Saga because you want to update the User object you have saved in Redux state. Example of Saga https://github.com/TritonSE/SDCTA-Data-Visualization-Website/blob/auth-finalization/SDCTA/src/sagas/authSaga.ts

User Profile Page Not Displaying Info After Sign Up

If a user signs up and them immediately navigates to the user profile page, only their email is present on the page, even if they provided additional informaiton. However, every other time they visit the page, their data will be there.

Get Viz by title Route

Call Route to get Viz by title.

Create api folder just like https://github.com/TritonSE/SDCTA-Data-Visualization-Website/pull/19/files#diff-38cd4176fb981e8841ba43bc742455944b30989fb302f0ab30c4580c6dc753c7
Create file called consumer.ts, call route using fetch api, return a promise
https://github.com/TritonSE/LAK-Goods-Transport-Application/blob/main/LAKMobile/src/api/consumer.tsx
Link to call api example from Lak with Promise return type made explicit
https://github.com/TritonSE/LAK-Goods-Transport-Application/blob/main/LAKMobile/src/api/data.ts
Link to creating types that replicate Mongo types from the backend.

Payment Frontend

Stripe Integration was implemented with PR #47 . This provides routes to add cards, start subscriptions, remove cards etc.

There are two main tasks in this epic:

  1. Implement the payment page frontend and make the correct calls to the Stripe routes
image
  1. Adding card change functionality to the user profile, again using the Stripe Routes
image

Data Analysis Page

When a user clicks on a data subcategory on the previous page, they are taken to a new page that contains an analysis of the data visualization. For the visualization, you can just use the image from the Figma, but eventually we want to embed the visualization from Tableau. This youtube video gives a good idea of how exactly to do that with React video , you can skip most of the video as he starts with explaining React.
image

Check prop for presence of Viz object, if not present then issue call to backend (no need for sagas)

Download CSV from frontend

This task consists of multiple parts and is mostly a backend task:
The first part is to figure out how the best way to store CSV files in Mongo, and then implementing service layer functions to get files.

  • Victor and James

The second is the create the routes to upload and download CSV files. The upload route will come in handy in an admin page that allows adding CSVs https://stackoverflow.com/questions/7288814/download-a-file-from-nodejs-server-using-express

  • Brenton and Helen

The third is to call the download route from the frontend when the button is clicked - Brenton and Helen

Adding relevant research links here:
https://www.mongodb.com/community/forums/t/what-is-the-best-way-to-store-an-actual-document-file/111714

Research and choose auth framework

  • Look into different frameworks to implement user authentication.
  • Ensure that your choice makes it easy to implement sign up with Google.

Landing page zoom in css

Zoom in on small screen causes images to expand in size. Likely has to do with fill css attribute.

Category Page

Currently there are 3 data categories reachable through the navbar. When a user accesses one of these categories, they should see a page displaying a scrollable list of data visualizations.
Essentially, the page is made up of a title, and then a list of sub-visualizations.
Each sub-visualization looks like the following:
image

So we essentially need a list of the above to make the full page:

image

For right now, we can start with the images that are on the Figma, but eventually we want to embed Tableau visualizations.

Tableau Viz should be static image, clicking will route to analysis page.

Code Quality - Request Validation

Address high priority code item.
https://docs.google.com/document/d/1TzFotK3BFVGCeaOmzyQlfUUGDxo9iKZ0iqnPalUKQZ0/edit#

We will be using CakeType for validation:

https://github.com/justinyaodu/caketype

Testing:
Add functions to consumer.ts that call all the routes that use validation. Pass the wrong arguments to the routes and make sure you get back errors. For how to make these functions see https://github.com/TritonSE/SDCTA-Data-Visualization-Website/pull/37/files#diff-c80eed83e1555b783e52b0ca0a3b2066a5c8cb36ca1430d9705cb6c0e09c9901 for example of consumer.ts function.

Calling backend to get Visualizations for category

Use sagas to call API, create Redux slice for state that will store current list of visualizations:

{
Education: []: Viz
Homelessness: []: Viz
Municipal: []: Viz
}

Saga will update the correct state.

Authenticating routes

Authenticate access to backend routes with JWT tokens. Firebase provides methods to get the jwt token for a user. This article and the words alive tse repo are helpful examples.

Create Auth frontend pages

  • Create the login and sign up pages
  • Make sure the sign up button is disabled until they check the box agreeing to the terms of service.

image

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.