Giter Club home page Giter Club logo

doggie's Introduction

Dog Breed Image Fetcher

Overview

This project is a coding challenge designed to assess technical skills in Ruby on Rails, front-end frameworks, and asynchronous form handling. The goal is to create a simple web form that allows users to input a dog breed and, upon submission, fetch and display an image of the specified breed from the Dog API.

Table of Contents

Objective

The objective of this coding challenge is to demonstrate proficiency in Ruby on Rails, front-end development using Bootstrap or Tailwind, and asynchronous form handling. The challenge provides an opportunity to showcase coding style, problem-solving skills, and the ability to integrate with external APIs.

Challenge Description

Design a web form with the following features:

  • A text input field labeled "Breed".
  • A button to submit the form.
  • On form submission, fetch an image of the specified dog breed from the Dog API.
  • Display the fetched image and the breed name to the right of the form.

Technologies Used

  • Backend: Ruby on Rails
  • Frontend: Tailwind, Hotwire
  • API: Dog API
  • Version Control: Git
  • Hosting: Render

Hosted App

https://doggie-fb2k.onrender.com/

Please expect some delay in the initial response. As this is a free instance, it may spin down during periods of inactivity, potentially causing delays of 50 seconds or more for requests.

Setup Instructions

  1. Install Ruby Follow the instructions to install Ruby 3.1.3: https://www.ruby-lang.org/en/documentation/installation/ You can use Dockerfile as well to build the environment.

  2. Clone the Repository:

    git clone https://github.com/RajRoR/doggie.git
    cd doggie
    
  3. Install Dependencies

    bundle install
  4. Start Server

    ./bin/dev
  5. Access the Application: Open your browser and navigate to http://localhost:3000

  6. Run RSpec Tests (optional)

    rspec spec

Usage

  1. Enter the name of the dog breed in the "Breed" input field. E.g.: African, French Bulldog, Husky, etc.
  2. Click the "Surprise Me!" button.
  3. An image of the specified dog breed will be displayed to the right of the form, along with the breed name.

Deployment

The CI/CD pipeline is set up for the repo. It verify each commit with various checks. It automatically deploys whenever a new commit is pushed or merged into the main branch.

Improvement Areas

  1. Better Responsive Design
  2. Fuzzy-Matching for Input
    • Implement fuzzy-matching to make the system more intelligent and improve user experience.
  3. Beautify HTML Validation Messages
    • Enhance HTML validation messages or replace them with custom designs.
  4. Dynamic Image Dimensions
    • Handling of image dimensions, especially for images with non-standard dimensions.
  5. Introduce Database and Table for Breeds
    • Create a database and table to store and query available breeds.
    • Develop a rake task to fetch and store/update the table periodically or as needed using data from the Breeds List API.
    • Add a cron job to run this rake task periodically.
    • Use the breeds list data to validate input breed values before making the API call.
  6. Use Custom Validators, Concerns, etc.
  7. Higher Test Coverage

doggie's People

Contributors

rajror avatar

Watchers

 avatar

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.