"Foodcourt Delivery" allows the user to explore multiple fictional food menus and order items from any of them. You'll have access to a cart, and the ability to create new items in each menu. Access to these menus is granted with creation of an account, with login and an authenticated password.
I created this full stack app to demonstrate my proficiency in Rails and React for my Phase 4 project at Flatiron School.
To run this app locally, fork and clone this repo and make sure you have the above requirements installed. Then install all dependencies and start up your Postgres server:
bundle install
npm install --prefix client
sudo service postgresql start
rails db:create db:migrate db:seed
You can use the following commands to run the application:
rails s
to run the backend on http://localhost:3000- In a separate terminal use
npm start --prefix client
to run the frontend on http://localhost:4000
If you need to run the app on different ports, be sure to update the Proxy in ./client/package.json
, ./config/puma.rb
, and ./Procfile.dev
, and re-install dependencies.
has_many :orders
has_one :cart
belongs_to :user
belongs_to :user
has_many :cart_items
has_many :items, through: :cart_items
belongs_to :cart
belongs_to :item
has_many :order_items
belongs_to :menu
has_many :items
PREFIX VERB URI PATTERN CONTROLLER#ACTION
cart_items GET /cart_items cart_items#index
POST /cart_items cart_items#create
cart_item PATCH /cart_items/:id cart_items#update
PUT /cart_items/:id cart_items#update
DELETE /cart_items/:id cart_items#destroy
orders GET /orders orders#index
POST /orders orders#create
items GET /items items#index
POST /menus/:menu_id/items items#create
menus GET /menus menus#index
menu GET /menus/:id menus#show
login POST /login sessions#create
logout DELETE /logout sessions#destroy
signup POST /signup users#create
me GET /me users#show
empty_cart DELETE /empty_cart cart_items#empty_cart
GET /*path fallback#index