Skip to content

Nav-cmd/GreenLife-Organics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒฟ GreenLife Organic Store Management System

A full-featured desktop retail management platform for the modern organic marketplace


Platform Language Framework Database Architecture Pattern Status


C# .NET Framework Windows Forms SQL Server Visual Studio ADO.NET MailKit iTextSharp


Designed & Developed by Naveen Nagendran

GitHub Email


๐Ÿ“‹ Table of Contents


๐ŸŒฑ Overview

The GreenLife Organic Store Management System is a robust, desktop-based retail management application designed to address the operational challenges faced by small and medium-scale organic retailers. It replaces inefficient manual processes with a structured, automated digital platform โ€” covering everything from product cataloguing and inventory tracking to customer management, order processing, payment handling, and automated reporting.

Built using C# and the .NET Framework 4.8 with Windows Forms as the UI layer and Microsoft SQL Server as the backend relational database (accessed via ADO.NET), the system follows a rigorous three-tier layered architecture and applies Object-Oriented Programming (OOP) principles throughout โ€” making it maintainable, scalable, and extensible.

๐ŸŽฏ The Problem

Organic retail businesses managing a wide variety of perishable and eco-friendly products face compounding operational challenges:

  • Manual stock tracking leads to overstocking or out-of-stock situations for time-sensitive organic goods
  • Dispersed customer records make it difficult to understand purchasing patterns or maintain relationships
  • No unified order management results in fulfilment delays and poor visibility into order statuses
  • Fragmented promotional management means discounts are applied inconsistently or missed entirely
  • No reporting tools limit the ability to make data-driven business decisions

โœ… The Solution

GreenLife provides a single, integrated desktop application serving two distinct user roles:

Role Responsibilities
๐Ÿ› ๏ธ Administrator Manage products, inventory, customers, orders, discounts, reviews, notifications, suppliers, and generate reports
๐Ÿ›’ Customer Browse and search products, manage a cart and wishlist, check out securely, track orders, and rate products

๐ŸŒ Real-World Scenario

A store manager (Admin) logs into GreenLife each morning, checks the dashboard for low-stock alerts and overnight orders, updates product inventory after a supplier delivery, and applies a new weekend discount promotion. Meanwhile, a registered customer browsing from their desktop discovers a featured product, adds it to their wishlist, applies a discount code at checkout, completes payment, and receives a confirmation notification โ€” all within the same unified application.


๐Ÿ—๏ธ System Architecture

The system follows a clean Three-Tier Layered Architecture, separating responsibilities into three well-defined layers:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     PRESENTATION LAYER                          โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚     Admin Interface     โ”‚   โ”‚    Customer Interface        โ”‚  โ”‚
โ”‚  โ”‚  Dashboard ยท Products   โ”‚   โ”‚  Home ยท Products ยท Cart      โ”‚  โ”‚
โ”‚  โ”‚  Orders ยท Reports       โ”‚   โ”‚  Payment ยท Orders ยท Profile  โ”‚  โ”‚
โ”‚  โ”‚  Discounts ยท Suppliers  โ”‚   โ”‚  Wishlist ยท Reviews          โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                               โ”‚
                               โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                   APPLICATION LOGIC LAYER                       โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚ Auth Service โ”‚ โ”‚Product Catalogโ”‚ โ”‚  Cart / Order Serviceโ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚ Notification โ”‚ โ”‚   Payment     โ”‚ โ”‚  Shared Business     โ”‚   โ”‚
โ”‚  โ”‚   Service    โ”‚ โ”‚   Gateway     โ”‚ โ”‚     Logic API        โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                โ”‚                          โ”‚
                โ–ผ                          โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚       DATA LAYER         โ”‚   โ”‚    EXTERNAL COMMUNICATION    โ”‚
โ”‚  Microsoft SQL Server    โ”‚   โ”‚                              โ”‚
โ”‚  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€   โ”‚   โ”‚   Mail Server                โ”‚
โ”‚  Users ยท Products        โ”‚   โ”‚   (MailKit / SMTP)           โ”‚
โ”‚  Orders ยท Inventory      โ”‚   โ”‚                              โ”‚
โ”‚  Payments ยท Reviews      โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚  Notifications           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
Layer Responsibility
Presentation Windows Forms UI for Admin and Customer roles
Application Logic C# OOP classes handling business rules, validations, and service orchestration
Data SQL Server relational database accessed via ADO.NET with enforced relational integrity
External MailKit-powered SMTP mail server for automated email notifications

