Skip to content

s2an/chicken-tracker-be

 
 

Repository files navigation

Chicken Tracker

This product aims to help users keep track of their animals and shelters on their homestead. Shelters are used to contain a group of animals. Users can manage their homestead by creating, editing, and deleting shelters and animals. They can track details such as animal's name, birthday, and color. Animal pages also include facts and stats based on the animal's species, which is fed by live data from the Animals API by api-ninjas.

Click here to access the front end of our live app: Chicken Tracker as well as the back end: Chicken Tracker (backend)

NOTE: if you are viewing this after February 2024, the app may no longer be hosted at these links

Table of Contents

  1. Installation
  2. API
  3. Gems Used
  4. How to Contribute
  5. Contributors

Installation

This project runs on Ruby 3.2.2, Rails 7.1.3.2 To install, please complete these steps:

  1. Fork and clone both repositories:

    • The front end repository handles most of what the user will interact with, including logging in, routing, and page rendering.
    • The back end repository connects to a database where our data is stored and connects to an external API.
  2. Run the following commands in each repository to start the servers. Please note, they must be running on different servers. We recommend 5000 for back end and 3000 for front end.

    rails s -p 5000
  3. Run the following command in each terminal to install the gems required to use this application:

    bundle install
  4. Run the following command to drop and create the database and then migrate the schema

    rails db:{drop,create,migrate}

API

  • This application consumes one external api: Animals API by api-ninjas.
  • This application also publishes an api with shelter and animal data. Click here to view the JSON contract which includes request and response samples for each of our endpoints.

Gems Used

  • Omniauth and Figaro were used for OAuth.
  • Bootstrap was used for design on the front end.
  • bcrypt is used to ensure secure login functionality with encrypted passwords.
  • Draper allows us to use decorators in our views.
  • Timecop allows us to test our timed inactive logout functionality.
  • Faraday is used to make api connections.
  • Our application includes extensive testing using Capybara to simulate user input and interaction.
  • This application also uses Launchy to view pages in the browser without needing to start the server.
  • Shoulda Matchers is used for one-liner testing of model associations and validations.
  • Orderly is used to check the order in which items appear on the pages for our application.
  • SimpleCov provides test coverage analysis for our application.
  • WebMock is used to block http requests in our test environment as well as to stub requests.
  • Pry and RSpec Rails are used within the testing environment for unit and feature testing.

How to Contribute

Have a great idea for this app? We'd love to add new features to Chicken Tracker! Follow the steps below and we'll review your pull request.

  1. Fork the repo (see Installation steps)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new pull request

Contributors

About

Forked before rework for Demo Comp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 97.0%
  • Dockerfile 2.4%
  • Other 0.6%