This repository contains the source code for an E-commerce application. The application is built using Flask for the backend and Vue JS for the front end. The app is a comprehensive multi-user platform designed for efficient grocery shopping. Users can sign up, buy products across various categories, and enjoy role-based access control. With features like category and product management, background jobs, reporting, and alert functionalities, the app ensures a seamless and secure experience for customers, administrators, and store managers alike.
- Tech
- Installation
- Features
- User Roles
- Functionality
- Database ER Diagram
- Project Directory
- Application Snaps
- References
Some of the major libraries/technologies used for the application.
-
Backend
- Flask
- Flask Security
- Flask Restful
- Flask SQLAlchemy
- Flask Cache
- Celery
-
Frontend
- Dynamic Operation: Vue JS
- Styling: Bootstrap
First, make sure you have Conda installed on your system. You may setup your environment using pip.
Use the provided environment.yml
file to create a Conda environment named "grocery".
conda env create -f environment.yml
conda activate grocery
python main.py
celery -A main:celery_app worker --loglevel INFO
celery -A main:celery_app beat --loglevel INFO
sudo apt-get -y install golang-go
go install github.com/mailhog/MailHog@latest
~/go/bin/MailHog
- User Signup and Login: Secure authentication using Role-Based Access Control (RBAC).
- Mandatory Admin Login: Access control for administrators with special privileges.
- Store Manager Signup and Login: Role-specific authentication for store managers.
- Category and Product Management: Efficiently manage grocery categories and products.
- Search Functionality: Easily search for categories and products.
- Buy Products: Enable users to purchase products from one or multiple categories.
- Backend Jobs: Execute background tasks for improved system performance.
- Export Jobs: Export data for reporting and analysis.
- Reporting Jobs: Generate reports for insights into grocery sales.
- Alert Jobs: Receive alerts for important events or updates.
- Backend Performance: Optimize and monitor backend performance.
- User: Regular users who can purchase groceries.
- Admin: Administrators with elevated privileges for system management.
- Store Manager: Manage products, request new sections and oversee category additions.
-
Category and Product Management:
- Add, edit, and delete categories.
- Manage product details, including ID, name, manufacturing/expiry date, and rate per unit.
-
User Operations:
- Sign up and login securely based on RBAC.
- Purchase products from one or multiple categories.
-
Store Manager Operations:
- Sign up and log in with role-specific privileges.
- Add new products and request the addition of new sections/categories.
- View the latest products added automatically.
<!-- root directory -->
.
├── application <!-- Backend code and logic -->
│ ├── cache.py
│ ├── __init__.py
│ ├── models.py <!-- Data model declaration -->
│ ├── __pycache__
│ ├── resources.py <!-- CURD for Category & Product through API call -->
│ ├── sec.py
│ ├── service.py <!-- Email & PDF report generation -->
│ ├── tasks.py <!-- Celery based functionality -->
│ ├── templates/ <!-- Reports and email templates -->
│ ├── utils.py
│ ├── validation.py
│ ├── views.py <!-- All backend management functions -->
│ └── worker.py
├── buffer
├── celeryconfig.py
├── config.py
├── environment.yml
├── instance <!-- Database file -->
│ └── dev.db
├── main.py <!-- Application operating point -->
├── README.md
├── requirements.txt
├── static
│ ├── components <!-- Frontend code and UI components -->
│ │ ├── admin/ <!-- Admin directory -->
│ │ ├── customer/ <!-- Customer directory -->
│ │ ├── home.js
│ │ ├── landing.js
│ │ ├── login.js
│ │ ├── manager/ <!-- Manager directory -->
│ │ ├── navbar.js
│ │ ├── privacy.js
│ │ └── register.js
│ ├── snaps/images/ <!-- Frontend snaps/images -->
│ ├── index.js
│ ├── router.js
│ └── style.css
├── templates
│ └── index.html
└── upload_initial_data.py
- MAD II Project Study Resources: https://viva-workflow-z5snvc5h3q-el.a.run.app/student/study_resources
- MAD II Playlist: https://www.youtube.com/playlist?list=PLMO2LgIT9_Cfa123DfskneR_zQ4LGAk90
- Vue Js Documentation: https://vuejs.org/guide/introduction.html
- Clerly: https://docs.celeryq.dev/en/stable/
- Flask Documentations
For more details or any clarifications, please feel free to contact me @[email protected].
Thank You,
Omm Prakash Sahoo