Giter Club home page Giter Club logo

comics_app's Introduction

Project setup guidelines

Download the project

git clone [email protected]:natannobre/comics_app.git

Configuration

  • Ruby version: 3.0.2

  • Rails version: 7.0.3

  • Install gems:

gem install bundler
bundle install

Create the file comics_app/config/env_variables.yml

MARVEL_PUBLIC_KEY: '<YOUR_PUBLIC_KEY>'
MARVEL_PRIVATE_KEY: '<YOUR_PRIVATE_KEY>'

Migrate

bin/rails db:migrate

Allow caching in development

Inside you project folder:

bin/rails dev:cache

To run the app

Inside you project folder:

bin/rails server

To run tests

Inside you project folder:

rspec spec

About the project

This project is a simple web application that allows you to search for comics in Marvel Developer API. The app allow users to search for comics by character's name and mark favourite ones.

Main libraries

  1. Devise - This gem is used to authenticate users to access the application.
  2. HTTParty - Gem used to make HTTP requests to the Marvel API.
  3. Pry - This gem is used to debug the application.
  4. RSpec - Gem is used to test the application.
  5. Webmock - This gem is used to mock HTTP requests when testing.

Highlighted Approaches

  1. The entities character and comic were implemented based on ActiveRecord classes to make easier to manipulate and understand the objects.
  2. To help mitigate problems concerning external API rate limit, API responses were cached for 24 hours.

Next steps

  • Refactor the javascript to use turbo-links on upvote feature.
  • Refactor comics layout (image and title).
  • Add more tests to have a better coverage.

comics_app's People

Contributors

natannobre 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.