Coder Social home page Coder Social logo

fe's Introduction

Wetectives Front End Repo

ruby rails rspec bootstrap openstreetmap contributors

Table of Contents

App

The Wetective app can be found on Heroku at the link here.

Background

The Wetectives frontend repository ingests the FBI's Most Wanted API, displays map data using OpenStreetMap and Leaflet.js, and connects to the backend repository via API endpoints in order to create new users and tips, as well as to retreive information about users or any tips they have submitted.

User Experience

Once both the front and backends of the app are up and running, a user can navigate to the landing page of the app. landing_page

The top navigation bar has a link to either login

login

or sign up to register to become a user.

sign_up

For ease of access this app implements OAuthentication, allowing the user to register using their google account credentials.

oauth

Once successfully logged in a user will then be directed to their user dashboard. If the user has submitted any tips for an active investigation then those tips will be displayed here.

user_dashboard

Now that we are logged into our user account, the nav bar changes (as you can see in the above image). If we click on "Browse" link we are taken to the open investigation index page. This page displays all open investigations in the style of an image carousel.

browse_investigation_index

Clicking on the "See More Details" button will take the user to the show page for that given investigation which displays the poster and pertinent information about the culprit.

investigation_show

If a user clicks on the map button in the top navigation bar they will be redirected to the map feature of the app. This displays a map with interactable pins that denote the location for ever FBI field office listed in their API. Clicking on a pin will display a list of open investigations that are associated with that field office. Clicking on one of these investigations will take you to its show page.

map_with_pins

Endpoints

  • Create a new user
POST /api/v1/users/register

  "data": {
    "type": "user",
    "id": "1",
    "attributes": {
      "name": "test user",
      "email": "[email protected]",
    }
  }
  • Search users by id
GET http://localhost:3000/api/v1/users/find?id={{id}}

"data": {
    "type": "user",
    "id": "1",
    "attributes": {
      "name": "Some person",
      "email": "[email protected]",
    }
  }
  • Create a new tip
GET http://localhost:3000/api/v1/users/:id/tips/new

"data": {
    "type": "user",
    "id": "1",
    "attributes": {
      "name": "Some person",
      "email": "[email protected]",
    }
  }
  • Retrieve a user's tips
GET http://localhost:3000/api/v1/users/:id/tips

"data": {
    "type": "user",
    "id": "1",
    "attributes": {
      "name": "Some person",
      "email": "[email protected]",
    }
  }

Installation

Note: You must also install and run the Wetectives BE app for full functionality.

  1. Clone this repository: On your local machine, open a terminal session and enter the following commands for SSH or HTTPS to clone the repo.
  • Using SSH key
$ git clone [email protected]:wetective/fe.git
  • Using HTTPS
$ git clone https://github.com/wetective/fe.git
  • Once cloned, you'll have a new local copy in the directory you ran the clone command in.
  1. Change to the project directory: In terminal, use $cd to navigate to the project directory.
$ cd be
  1. Install required Gems utilizing Bundler:
  • In terminal, use Bundler to install any missing Gems. If Bundler is not installed, first run the following command.
$ gem install bundler
  • If Bundler is already installed or after it has been installed, run the following command.
$ bundle install
  1. Database Migration
  • Before using the web application you will need to setup your databases locally by running the following command
$ rails db:{drop,create,migrate,seed}
  1. Startup and Access
  • Finally, in order to use the web app you will have to start the server locally and access the app through a web browser.
$ rails s
  1. You will need to run the fe server simultaneously in order for the two parts to be able to talk to each other.
$ rails s -p 4999


Contributors

Rue Zheng GitHub | LinkedIn
Brenna Stuart GitHub | LinkedIn
Cory Bethune GitHub | LinkedIn
Jared Hardinger GitHub | LinkedIn
Blake Saylor GitHub | LinkedIn

fe's People

Contributors

brennacodes avatar jaredhardinger avatar ruezheng avatar blakesaylor avatar corybethune avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

