KarmaFarm is built on React/Redux, HTML, and CSS for its frontend, Express and Sequelize for its backend, and a PostgreSQL database.
https://karmafarm-app.herokuapp.com/
- Clone this repository
git clone https://github.com/da5idf/karmafarm.git
- Install dependencies
npm install
-
Create a .env file in the root direction based on the .env.example given.
-
Create a user in psql based on your .env DB_USERNAME.
psql -c "CREATE USER <username> PASSWORD '<password>' CREATEDB"
-
Create a database in psql based on your .env DB_DATABASE.
-
Start your shell and migrate and seed the database.
npx dotenv sequelize db:migrate
npx dotenv sequelize db:seed:all
- Change directory into the frontend and backend folders in two shells. Run both servers with:
npm start
On the Dashboard, Restaurant Users can view their orders, view newly release items and submit feedback on their orders.
If the Restaurant User is the owner of that Restaurant, this User is an admin user. By being an admin user, an Admin Key
button renders at the top of the dashboard. The admin user can provide this key to staff of the restaurant to enable them
to create their own profiles as a member of the Restaurnat.
Logging in as a Farmer gives the user additional features.
- Instead of a feedback form, the Farmer views a list of feedback.
- All restaurants are rendered as Restaurant Cards
- The Farmer can select one of the Restaurt Cards to filter the order list and feedback list for only that restaurant.
Clicking "New Order" on the restaurant dashboard takes the restaurant user to a New Order page where they can browsing products. Here, users can add items to their cart by selecting a quantity and pressing "Add to Cart". Users can edit the quantitiy of an item or remove an item from their cart from this page as well.
Clicking "View Cart" from the New Order page takes the restaurant user to the cart view of their order. Each item is displayed as a line item on a table, with the order total and order item count conveniently located at the top right of the page. Like on the New Order page, users can edit or remove items from their cart from this page as well. In addition, Users must select a delivery date in order to submit the order.
Upon successful submission of an order, users can view an invoice of their order. If the order is not within 24-hours of delivery, they can reopen the order by clicking "Reopen Order" at the top of the page. This will allow users to add or edit products on their order.
The Farmer Users can add or edit products from their Product Page.