Skip to content

wetective/be

Repository files navigation

Wetectives Back End Repo

ruby rails rspec contributors

Table of Contents

App

Wetectives app can be found on Heroku.

Background

The Wetectives back end repository supports the front end repository by storing user data and tips submitted in the database to be retrieved from the front end app.

Schema

Screen Shot 2022-09-21 at 10 39 21 AM

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 FE 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/be.git
  • Using HTTPS
$ git clone https://github.com/wetective/be.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 -p 4999
  1. Download the frontend repo and run its fe server simultaneously.
$ rails s

Contributors

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

About

Backend for the Wetective application.

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  

Languages