โœจ Key Features

๐Ÿ” Authentication & Access Control

  • Secure login with encrypted (hashed + salted) credentials
  • Role-Based Access Control (RBAC) โ€” Admin vs Customer
  • Password reset via automated email (MailKit / SMTP)
  • Session management and controlled access to protected routes

๐Ÿ‘จโ€๐Ÿ’ผ Admin Panel

Module Capabilities
๐Ÿ“Š Dashboard Real-time KPIs โ€” total sales, active orders, products in stock, low-stock alerts
๐Ÿ“ฆ Product Management Full CRUD โ€” add, update, delete products; manage categories, supplier links, pricing, stock, and discounts
๐Ÿ‘ฅ Customer Management View, search, and update all registered customer accounts
๐Ÿšš Order Management Monitor all orders; update status through Pending โ†’ Shipped โ†’ Delivered lifecycle
๐Ÿท๏ธ Discount Management Create time-bound percentage or fixed-value discounts; automatic price recalculation
โญ Reviews Management Moderate and view all customer product reviews and star ratings
๐Ÿ”” Notifications Send and manage system-wide notifications; read/unread tracking
๐Ÿ“ˆ Reports Date-range-filtered Sales, Stock, and Customer Order History reports โ€” Export to CSV and Export to PDF via iTextSharp
๐Ÿญ Supplier Management Add, update, and manage supplier records; link suppliers to product inventory

๐Ÿ›’ Customer Panel

Module Capabilities
๐Ÿ  Home Page Personalized dashboard with featured products, active promotions, and cart/order/wishlist summary widgets
๐Ÿ” Product Browsing Search by name; filter by category and price range; full product detail views
๐Ÿ›’ Shopping Cart Add/remove products, adjust quantities, live discount and delivery fee calculation, order summary
๐Ÿ’ณ Payment & Checkout Multi-method payment (Cash, Card, Bank Transfer); delivery address entry; stock auto-decrement on confirmation
๐Ÿ“ฆ Order Tracking Full order history with status progression (Pending โ†’ Shipped โ†’ Delivered) and delivery details
โค๏ธ Wishlist Save products for future purchase; move items directly to cart
๐Ÿ‘ค Profile Management View and update personal information and delivery addresses
โญ Product Reviews Leave star ratings and written reviews post-purchase

๐Ÿ› ๏ธ Technology Stack

Core Language & Framework

Component Technology Details
Primary Language C# OOP-first, strongly typed, .NET ecosystem
Application Framework .NET Framework 4.8 Windows desktop runtime environment
UI Framework Windows Forms (WinForms) Graphical forms, data grids, panels, navigation
Database Connectivity ADO.NET Parameterized queries, connection management

Database

Component Technology
RDBMS Microsoft SQL Server Express
Admin Tool SQL Server Management Studio (SSMS)
Schema Design Tool dbdiagram.io

External Libraries

Library Purpose Source
MailKit Automated SMTP email โ€” registration, OTP, order confirmations jstedfast/MailKit
iTextSharp PDF report and invoice generation iText Group

Development & Modelling Tools

Tool Purpose
Visual Studio Primary IDE โ€” IntelliSense, WinForms designer, integrated debugger, build system
draw.io UML diagram modelling (Use Case, Sequence, Class Diagrams)
dbdiagram.io Entity-Relationship and database schema visualization

๐Ÿ—„๏ธ Database Design

The database is implemented in Microsoft SQL Server using a fully relational schema with primary key and foreign key constraints enforced throughout. The schema is organized into six logical domains:

User & Access Control

Roles โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ Users โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ UserAddresses
(Admin, Customer)         (Auth, Profile)     (Delivery Addresses)

Product & Inventory

Categories โ”€โ”€โ–บ Products โ—„โ”€โ”€ ProductSuppliers โ”€โ”€โ–บ Suppliers
                  โ”‚
                  โ””โ”€โ”€โ–บ ProductDiscounts โ”€โ”€โ–บ Discounts

Order & Transaction Lifecycle

Orders โ”€โ”€โ–บ OrderItems
  โ”‚
  โ”œโ”€โ”€โ–บ OrderStatus โ”€โ”€โ–บ OrderStatusHistory
  โ”‚
  โ””โ”€โ”€โ–บ Payments โ”€โ”€โ–บ PaymentMethods / PaymentStatus

