The Delivery App consists four basic pages:
- Home Page
- Cart Page
- History Page
- Coupons Page
On the Home page users can choose a shop, then add goods to the cart (data will be gotten from the database).
On the Cart Page the user can check all added products, change the count.
And add an email, a phone number, and an address (in inputs). The order will be saved in the database after the user clicks the “submit” button, which will appear after verification captcha. Also, the user can apply coupons on discount.
Users can order products only from one shop. For example, if the user chooses McDonald's, the cart will be cleared, and so on.
Users can choose their address using a marker on the map. The user should grab the marker and move it in a place which is needed and let it go. The needed address will appear in an appropriate input field.
When the user choosed products and opened Cart Page, initially the marker places in a point, which has coordinates of choosed shop.
The App shows route from shop to user’s address and approximately time (in hours) of delivering.
Users can find their orders on History Page.
Users can see all coupons (coupons will be used for discounts, users can apply them on the shopping cart page)
One coupon the user can use one time!
The application has 3 parts:
- Client
- Server
- Database
DataBase was created by using:
To get a local copy up and running follow these simple example steps.
- Clone the repo
git clone https://github.com/vlasiuk-anatolii/delivery-app
- Go to frontend folder
cd frontend
- Install NPM packages
npm install
- Type in the terminal
npm start
- After that, client will start on http://localhost:3000
-
If cloned repo: https://github.com/vlasiuk-anatolii/delivery-app
-
Go to backend folder
cd backend
- Install NPM packages
npm install
- Type in the terminal
npm start
- After that, you should see:
- It means, that your server is started.
-
File for restore db db.sql exists in the folder db which you will get when cloned repo https://github.com/vlasiuk-anatolii/delivery-app
-
Install on your computer PostgreSQL.
-
Creat empty database with name Products.
-
You should used utility of PostgreSQL such as pg_restore and restore data base with specified name.
-
Restored database must consists 3 tables: 'shops', 'products', 'orders'.
- If you reached this, it means that your have done all steps well.
You can use system!
The server interacts with database through ORM "Sequelize". Sequelize escapes replacements, which avoids the problem SQL injection attacks.
The server was implemented by using MVC architectural pattern.
In accordance with the policy of CORS was used cors node.js package.
Was choosed a place for deploy - AWS. Was created instance on EC2 service. All elements of project were migrated from Windows platform to Ubuntu
- Vlasiuk Anatolii - Vlasiuk Anatolii - Delivery App