RY
ryanmwakio/eshop
eshop web app with Node, Express, mongo database, EJS, Tailwind complete with emailing, invoice pdf generation and auto billing.
eshop


eshop, an eccomerce platform for selling and buying goods ready with m-pesa intergration and invoice generation.
sample invoice
features include:
- email sending on authentication processes and once order is sent.
- signup
- forgot password
- signin
- payment integration
architecture
we are using the (MVC) paradigm for developing this software. This facilitates separation of concerns and decouples the software for ease in debugging and for collaboration.
model - database layer
view - the client side of the app
controller - all the business logic (the middle layer)
*for the views we are using ejs
* for database we are using mongodb
Folder structure:
eshop
│ README.md
│ app.js (the entry point)
│ package.json
│ Procfile
│ tailwind.config.js
│
+───models (all models)
│ │ Order.js
│ │ Product.js
│ │ ...
│
│
+───views (all client side views)
| shop.ejs
| cart.ejs
| orders.ejs
| ...
| + auth
| │ login.ejs
| │ register.ejs
| │ reset.ejs
| │ ...
| + include (all the view partials that are reusable)
| | navbar.ejs
|
+ public (folder exposed to public)
| + css
| + images
| + js (client side js)
|
+ routes (all routes and http verbs)
|
|
+ util (utility functions that can be reused)
Run the app
Clone the project
Install all dependencies
npm install
Generate a .env file at the root
#express config
HOST="your host"
HOST_URL="your url"
#database variables
MONGO_USER="mongodb username"
MONGO_PASSWORD="your password"
MONGO_DATABASE="database name"
#firebase config
CLOUDINARY_NAME="cloudinary name"
CLOUDINARY_API_KEY="cloudinary key"
CLOUDINARY_API_SECRET="cloudinary secret"
npm run serverOn this page
Languages
CSS97.6%JavaScript1.2%EJS1.1%Procfile0.0%
Contributors
Created December 2, 2021
Updated August 19, 2023