Customer Engagement

Users โ”€โ”€โ–บ Carts โ”€โ”€โ–บ CartItems
      โ”€โ”€โ–บ Wishlist โ”€โ”€โ–บ WishlistItems
      โ”€โ”€โ–บ ProductReviews
      โ”€โ”€โ–บ Notifications โ”€โ”€โ–บ NotificationTypes

Full Schema Summary

Domain Tables
Users & Auth Roles, Users, UserAddresses
Product Catalog Categories, Products, Suppliers, ProductSuppliers
Promotions Discounts, ProductDiscounts
Orders Orders, OrderItems, OrderStatus, OrderStatusHistory
Payments Payments, PaymentMethods, PaymentStatus
Customer Activity Carts, CartItems, Wishlist, WishlistItems, ProductReviews
Communication Notifications, NotificationTypes

All tables enforce primary key and foreign key constraints, ensuring referential integrity and consistent relationships across all system operations.


๐Ÿ“ฆ Module Breakdown

Module 1 โ€” User Management

Handles all aspects of account lifecycle: registration, login authentication, role assignment, profile editing, and secure session control. The Users table maintains hashed/salted passwords and role references. Admins and Customers each have role-restricted views of the system.

Module 2 โ€” Product & Inventory Management

Enables administrators to manage the full product catalog with add, update, and delete operations. Products are linked to categories, suppliers, and optional discount records. The system monitors stock levels in real time and generates automated low-stock alerts when quantities fall below defined thresholds.

Module 3 โ€” Order Processing

Manages the complete order lifecycle from cart checkout through to delivery confirmation. Covers stock validation at checkout, order record creation, status progression (Pending โ†’ Shipped โ†’ Delivered), and automatic inventory deduction on confirmed purchase.

Module 4 โ€” Cart & Wishlist

Temporary product selection (Cart) and product bookmarking (Wishlist) are handled as separate but related modules. Customers can adjust quantities, remove items, and move wishlist products directly to the cart. Cart totals auto-update with applied discounts and delivery fees.

Module 5 โ€” Payment Management

Processes financial transactions with support for multiple payment methods (Cash, Card, Bank Transfer). Records payment amount, method, and status against each order. Card payment captures holder name, card number, CVV, and expiry date. All payment records are stored with full traceability.

Module 6 โ€” Notification & Communication

Generates and dispatches automated system alerts via the integrated MailKit email service โ€” covering registration confirmation, order status updates, low-stock warnings, and promotional announcements. Notifications are tracked with read/unread states in the database.

Module 7 โ€” Review & Feedback

Post-purchase, customers may submit star ratings and written reviews for products they have ordered. Administrators can monitor all submitted reviews through the dedicated Reviews Management panel and moderate content as required.

Module 8 โ€” Reporting & Analytics

Administrators can generate and export a range of business intelligence reports filtered by date range, including:

  • Sales Reports โ€” order-level revenue and product performance
  • Stock / Inventory Reports โ€” current stock levels, low-stock items, reorder status
  • Customer Order History โ€” full per-customer transaction records

Reports are exportable as CSV for further analysis and PDF via iTextSharp for printing and distribution.


๐Ÿงฉ OOP Design Principles

The system is architected around four core Object-Oriented Programming principles applied consistently throughout every module.

Inheritance

User  (base class โ€” credentials, contact info, account status)
 โ”œโ”€โ”€ Admin    โ†’ manageProducts(), viewOrders(), generateReports(), sendNotification()
 โ””โ”€โ”€ Customer โ†’ addToCart(), placeOrder(), writeReview(), addToWishlist()

Common attributes and behaviours are defined once in User and inherited by both Admin and Customer โ€” eliminating duplication and enforcing a consistent user model.

Encapsulation

All business logic and data access operations are encapsulated within dedicated class files, fully separated from Windows Forms UI code:

  • Admin_ProductsClass โ€” encapsulates all product business logic
  • CustomerCartClass โ€” manages all cart state and operations
  • PaymentProcessClass โ€” handles transaction workflows with database-level atomicity (SQL transactions across multiple tables)

Abstraction

Each class exposes clean, well-named public methods to the UI layer, hiding internal implementation details entirely. UI forms interact only through defined method interfaces โ€” the form does not know how a query is constructed, only that LoadProducts() returns the data it needs.

Single Responsibility

