Some dog lovers don't have the time or money to have a full-time dog. Others want to keep their dog for an afternoon, a day, or a week without paying a huge amount of money or asking busy friends. DogSitter takes care of connecting each others. You can view the profile of a dog and its owner or search by type of dog (age, weight, distance to you). When you find the ideal dog you can contact its owner.
-
Ruby on Rails / PostgreSQL
-
GraphQL API
-
AWS S3 (photo storage)
-
CircleCI/CD
-
Testing (Rspec, Capybara, VCR, Webmock, Jest, Snapshot)
-
React / Router / Redux / Redux-thunk / Apollo GraphQL
-
createPhoto mutation. User Sotry: The dog(s) owner can add/delete pictures of his dog. The picture must be save on AWS S3.
-
Implement chatkit. User Sotry : A user logged can start can start a discussion with the dog's owner if he is online or leave him a message. The message will also be sent by email.
- Implement React on the ROR GraphQL API.
- Build the front app with Apollo GraphQL, Redux / Redux-thunk / Router
- User Story: The dog(s) owner can add on a calendar the date when they will be absent. In this way, the users can directly reserve the slot and wait confirmation from the owner of the dog(s).
This service utilizes GraphQL. All queries are made to a single endpoint, POST / graphql
. This endpoint return 200 (OK). If there is an error, it will be present in an errors
atribute of the response, and the data attribute will be null
.
Returns a list of all users. Additional attributes should be included as comma separated values without any spacing. Available attributes for users are:
- id - ID
- firstName - String
- longDesc - String
- shortDesc - String
- distance -Float (in km, null if the current user or queried user does not have a location defined)
- dogs - [DogType]
{
"data": {
"users": [
{
"id": "1",
"firstName": "Sharen",
},
{
"id": "2",
"firstName": "Troy",
},
{
"id": "3",
"firstName": "Vito",
},
{
"id": "4",
"firstName": "Jermaine",
}
]
}
}
Returns the user having the specified ID. (id :argument is required). Additional attributes should be included as comma separated values without any spacing. Available attributes for users are:
- id - ID
- firstName - String
- longDesc - String
- shortDesc - String
- distance -Float (in km, null if the current user or queried user does not have a location defined)
- dogs - [DogType]
{
"data": {
"user": {
"id": "1",
"firstName": "Clarence",
"shortDesc": "Chuck Norris knows the last digit of PI."
}
}
}
Returns a list of all dogs. Additional attributes should be included as comma separated values without any spacing. Available attributes for dogs are:
- id - ID
- name - String
- age - Int
- breed - String
- activityLevel - Int
- longDesc - String
- shortDesc - String
- distance -Float (in km, null if the current user or queried doq's user does not have a location defined)
- user - UserType
- location - LocationType
{
"data": {
"dogs": [
{
"id": "1",
"name": "Seurat",
"breed": "Newfoundland"
},
{
"id": "2",
"name": "Diego Rivera",
"breed": "Bull Mastiff"
},
{
"id": "3",
"name": "Ansel Adams",
"breed": "Fox Terrier"
}
]
}
}
Returns the dog having the specified ID. (id :argument is required). Additional attributes should be included as comma separated values without any spacing. Available attributes for dogs are:
- id - ID
- name - String
- age - Int
- breed - String
- activityLevel - Int
- longDesc - String
- shortDesc - String
- distance -Float (in km, null if the current user or queried doq's user does not have a location defined)
- user - UserType
- location - LocationType
{
"data": {
"dog": {
"id": "1",
"name": "Picasso",
"age": 5,
"birthdate": "2014-08-28"
}
}
}
Returns a list of all locations. Additional attributes should be included as comma separated values without any spacing. Available attributes for locations are:
- id - ID
- streetAddress - String
- city - String
- zipCode - String
- state - String
- lat - Float
- long - Float
{
"data": {
"locations": [
{
"id": "1",
"streetAddress": "561 Osvaldo Rapid",
"city": "Lake Justina"
},
{
"id": "2",
"streetAddress": "2259 Turcotte Way",
"city": "South Ronnie"
},
{
"id": "3",
"streetAddress": "4493 Ngan Walks",
"city": "Raynorland"
},
{
"id": "4",
"streetAddress": "81482 Donald Place",
"city": "Karrenbury"
}
]
}
}
/graphql?query={currentUser{lastName,email,distance,dogs{name},location{city}}}&google_token=GOOGLE_TOKEN
Returns an authenticated user, based on the specified google_token. (the google_token params is required). Returns nil if no user has the specified google_token. After authentification available attributes for currentUser are:
- id - ID
- firstName - String
- lastName - String
- email - String
- longDesc - String
- shortDesc - String
- distance -Float (in km, null if the current user or queried user does not have a location defined)
- dogs - [DogType]
- location - [LocationType]
Returns a list of dogs, with the options to filter. If the the request are made by the currentUser, the dogs are sorted by distance from him. Available filters for dogs are:
- ageRange: [Int]
- weigthRange: [Int]
- breed: [String]
- activityLevel: [Int]
{
"data": {
"dogs": [
{
"name": "Ansel Adams",
"shortDesc": "When Chuck Norris points to null, null quakes in fear."
},
{
"name": "Degas",
"shortDesc": "Chuck Norris does not use revision control software. None of his code has ever needed revision."
}
]
}
}
- Ruby 2.6.3 - Ruby Version
- Rails 5.2.3 - Rails Version
$ [email protected]:TheMindset/Dog_Sitter_be.git
$ cd Dog_Sitter_be
$ bundle install
- Install PostgresQL Run this commands:
$ rails db:create db:migrate db:seed
Once installation and database setup are complete, explore the various API endpoints with the following steps:
$ rails s
- Open your browser, and visit
http://localhost:3000/
- In a separate terminal window, query the available endpoints by running
rails routes
- Copy any of the URIs displayed and append to
http://localhost:3000/
in your browser. - You can also utilize the graphical tool from this URL
http://localhost:3000/graphiql
$ rails rspec
.