Designed & Developed by Naveen Nagendran
- Overview
- System Architecture
- Key Features
- Technology Stack
- Database Design
- Module Breakdown
- OOP Design Principles
- Security Implementation
- UML Diagrams
- System Requirements
- Installation & Setup
- Testing
- Project Structure
- Future Enhancements
- Developer
- References
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.
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
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 |
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.
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 |
- 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
| 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 |
| 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 |
| 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 |
| Component | Technology |
|---|---|
| RDBMS | Microsoft SQL Server Express |
| Admin Tool | SQL Server Management Studio (SSMS) |
| Schema Design Tool | dbdiagram.io |
| Library | Purpose | Source |
|---|---|---|
| MailKit | Automated SMTP email โ registration, OTP, order confirmations | jstedfast/MailKit |
| iTextSharp | PDF report and invoice generation | iText Group |
| 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 |
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:
Roles โโโโโโโโโโโโโโโโโโโบ Users โโโโโโโโโโโโ UserAddresses
(Admin, Customer) (Auth, Profile) (Delivery Addresses)
Categories โโโบ Products โโโ ProductSuppliers โโโบ Suppliers
โ
โโโโบ ProductDiscounts โโโบ Discounts
Orders โโโบ OrderItems
โ
โโโโบ OrderStatus โโโบ OrderStatusHistory
โ
โโโโบ Payments โโโบ PaymentMethods / PaymentStatus
Users โโโบ Carts โโโบ CartItems
โโโบ Wishlist โโโบ WishlistItems
โโโบ ProductReviews
โโโบ Notifications โโโบ NotificationTypes
| 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.
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.
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.
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.
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.
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.
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.
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.
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.
The system is architected around four core Object-Oriented Programming principles applied consistently throughout every module.
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.
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 logicCustomerCartClassโ manages all cart state and operationsPaymentProcessClassโ handles transaction workflows with database-level atomicity (SQL transactions across multiple tables)
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.
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 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 |
The system was modelled using draw.io for UML diagrams and dbdiagram.io for the database schema before implementation.
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
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.
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.
| 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 | 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 |
# 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/-- 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);<!-- 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>
โ ๏ธ ReplaceYOUR_SERVER_NAMEwith your actual SQL Server instance name โ e.g.,.\SQLEXPRESSorlocalhost\SQLEXPRESS.
# 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 beginThe 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 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 |
- 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
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
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
Naveen Nagendran
| Role | Software Engineer |
| Specialisation | C# ยท .NET ยท SQL Server ยท Desktop & Full-Stack Development |
| GitHub | github.com/Nav-cmd |
| 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.
- Microsoft. (2025). What is Visual Studio? https://learn.microsoft.com/en-us/visualstudio/get-started/visual-studio-ide
- Microsoft. (2025). ADO.NET overview. https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/
- Stedfast, J. (2023). jstedfast/MailKit. https://github.com/jstedfast/MailKit
- iText Group. (2023). iTextSharp PDF library. https://itextpdf.com/
- Holistics. (2023). dbdiagram.io โ Database Diagram Tool. https://dbdiagram.io/
- Silberschatz, A., Korth, H. F., & Sudarshan, S. (2019). Database System Concepts (7th ed.). McGraw-Hill.
- Vogella. (2026). UML โ Tutorial. https://www.vogella.com/tutorials/UML/article.html
MIT License โ feel free to explore, fork, and build on this project.
๐ฟ GreenLife Organic Store Management System Designed & Developed by Naveen Nagendran ยท 2026
"A comprehensive software solution that effectively addresses the operational needs of a modern organic store."