Git Product home page Git Product logo

swen344-web-project's Introduction

SWEN344-web-project

Group project for RIT SWEN344.

https://www.se.rit.edu/~swen-344/projects/projectdescription.html#R1

Deployment

To create the environment in which the project can build and run, you need both docker and docker-compose installed.

SSH credentials are starred in the Slack.

You need to bring down the docker containers to force a rebuild if they are already running. Run docker-compose -f docker-compose.yml down to bring down the containers and network. To bring them up, and build any changes, run docker-compose -f docker-compose.yml up -d. Auditing the build process can be done using docker-compose -f docker-compose.yml logs, which will print out the logged stdout for all running containers up until the point where the command was invoked.

It takes about 10 minutes for the whole thing to build between the NPM build process, rustc being dog-slow, and the server being split between like 10 other VMs (we are probably only given one core to work with).

Once running, you can inspect a container by running docker container list, finding the container id, and substituting it in the following command: docker exec -ti <ID> /bin/bash

To run on localhost: docker-compose -f docker-compose-dev.yml up -d

Bootstraping

To get SSL to work in the first place, you need to be able to expose some files via nginx to verify the authenticity of the server, but because the nginx container won't start without the SSL creds, you get stuck in a chicken and egg problem. There is a script that you need to run initially to circumvent this problem, which will do all the initial verification. It didn't work for me on the first few attempts, and then, under some circumstances that I don't remember, it did. We will just hope that we don't need to re-bootstrap this project.

swen344-web-project's People

Contributors

hgzimmerman avatar beltrancaliz avatar dxf7606 avatar sadaf345 avatar jkingse avatar

Watchers

 avatar  avatar  avatar

swen344-web-project's Issues

R2 tracking issue

https://www.se.rit.edu/~swen-344/projects/projectdescription.html#r2

  • Current Weather
    • The user should be able to customize their location for the weather: They should be able to enter their zip code for the user to enter in their location. The system should save the user's zip code preference (which they can change at any time.) When the user logs out and logs back in then this information should persist.
  • Two main additions for functionality include:

    • Stock ticker (Storing information)
    • Calendar (Storing information)
    • Other items as will be defined by customer,
  • Testing

    • UI Tester
    • Updated Bug Tracker
  • Documentation.

    • Small .pdf document containing:
      • Your version control system link & any appropriate logins
      • Analytics feature for customer. You will need to elicit the precise details with the customer. Something like Google Analytics here is fine.
  • A fully implemented system with good usability.
  • Your staging & production environments should be mirrors of each other. (We don't have a staging environment)
  • Create a virtual directory for the release titled R2. If you are using a different technology than .Net, then do something analogous (you are encouraged to speak about this with your instructor). This means that the release should be http://vm549-x.se.rit.edu/R2/
  • You may leave all of your source code in your Version Control System. There is no need to submit the code.
  • All data should be stored in your database. Do not plan on storing anything in local files (IE .csv or .xml files)
  • Everything should be as functional as possible. Additionally, the application should be much more aesthetically pleasing.
  • Database

    • Schema
    • Propagation mechanism
    • Functionality
    • Security (you can discuss this with customer)
      • Tools ran to assess security risks and their results. Additionally, you should provide a mitigation plan for how you would deal with the risks (it will take some research and planning on your part).
      • At least 5 Abuse and Misuse cases.
      • Main areas of vulnerability for your project.
  • Application should work in:
    - [ ] Internet Explorer

    • FireFox
    • Various versions of Chrome

Reduce logspam from Postgres

Postgres emits a bunch of errors about the user 'postgres' not existing. This only happened after, nginx was added for TLS.

R1 Tracking Issue

  • Weather: The page should show the current weather for RIT (14623)

Proper development & "production" environment setup.

  • Virtual machines
  • Calendar - (No need to store information that is an R2 requirement)
  • Bug Tracking
    • How many bugs did you collect
    • How many open bugs do you have? And why are they open
    • How has the bug collection/mitigation process helped or hurt your project
    • This can all be placed into a small pdf.
  • Version control system
    • If you use GitHub, please give me access (dan7800)
  • Main page setup
  • Facebook/Twitter tie in
  • My test account is [email protected] so please add this to your FaceBook/Twitter app/project if necessary.
  • You MAY need to add me as a test user.
  • You may also create a test Facebook user. If you do, provide the approriate login/password in your documentation.
  • You may leave all of your source code in your Version Control System. There is no need to submit.
  • Small .pdf document containing: Your version control system link & any appropriate logins
Stock ticker (Retrieve information from existing external API's)
  • You should have a stock page for any ticket symbols that the user may "punch in". Displayed data should include:
    • Current price
    • Day's high
    • Day's low
    • Yearly high
    • Yearly low
  • An interactive chart of the stock (not just a retrieved image)
Updated documentation (design & requirements).
  • This includes updates & necessary additions to all documents.

  • Make sure that your website is publicly accessible to the outside world. This is required for the 1st deliverable and I encourage you to test your application early & often.

  • "Final" deliverable is on the production website.
Testing
  • Basic Set up of UI Tester (Selenium, iMacros etc...) Basically, just show that you are working towards implementing this for R2. A screen shot of this implementation (in a .pdf form) is fine.
  • Other items as will be defined by customer.
  • You DO NOT need to set up a SQL Database for R1.
A Document with the following:
  • Your site URL
  • Login information on your site. Please provide me with "dummy" login information needed to access your site (if applicable).
  • A brief readme

Duplicate authentication

Logging into the site using FB authentication while already having a Facebook account logged in yields the following error: "App Not Setup: This app is still in development mode, and you don't have access to it. Switch to a registered test user or ask an app admin for permissions." User most go to incognito/private mode to log in.

Do we have a logout button?
I feel like login status/ route redirection contingent on authentication is a problem that needs to be tackled.

Backend Todos

- [ ] verify that get_user_id_from_facebook() works

  • Consider making events slicing based on local time, not UTC.

  • Consider moving the /users route to / from /auth

  • Make an actual return type for the (UserStockResponse, f64) response.

  • Use !(Never) type in get_num_servers_up() when the never type becomes standard. (unlikely)

  • Point the assets directory at the frontend's build directory.

Fix diagrams

  • We don't use twitter as oauth.
  • We need a different api dependency for the fb feed.
  • Nginx sits between server_bin and frontend.
  • More specific frontend testing.

Set up CI

Jenkins or TravisCi, whatever prof. wants.

Deal with OAuth

I think we came to consensus on this one, but I forgot.

  • Facebook
  • Twitter

Implementation requirements

  • Get OAuth token from provider
  • Get feed for provider.
  • Login process should get unique client_id from provider (Backend)

Get VM set up.

I think we want one of the RIT Ubuntu VMs.
Setting up the backend environment there should be easy - just install nix and rustup.

Fix error handling for mid-400 level errors in the backend.

The custom_error function used with warp to write nice messages for errors only takes into account 404 errors.

There is another internal warp error enum that needs to be matched as well that contains errors for things like calling an endpoint with the wrong method.

Split server into server and business crates.

business crate will handle business logic and type conversions and reexport functions from db.
server will only handle routing glue.
db will require a refactor to decouple static methods from schema-bound types so individual functions can be reexported.

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.