Each class is designed around one operational concern. CRUD patterns are consistently applied across all data-driven modules, and PascalCase naming conventions are enforced throughout for classes, methods, and properties.


๐Ÿ”’ Security Implementation

Security Feature Implementation
Password Storage Hashed and salted encryption โ€” plaintext passwords are never stored or transmitted
Role-Based Access RBAC enforced at the application layer โ€” admin routes are inaccessible to the customer role
Input Validation All user inputs validated before database interaction to prevent malformed data errors
SQL Injection Prevention Parameterized queries used throughout all ADO.NET data access operations
Session Management Session state managed per user login; logout fully invalidates the active session
Secure DB Connection Controlled connection strings; connection scope minimized per operation

๐Ÿ“ UML Diagrams

The system was modelled using draw.io for UML diagrams and dbdiagram.io for the database schema before implementation.

Use Case Diagram

Covers both actor roles โ€” Customer and Admin โ€” with the following use cases:

Customer: Login ยท Register ยท Browse Products ยท Search Products ยท Add to Cart ยท Checkout ยท Make Payment ยท Apply Discount ยท Track Order ยท View Order History ยท Write Review ยท Manage Wishlist

Admin: View/Update Customer Details ยท Manage Products ยท Manage Categories ยท Manage Suppliers ยท Manage Discounts ยท View/Update Orders ยท Monitor Low Stock ยท Receive Notifications ยท Generate Reports

Sequence Diagram

Captures the full interaction flow across all system components: Customer, Admin, Web Application, Authentication Service, Product Catalog, Cart Service, Order Service, Payment Gateway, Database, and Notification Service โ€” from login through to checkout confirmation.

Class Diagram

Defines the full OOP class structure with attributes, methods, and relationships โ€” including association, dependency, composition, and inheritance links between: User, Admin, Customer, Product, Category, Order, OrderItem, Cart, CartItem, Wishlist, WishlistItem, Payment, Supplier, Discount, Review, and Notification.

๐Ÿ“ Diagram images are available in the docs/diagrams/ folder of this repository.


๐Ÿ’ป System Requirements

Hardware Requirements

Component Admin Customer
Processor Intel Core i3 (13th Gen) or higher Intel Core i3 or equivalent
RAM Minimum 8 GB Minimum 8 GB
Storage 512 GB SSD 256 GB SSD
UPS 650VA โ€“ 1200VA โ€”
Printer Ink Tank Printer (for reports/invoices) โ€”
Network Broadband Internet Internet connectivity

Software Requirements

Software Admin Customer
Operating System Windows 11 Pro Windows 10 / Windows 11
.NET Framework 4.8 4.8
SQL Server SQL Server Express โ€”
SSMS SQL Server Management Studio โ€”
GreenLife Application โœ… Required โœ… Required

โš™๏ธ Installation & Setup

Step 1 โ€” Install Prerequisites

# Install the following on the host machine:
1. Windows 10 or Windows 11
2. .NET Framework 4.8
   โ†’ https://dotnet.microsoft.com/en-us/download/dotnet-framework/net48
3. Microsoft SQL Server Express
   โ†’ https://www.microsoft.com/en-us/sql-server/sql-server-downloads
4. SQL Server Management Studio (SSMS)
   โ†’ https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms
5. Visual Studio (for building from source)
   โ†’ https://visualstudio.microsoft.com/

Step 2 โ€” Configure the Database

-- 1. Open SQL Server Management Studio (SSMS)
-- 2. Connect to your local SQL Server instance
-- 3. Create the database
CREATE DATABASE GreenLifeOrganicStoreDB;

-- 4. Open Database/GreenLifeOrganicStoreDB.sql and execute it
--    This generates all tables, constraints, and relationships

-- 5. Insert seed data before first use
INSERT INTO Roles (RoleName) VALUES ('Administrator'), ('Customer');

INSERT INTO Categories (CategoryName)
VALUES ('Fruits'), ('Vegetables'), ('Dairy Products'), ('Greens'), ('Sweet');

INSERT INTO Users (Name, Username, Email, Phone, PasswordHash, IsAdmin)
VALUES ('Store Admin', 'admin', 'admin@greenlife.com', '0000000000', '<hashed_password>', 1);

Step 3 โ€” Configure the Application

<!-- Update the connection string in App.config -->
<connectionStrings>
  <add name="GreenLifeDB"
       connectionString="Server=YOUR_SERVER_NAME;
                         Database=GreenLifeOrganicStoreDB;
                         Integrated Security=True;"
       providerName="System.Data.SqlClient" />
