Cookmeister is a prototype implementations of an application that allows a user to find recipes based on the ingredients of their choice.
This repository includes the backend part of the application built in Ruby on Rails as well as the frontend built in ReactJS.
The Database is built using PostgreSQL.
The search functionality is implemented using ElasticSearch.
- Ruby 3.0.0
- Rails 7.0.0
- PostgreSQL 11+
- Node 14+
- npm 6+
- React 18+
- Git
You can either start a local instance of Elasticsearch following the official documentation or by creating a free account in the cloud solution that elasticsearch provides here.
In either case, keep the credentials for the connection to the backend. You will need them soon.
Clone the repo.
Enter the cloned directory.
cd /path/to/cookmeister/directory
Run the rails bundler
bundle install
Install Postgres following the official documentation.
Set up the databse for the application and seed it with the provided dataset
rails db:create db:migrate db:seed
Open config/database.yml
in an editor and replace the Elasticsearch credentials with the ones that Elasticsearch provided during its setup.
Now you can start the backend at http://localhost:3000 by running
rails s
Navigate to the frontend directory
cd cooking_partner
Run
npm install
and then
npm run start
When webpack asks to run in a different port than 3000 (since it is taken by Rails) type yes
and let it start on port 3001.
And you are ready to go!!
Enter the browser of your choice and type http://localhost:3001
You can try to find a recipe using the ingredients you have at home by visiting the live demo here