/sweet-aromas-api

Sweet~aromas is a catalogue of Recipes that provides a set of instructions used for preparing and producing a certain food, dish, or drink. The purpose of a recipe is to have a precise record of the ingredients used, the amounts needed, and the way they are combined.

Primary LanguageRuby

Catalogue of Recipes

Description

Catalogue of Recipes is a React based app that provides a set of instructions used for preparing and producing a certain food, dish, or drink. The purpose of a recipe is to have a precise record of the ingredients used, the amounts needed, and the way they are combined.

Screenshots 📸

Home Page -- Page Add Category Form
Category-Transaction Add Transaction Form Transaction Details

Learning objectives

API Demo 🔗

API Link

Documentation Demo 🔗

Documentation Link

Live Demo 🔗

Live Demo Link

Front-end 🔗

Front-end Link

Getting Started

To get a local copy for this project and running follow these simple example steps.

Prerequisites

  • You need to have git installed in your machine.
  • Install a recent version of Postgres.
  • Already install Rails

Setup

Setting Up PostgreSQL

  • The postgres installation doesn't setup a user for you, so you'll need to follow these steps to create a user with permission to create databases
$  sudo -u postgres createuser blog-app -s

Creating the catalogue-of-recipes-api application

  • To create project with PostgreSQL database
$   rails new catalogue-of-recipes-api  #or
$   rails new catalogue-of-recipes-api -d postgresql

$   cd Rails-capstone-Budget-app # Move into the application directory

Clone this repository

$ git clone https://github.com/BenMukebo/catalogue-of-recipes-api.git
$ cd catalogue-of-recipes-api

Create the database

$   rails db:create   # or
$   rake db:create

Install linter and

  • Rubocop gem
$  bundle init
$  bundle install
  • Run linter
$  rubocop .
  • In auto-correct mode, RuboCop will try to automatically fix offenses:
$  rubocop -A # or
$  rubocop --auto-correct-all

Starting up the Web Server

$   rails s # or
$   rails server # or
$   rails server -p3001
  • To restart the server
$  sudo service postgresql restart 
$  rails db:reset #to clean the database                                                                    

Listing Existing Routes

  • You can now visit http://localhost:3000 to view your new website!

You can also execute the rails routes command in your terminal to produce the same output.

Generate rspec

  • At the first you need to include those lines in your Gemfile
  gem 'rails-controller-testing'
  gem 'rspec-rails'

Generate Schema

  • To drop, create a table and to migrate and send the seed into the database:
  • To push the Migration into the database
  • We use the seeds.rb file to records in the database
  $   rails db:drop db:create db:migrate db:seed  
  • To check available routes
  $   rails routes  

Built With 🛠️

This project is build with:

  • Ruby
  • Ruby on Rails
  • Postgre

Authors

👤 Ben Mukebo

👤 Barack Mukelenga

🤝 Contributor

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

📝 License

Copyright (c) 2021 [Ben Mukebo](https://www.benmukebo.me/