corybethune

fe's Issues

Google OAuth Login - Regular Broswer

As a User...

  • When I am in Chrome browser
  • And I Login using Google
  • the Login should be successful
  • and I am redirected to the user dashboard
  • where the Navbar now says Logout instead of Login

Image

User login - be

As a user

  • When I click "Login" in the navbar

  • I am taken to a user/login page

  • That has a form

  • that I can fill out with my:
    [ ] username
    [ ] email address
    [ ] password

  • When I click the "Login" button at the bottom of the form

  • I am redirected to the user dashboard page

Image

Navigation bar

When a user visits any page they should see a menu bar at the top of the page that includes links to:

Landing page
Submit a Tip form
About page?
Login - when no user is logged in
Logout - when user is logged in

Image

Image

Google OAuth Login - Incognito Browser

As a User...

  • When I am in Icognito mode in Chrome browser
  • And I Login using Google
  • the Login should be successful
  • and I am redirected to the user dashboard
  • where the Navbar now says Logout instead of Login

Image

User login - fe

As a user

  • When I click "Login" in the navbar

  • I am taken to a user/login page

  • That has a form

  • that I can fill out with my:
    [ ] username
    [ ] email address
    [ ] password

  • When I click the "Login" button at the bottom of the form

  • I am redirected to the user dashboard page

Image

User Dashboard

  • Pull info from the backend for the tips specific to each show page uid
  • A section for "My Tips" which holds records of tips made by the user.
  • Each of these tips will have a title detailing which investigation the tip is for.
  • Each tip will link to a tip show page.

Map Show

As a User

  • When I click on a pin on the /map index page
  • I am taken to the show page for that pin
    Where I see:
  • The map for that pin
  • A list of active cases for that pin, and
  • Each case listed is a link to the show page for that case
  • A link to clear the map search which takes me back to the /map index view

Image

Image

Landing Page

When a user visits the root path they should be on the landing page ('/') which includes:

  • Title of Application
  • Button to View Active Cases
  • Button to submit a tip for missing persons
  • Button to submit a tip for fugitives
  • Menu bar with links to go back to the homepage, about, submit a tip

Image

Image

Google OAuth Signup

As a User...

  • When I am in Chrome browser
  • And I "Sign Up with Google"
  • the Sign Up should be successful
  • and I am redirected to my user dashboard
  • where the Navbar now says Logout instead of Login

Image

Create Tip Page/Form

When a user visits the page to submit a tip they see a form with the following fields:

  1. Location of sighting:
  2. Date of sighting:
  3. Time of sighting:
  4. Description of the fugitive when sighted:

Image

Tip Form

When a user visits the page to submit a tip they see a form with the following fields:

  1. Location of sighting:
  2. Date of sighting:
  3. Time of sighting:
  4. Description of the fugitive when sighted:

Image

Sign Up

As a user

  • When I click the "Sign Up" link in the navbar

  • I am taken to a user/signup page

  • That has a form

  • that I can fill out with my:
    [ ] username
    [ ] email address
    [ ] password

  • it also has a button to "Sign Up with Google" OAuth

  • When I click the "Sign Up" button at the bottom of the form

  • I am redirected to the user dashboard page

Image

Investigations Index

Image

  • View Button/Link to take the user to the currently displayed investigation's show page.
  • Center of the page should have a current open investigation displayed (maybe it displays the wanted poster if there is a wanted poster for all open investigations, otherwise we will have to display the data from the endpoint call as a list of some sort). Each investigation should be displayed as a kind of card a la Tinder.
  • Each open investigation should be navigable using left and right buttons that slides each investigation card over in a certain direction.

Tip Show Page

  • The tips information/description displayed.
  • A link to the investigation the tip is for.

Map Index

As a User

  • When I click on "Map" in the navbar
  • I am taken to the /map index page
  • Where I see a map with pinpoints of locations with active investigations
  • When I click on a pin
  • I am taken to the show page for that pin

Image

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.