🌐 Para a versão em português deste README, clique aqui.
Food Delivery Service
is a Minimum Viable Product (MVP) application of an online food ordering and delivery platform based on iFood.
- 1. Requirements:
- 2. Installation:
- 3. Routes
- 4. Filters
- 5. How to contribute to this project?
- 6. How do I report a bug or request a feature?
- Backend
- Ruby 2.7.3
- Rails 6.1.3
- SQLite
- Frontend
- React
- TypeScript
- Vite
- Yarn
Clone the repo:
git clone https://github.com/EuCarlos/food-delivery-service-react-rails.git && cd food-delivery-service-react-rails
Install dependencies using Yarn or NPM:
cd backend && bundle install
Configuration:
Database creation
rails db:create
Database initialization
rails db:migrate
Run the project
rails s
Install the dependencies using Yarn:
cd frontend && yarn install
Run the project
yarn dev
OBS.: All route information has been documented with Swagger UI, and can be found in the /api-docs
route
Prefix | Verb | URI Pattern | Controller#Action |
---|---|---|---|
categories | GET | /api/categories(.:format) |
categories#index {:format=>:json} |
restaurants | GET | /api/restaurants(:format) |
restaurants#index {:format=>:json} |
restaurant | GET | /api/restaurants/:id(.:format) |
restaurants#show {:format=>:json} |
orders | POST | /api/orders(.:format) |
orders#create {:format=>:json} |
order | GET | /api/orders/:id(.:format) |
orders#show {:format=>:json} |
available_cities | GET | /api/available_cities(.:format) |
available_cities#index {:format=>:json} |
POST -> Orders
{
"order":{
"name": "Carlos Alves",
"phone_number": "22912345678",
"restaurant_id": 1,
"city": "Curitiba",
"street": "São João",
"neighborhood": "Tingui",
"number": "115",
"complement": "apartamento 4",
"order_products_attributes": [
{ "quantity": 1, "product_id": 1 },
{ "quantity": 9, "product_id": 2 }
]
}
}
curl http://localhost:3000/api/restaurants?
q=bravo # filter by query
&city=Maceio # filter by city
&category=mexicana # filter by category
Before starting, check and follow the instructions for contributing to the repository. If not, you can follow the instructions below:
- Fork the project
- Create a new branch: git checkout -b nova-branch
- Commit your changes: git commit -m 'I added something'
- Push to branch: git push origin nova-branch
- Open a Pull Request
If you want to report a bug or request a feature, go to Issue on the GitHub Project and add your request.
Created with 💜 by Carlos Alves