This app helps the freelance chefs to post their meals and sale them online. Our registered clients can order the meals they want or choosing a specific chef to order from according to his rate or cuisine. The guest user can have overview about our app also but with a limited permissions.
- User (guest) can overview the app.
- User can create an account and choose between a chef or client.
- Ability to search for a meal according to the meal name, ingredients, category or cuisine.
- Adding a specific chef to a favorite.
- Finding the top 10 rated chefs.
- Viewing the chef details, the service his offering (Delivery or Pickup), rating him and see his meal list.
- Users (chef, customer) can edit thier personal profile.
- The user can request several different meals from the same chef for one order.
- In Delivery service, the user can change his default address at the checkout page to a different address.
- In the Pickup service it will be showing the contact and the address of the chef.
- Apple to pay online or cash.
- User can check his order history.
- Order to prepare page helps the chef to organize the orders he has.
Project link is available at Hommy food App
First, to setup all the directories run the following in the main directory:
npm install
npm run setup
The first command will install cypress and some small libraries needed for running the rest of the commands. The second will go into the client and server directories and set those up to be ran.
In the client and server directory there are two .env.example files. Create a copy and rename that to .env. Then follow the instructions in those files to fill in the right values.
To run the app in dev mode you can run the following command in the main directory:
npm run dev
client
├── public
└── images
└── index.html
└── src
└── __tests__
└── __testUtils__
└── components
└── __tests__
└── Banner
└── CategoryListCards
└── chefsSlider
└── CuisineListButtons
└── CustomerPersonalInfo
└── Dropdown
└── EditFromPopUp
└── FavoriteChefCard
└── Footer
└── Header
└── InputForm
└── LoginForm
└── mealCard
└── MealList
└── MsgPopUp
└── OrderDetailsCards
└── OrderHistoryCard
└── OrdersHistory
└── OrderToPrepareCard
└── OrderToPrepareItem
└── OrderToPreparePopup
└── PersonalInfo
└── ProfileHeader
└── RateOfChef
└── RatingStar
└── SearchField
└── ShoppingCart
└── ShoppingCartCard
└── UploadImgWidget
└── contexts
└── authentication.js
└── msgPopup.js
└── hooks
└── __tests__
└── fetchOptions.js
└── postLoginInfo.js
└── useFetch.js
└── useWindowSize.js
└── pages
└── CheckoutPage
└── CreateMeal
└── EditMeal
└── FavoritesPage
└── Home
└── Login
└── MealDetailPage
└── OrdersHistoryPage
└── OrderToPrepare
└── Payment
└── ProfilePage
└── resultPage
└── ShoppingCart
└── SignUp
└── User
└── util
App.jsx
App.css
AppWrapper.jsx
index.jsx
cypress
└── fixtures
└── integration
└── plugins
└── support
server
└── src
└── __tests__
└── __testUtils__
└── controllers
└── category.js
└── cuisine.js
└── favorites.js
└── meal.js
└── orders.js
└── payment.js
└── rate.js
└── shoppingCart.js
└── user.js
└── db
└── connectDB.js
└── models
└── Category.js
└── Cuisine.js
└── Meal.js
└── User.js
└── routes
└── category.js
└── cuisine.js
└── favorites.js
└── meal.js
└── orders.js
└── payment.js
└── rate.js
└── shoppingCart.js
└── user.js
└── util
└── __tests__
└── logging.js
└── validateAllowedFields.js
└── validationErrorMessage.js
app.js
index.js
testRouter.js
README.md
public|| public facing client code.__tests__|| anyjesttests for specific components will be in a__tests__folder on the same level.__testUtils__|| any code that is only being used in the tests is put in the .__testUtils__folder to separate that away from the rest of the code.components|| all of our shared components that are used over multiple pages.hooks|| all of our custom hooks.pages|| the page components of our app, any routing will go between these components.pages/components|| components used specifically on those pages.util|| any utility functions that can be used anywhere on the client side.index.jsx|| the start point of the client with providers.app.jsx|| storing the app routes.
fixtures|| any data/files thatcypressneeds can be placed here.integration|| all of our tests are in here, separated in folders based on the pages in our app.plugins|| any plugins for ourcypressconfiguration can be placed here.support|| custom commands and other support files forcypresscan be placed here.
__tests__|| anyjesttests for the api endpoints as that is our testing strategy for the backend.__testUtils__|| any code that is only being used in the tests is put in the__testUtils__folder to separate that away from the rest of the code.controllers|| all of our controller functions that interact with the database.db|| all of our configuration for the database.models|| all of ourmongoosemodels will be placed here.routes|| code to match up the API with our controllers.util|| any utility functions that can be used anywhere on the server side.index.js|| the start point of the server.app.js|| creates express server and attaches the routes.
The base stack of the app is a MERN stack (Mongoose, Express, React, Node). Next to that we make use of the following extras:
dotenv|| To load the .env variables into the process environment. See docswebpack/html-webpack-plugin|| To bundle our React app and create a static app to host. See docshusky|| To run our tests and linter before committing. See docseslint|| To check our code. We have different configurations for frontend and backend. You can check out the configuration in the.eslintrc.(c)jsfiles in the respectiveclientandserverfolders. See docsprettier|| To automatically format our code. See docsconcurrently|| To run commands in parallel. See docs
For more information on how these work together including the automatic deployment to heroku, have a look at our detailed DEV file.
@testing-library/*|| We use React Testing Library to write all of our tests. See docsjest|| To run our tests and coverage. See docsjest-fetch-mock|| To mock out the backend for our testing purposes. See docsprop-types|| To type-check our components. See docscloudinary|| To help us upload images and save the url of it in database. See docsemailjs|| It help us creating contact form without using backend code. See docsbootstrap|| To help us styling our app. See docsreact-stripe-checkout|| To connect our frontend payment data to the backend. See docsswiper|| It simpilize our touch slider for mobile version. see docs
nodemon|| To automatically restart the server when in development mode. See docsjest|| To run our tests and coverage. See docssupertest|| To more easily test our endpoints. See docsmongodb-memory-server|| To mock out our database in our backend tests. See docscors|| To open up our API. See docsmongoose|| To add schemas to our database. See docsstripe|| To allow our app online payment by using the third party payment process. See docsbcrypt|| Helping us hashing the passwords. see docsdotenv|| To Store configuration in the environment separate. see doscjsonwebtoken|| To share security information between two parties (client and server). see docs


