Coder Social home page Coder Social logo

dinner_recipe's Introduction

Setup Instructions

Live App URL: https://dinner-recipe-475753dcfb84.herokuapp.com/

Prerequisites:

  • Ensure Ruby and Rails is Installed.
  • Ensure PostgreSQL is Installed.

Installation:

  1. Clone the repository:

    git clone https://github.com/subhashsaran/dinner_recipe.git
    cd dinner_recipe
  2. Install dependencies:

    bundle install
  3. Create and migrate the database:

    rails db:create && rails db:migrate
  4. Import recipe data (Optional):

    This step requires a tmp/recipes-en.json file containing recipe data in JSON format.

    rails recipes:import
  5. Run tests:

    bundle exec rspec
  6. Start the Rails server:

    rails server

Project Progress

I maintained a clean commit history, allowing to track the project's development step-by-step. Each commit represents a small user story delivered.

Initial Version

The initial version focused on displaying a list of recipes along with their ingredients. Here are some potential improvements:

  • Enhanced Ingredient Display: A more aesthetically pleasing way to display ingredients.
  • Search Result Highlighting: Replicate the behavior of search engines like Google and GitHub, highlighting matching ingredients within each recipe.

Initial Version: Screenshot 2567-04-15 at 10 49 47

Improved Version with Basic Syntax Highlighting

This commit introduced basic syntax highlighting for ingredients (commit 07e55309: [https://github.com/subhashsaran/dinner_recipe/commit/d217bcd41dc382311cc80719aea03e9245aea8a4)). While not the most optimal solution, it provides a visual improvement over the initial version.

Improved Version: Screenshot 2567-04-15 at 15 22 11

Areas for Improvement

Here are some potential improvements we can discuss during the review call:

Search Ranking:

  • Implement sorting by the number of matching search ingredients within a recipe. This could involve assigning a score to each recipe based on the number of matches, with higher-scoring recipes displayed at the top.

Pagination:

  • Currently, for basic search items like sugar, salt, etc., there are thousands of matching records, the search results are displayed in a single page. This could be improved by adding pagination to the search results.

Recipe Import:

  • Improve the recipe import process:
    • Use activerecord-import to bulk import recipes and ingredients in a single transaction, significantly improving efficiency compared to individual inserts.
    • Add a progress bar to indicate import progress.
    • Prevent duplicate record creation during multiple imports.

Search Functionality:

  • Consider integrating Basic Elasticsearch using Searchkick to enhance search results' relevance and speed.

Frontend Enhancements (Future Consideration):

  • Explore using React to implement single-page application features for a more dynamic user experience.

Code Quality:

  • Add Rubocop to check for coding style issues and enforce best practices.

dinner_recipe's People

Contributors

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