</connectionStrings>

โš ๏ธ Replace YOUR_SERVER_NAME with your actual SQL Server instance name โ€” e.g., .\SQLEXPRESS or localhost\SQLEXPRESS.

Step 4 โ€” Build and Run

# 1. Open GreenLife.sln in Visual Studio
# 2. Restore NuGet packages (MailKit, iTextSharp)
#    โ†’ Tools โ†’ NuGet Package Manager โ†’ Restore Packages
# 3. Build the solution
#    โ†’ Ctrl + Shift + B
# 4. Run the application
#    โ†’ F5 (debug) or Ctrl + F5 (without debug)
# 5. The Login screen will appear โ€” log in with the admin account to begin

๐Ÿงช Testing

The system was validated through a comprehensive structured test plan covering all core functional areas โ€” including both positive (valid input) and negative (invalid/edge case) scenarios.

Test Case Feature Area Test Scenario Result
TC-01 Registration Valid user registration with all required fields โœ… Passed
TC-02 Email Email notification delivery via MailKit โœ… Passed
TC-03 Authentication Valid login credentials โ€” correct dashboard routing โœ… Passed
TC-04 Password Recovery Forgot password โ€” OTP email flow and reset โœ… Passed
TC-05 Supplier Supplier add and update operations โœ… Passed
TC-06 Product Product creation with all required fields โœ… Passed
TC-07 Input Validation Negative price value rejection โœ… Passed
TC-08 Discounts Discount creation and product association โœ… Passed
TC-09 Discount Calculation Correct discounted price applied at checkout โœ… Passed
TC-10 Search Product search by keyword โ€” accurate filtering โœ… Passed
TC-11 Cart Add to cart and quantity update โœ… Passed
TC-12 Cart Quantity Quantity increment and decrement validation โœ… Passed
TC-13 Wishlist Add and remove product from wishlist โœ… Passed
TC-14 Wishlist Guard Duplicate wishlist entry prevention โœ… Passed
TC-15 Payment End-to-end payment processing and order confirmation โœ… Passed
TC-16 Review Product review and star rating submission โœ… Passed

Debugging Tools Used During Development

  • Breakpoint Debugging โ€” Step-through execution for logic tracing in Visual Studio
  • Error Visualization Panel โ€” Real-time error markers in the editor for syntax and type errors
  • IntelliSense โ€” Type-safe code completion reducing runtime errors at authoring time
  • Try-Catch Blocks โ€” Structured exception handling at all database and external call boundaries

๐Ÿ“ Project Structure

GreenLife/
โ”‚
โ”œโ”€โ”€ Forms/
โ”‚   โ”œโ”€โ”€ Auth/
โ”‚   โ”‚   โ”œโ”€โ”€ Login.cs
โ”‚   โ”‚   โ”œโ”€โ”€ Register.cs
โ”‚   โ”‚   โ””โ”€โ”€ ForgotPassword.cs
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ Admin/
โ”‚   โ”‚   โ”œโ”€โ”€ AdminDashboard.cs
โ”‚   โ”‚   โ”œโ”€โ”€ Admin_Products_Management.cs
โ”‚   โ”‚   โ”œโ”€โ”€ CustomerManagement.cs
โ”‚   โ”‚   โ”œโ”€โ”€ OrderManagement.cs
โ”‚   โ”‚   โ”œโ”€โ”€ DiscountsManagement.cs
โ”‚   โ”‚   โ”œโ”€โ”€ ReviewsManagement.cs
โ”‚   โ”‚   โ”œโ”€โ”€ Notifications.cs
โ”‚   โ”‚   โ”œโ”€โ”€ Reports.cs
โ”‚   โ”‚   โ””โ”€โ”€ SupplierManagement.cs
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ Customer/
โ”‚       โ”œโ”€โ”€ CustomerDashboard.cs
โ”‚       โ”œโ”€โ”€ CustomerProducts.cs
โ”‚       โ”œโ”€โ”€ CustomerCart.cs
โ”‚       โ”œโ”€โ”€ Payment.cs
โ”‚       โ”œโ”€โ”€ CustomerOrders.cs
โ”‚       โ”œโ”€โ”€ Wishlist.cs
โ”‚       โ””โ”€โ”€ CustomerProfile.cs
โ”‚
โ”œโ”€โ”€ Classes/
โ”‚   โ”œโ”€โ”€ Admin_Dashboard_Class.cs
โ”‚   โ”œโ”€โ”€ Admin_ProductsClass.cs
โ”‚   โ”œโ”€โ”€ CustomerManagementClass.cs
โ”‚   โ”œโ”€โ”€ OrderManagementClass.cs
โ”‚   โ”œโ”€โ”€ DiscountClass.cs
โ”‚   โ”œโ”€โ”€ ReviewsClass.cs
โ”‚   โ”œโ”€โ”€ NotificationsClass.cs
โ”‚   โ”œโ”€โ”€ ReportsClass.cs
โ”‚   โ”œโ”€โ”€ SupplierClass.cs
โ”‚   โ”œโ”€โ”€ CustomerDashboardClass.cs
โ”‚   โ”œโ”€โ”€ CustomerProductsClass.cs
โ”‚   โ”œโ”€โ”€ CustomerCartClass.cs
โ”‚   โ”œโ”€โ”€ PaymentProcessClass.cs
โ”‚   โ”œโ”€โ”€ WishlistManager.cs
โ”‚   โ”œโ”€โ”€ CustomerOrderClass.cs
โ”‚   โ””โ”€โ”€ CustomerProfileClass.cs
โ”‚
โ”œโ”€โ”€ Database/
โ”‚   โ””โ”€โ”€ GreenLifeOrganicStoreDB.sql
โ”‚
โ”œโ”€โ”€ docs/
โ”‚   โ””โ”€โ”€ diagrams/
โ”‚       โ”œโ”€โ”€ architecture-diagram.png
โ”‚       โ”œโ”€โ”€ database-erd.png
โ”‚       โ”œโ”€โ”€ use-case-diagram.png
โ”‚       โ”œโ”€โ”€ sequence-diagram.png
โ”‚       โ””โ”€โ”€ class-diagram.png
โ”‚
โ”œโ”€โ”€ App.config
โ””โ”€โ”€ GreenLife.sln

๐Ÿ”ฎ Future Enhancements

The system is architected to support the following planned extensions:

  • โ˜๏ธ Cloud Deployment โ€” Migration to Azure SQL / Azure App Service for remote multi-user access
  • ๐Ÿ“ฑ Mobile Application โ€” Companion Android/iOS app for customers
  • ๐Ÿ’ณ Online Payment Gateway โ€” Integration with Stripe, PayPal, or regional gateways
  • ๐Ÿ“Š Advanced Analytics โ€” Real-time trend charts for sales performance and stock forecasting
  • ๐Ÿ”” Push Notifications โ€” Real-time in-app and push notification service
  • ๐ŸŒ Web Portal โ€” Responsive browser-based interface as an alternative to the desktop client

๐Ÿ‘จโ€๐Ÿ’ป Developer

Naveen Nagendran

Role Software Engineer
Specialisation C# ยท .NET ยท SQL Server ยท Desktop & Full-Stack Development
GitHub github.com/Nav-cmd
Email nn5012089@gmail.com

GreenLife is my first independently designed and delivered full-stack desktop application. I conceived, architected, and implemented the entire system end-to-end โ€” from requirements analysis and relational database design through to every UI screen, business logic class, security mechanism, test case, and technical document.

The project gave me deep, hands-on experience with real-world software engineering practices: three-tier architecture design, OOP class hierarchies, ADO.NET database integration, structured testing, and professional documentation โ€” the full software development lifecycle from blank canvas to completed product.

๐Ÿ’ก This project demonstrates my ability to architect and deliver a complete, production-quality software system โ€” covering layered architecture design, OOP implementation, relational database design, security practices, and comprehensive testing.

GitHub Email


๐Ÿ“š References


๐Ÿ“„ License

MIT License โ€” feel free to explore, fork, and build on this project.


๐ŸŒฟ GreenLife Organic Store Management System Designed & Developed by Naveen Nagendran ยท 2026

C# SQL Server .NET

"A comprehensive software solution that effectively addresses the operational needs of a modern organic store."

About

๐ŸŒฟ A full-featured desktop retail management system for organic stores โ€” built with C#, .NET Framework 4.8, Windows Forms & SQL Server. Features dual Admin/Customer roles, product & inventory management, order processing, payment handling, automated email notifications, PDF report generation, and a complete OOP three-tier architecture.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors