Academic case study · Application Development

GreenLife Organic Store

Individual desktop coursework — a layered C# .NET 8 WinForms organic store with Admin and Customer roles, MySQL persistence, transactional checkout, and PdfSharpCore sales reports. Evidence from the full coursework report, not a feature wishlist.

Module

Application Development (individual)

Stack

C# · .NET 8 · WinForms · MySQL

Delivery

Desktop EXE + portable SQLite branch

Roles

2

Administrator · Customer

Manual tests

20

Documented Pass (coursework evidence)

Patterns

4

Layered · Repository · Utility · Transaction

Stack

.NET 8

WinForms · MySQL · PdfSharpCore

Overview

GreenLife Organic Store is an individual Application Development coursework submission — a Windows Forms desktop application for organic retail operations. Administrators manage products, categories, users, orders, reviews, discounts, and sales PDF/CSV reports. Customers browse, cart, checkout, track orders, and submit reviews with RBAC separation throughout.

Problem statement

Small organic retailers need a desktop system to manage products, categories, users, orders, reviews, and discounts without scattered spreadsheets or unsafe ad-hoc SQL. Customers need browse/search/filter, cart, checkout, order tracking, and review flows — all with role separation and auditable sales reporting.

  • Administrators must manage catalogue, users, orders, reviews, discounts, and PDF/CSV sales reports.
  • Customers need product discovery, cart/checkout, order history, and review submission.
  • Security must cover password hashing, parameterized SQL, and RBAC between Admin and Customer.

Trust boundaries

  • Individual Application Development coursework — not a commercial retail product.
  • SHA256 password hashing documented as coursework requirement; production would use adaptive salted hashing.
  • Master branch targets MySQL; portable SQLite branch (sql-lite-db) is an extra deliverable.
  • Features listed here are limited to coursework report evidence and repository screenshots.

Objectives

Coursework aims — implemented and evidenced in source and the report.

  • Deliver a layered WinForms desktop app with Presentation, Domain, Repository DAL, and Utility services.
  • Implement Repository and Utility Service patterns with transactional order processing.
  • Support Admin workflows: products, categories, users, orders, reviews, discounts, and sales PDF/CSV reports.
  • Support Customer workflows: browse/search/filter, cart, checkout, orders, and reviews.
  • Apply SHA256 password hashing (coursework requirement), parameterized SQL, and RBAC.
  • Ship MySQL as the primary database with a portable SQLite branch as an extra deliverable.
  • Document 20 manual test cases with Pass evidence in the coursework report.

Timeline

  1. 01

    Coursework brief

    Individual Application Development coursework — desktop organic store with Admin/Customer roles, layered architecture, and MySQL persistence.

  2. 02

    Problem framing

    Organic retail needs secure catalogue, cart, checkout, reviews, discounts, and sales reporting in one WinForms app.

  3. 03

    Architecture & data

    Layered design with Repository DAL, Utility services, domain models, and architecture diagrams (7 figures in coursework).

  4. 04

    Implementation

    WinForms UI, MySQL repositories, cart/checkout transactions, PdfSharpCore reports, and FontAwesome.Sharp styling.

  5. 05

    Portable SQLite branch

    sql-lite-db branch ships as extra deliverable with Google Drive portable packages for marker-friendly distribution.

  6. 06

    Testing

    20 manual test cases documented Pass; DPI scaling validated across 10+ PCs.

  7. 07

    Documentation & release

    Individual coursework report, GitHub releases (v1.3 x64/x86), and Drive-hosted portable/SQL packages.

Product deep dive

Architecture and major modules with expandable detail.

Authentication & RBAC

Login, register, and password reset with SHA256 password hashing (coursework requirement; salted adaptive hashing preferred for production), parameterized SQL, and Admin/Customer role separation.

WinFormsSHA256RBACMySQL
  • WinForms login and registration screens with role-aware dashboard routing.
  • Password reset flow with email evidence documented in coursework screenshots.
  • RBAC keeps administrators in management panels and customers in shopping flows.

Administrator control panel

Administrators manage products, categories, users, orders, reviews, discounts, and export sales PDF/CSV reports from a unified dashboard.

WinFormsPdfSharpCoreMySQL
  • Product and category CRUD with search and grid views.
  • User management and order oversight with review moderation.
  • Discount management and PdfSharpCore sales report generation.

Customer shopping experience

Customers browse, search, and filter organic products, manage a cart, complete checkout, track orders, and submit reviews.

WinFormsFontAwesome.SharpMySQL
  • Product catalogue with search/filter and customer dashboard widgets.
  • Cart and checkout with transactional order persistence in OrderRepository.
  • Order tracking and review submission after purchase.

Sales reports & email

Administrators generate PDF and CSV sales reports via PdfSharpCore with email delivery evidence shown in coursework screenshots.

PdfSharpCoreCSVEmail
  • PDF report layout using PdfSharpCore for coursework assessable output.
  • CSV export path for spreadsheet-compatible sales data.
  • Email report delivery documented in the coursework evidence set.

Layered system design

Architecture diagrams document Presentation, Domain, Repository, Utility, and MySQL layers plus Repository, Utility Service, and Transaction patterns.

.NET 8MySQLRepository
  • Layered architecture separating WinForms UI from data access.
  • Repository pattern isolates SQL; Utility services handle cross-cutting concerns.
  • OrderRepository transaction pattern protects checkout integrity.

Architecture

GreenLife follows a layered architecture: WinForms Presentation UI, Domain models, Repository data-access layer, Utility services (hashing, email, images, reports), and MySQL persistence. OrderRepository uses explicit transactions for checkout integrity.

  • Presentation

    Windows Forms UI with FontAwesome.Sharp icons — login, dashboards, product grids, cart, and admin panels.

  • Domain

    Entity models for products, categories, users, orders, reviews, discounts, and cart state.

  • Repository (DAL)

    Repository pattern with parameterized MySQL queries; OrderRepository wraps checkout in transactions.

  • Utility

    Password hashing (SHA256), email helpers, image handling, and PdfSharpCore PDF/CSV report generation.

  • Data

    MySQL 8 on master branch; portable SQLite variant on sql-lite-db branch for coursework extra credit.

Database

MySQL 8 on the master branch with parameterized Repository queries. Portable SQLite variant on the sql-lite-db branch for coursework extra deliverable.

  • Users with Admin/Customer roles and SHA256-hashed passwords
  • Products, Categories, Discounts
  • Orders, OrderItems, Cart
  • Reviews and sales report aggregates
  • MySQL primary schema; SQLite portable branch (sql-lite-db)

Modules

Authentication

Login, register, password reset, and role-based routing to Admin or Customer dashboards.

Administrator

Products, categories, users, orders, reviews, discounts, and sales PDF/CSV reports.

Customer

Browse/search/filter products, cart, checkout, order tracking, and review submission.

Reporting

PdfSharpCore PDF sales reports and CSV export with email delivery evidence.

Portable build

SQLite branch (sql-lite-db) as extra deliverable alongside MySQL master build.

Technology stack

C# / .NET 8Windows FormsMySQL 8 (MySql.Data)SQLite (portable branch)PdfSharpCoreFontAwesome.SharpRepository patternLayered architecture

Challenges

  • Database connectivity

    Reliable MySQL connection configuration and repository error handling across development machines and demo PCs.

  • WinForms UI polish

    Designing consistent WinForms layouts with FontAwesome.Sharp icons and readable grids for admin and customer flows.

  • Transactional checkout

    Ensuring order creation, stock updates, and cart clearing succeed or roll back together via OrderRepository transactions.

  • DPI scaling

    Testing and adjusting WinForms DPI scaling behaviour when deployed across 10+ lab PCs with mixed display settings.

Solutions

  • Layered architecture with Repository DAL keeps SQL parameterized and testable.
  • Utility services centralise hashing, email, images, and report generation.
  • Explicit transactions in OrderRepository prevent partial checkout states.
  • Portable SQLite branch provides a self-contained demo path alongside MySQL master.

Engineering decisions

  • C# .NET 8 Windows Forms for individual AD coursework desktop delivery.
  • MySQL as primary database; sql-lite-db branch for portable SQLite extra deliverable.
  • Repository + Utility Service patterns with transactional OrderRepository.
  • PdfSharpCore for PDF reports; MySql.Data for database access; FontAwesome.Sharp for UI icons.
  • SHA256 password hashing per coursework requirement (adaptive salted hashing noted as production preference).

Development process

  1. 01Requirements analysis for Admin and Customer roles in an organic retail context.
  2. 02Layered architecture and database design with coursework diagrams.
  3. 03WinForms implementation: auth, dashboards, catalogue, cart, checkout, reviews, discounts.
  4. 04PdfSharpCore/CSV reporting and email delivery evidence.
  5. 0520 manual test cases documented Pass; portable SQLite branch packaged.
  6. 06Individual coursework report, screenshots, and release packages.

Testing

  • Strategy: 20 manual test cases documented in the coursework report — all Pass.
  • Environment: Windows, Visual Studio, .NET 8 SDK, MySQL 8, multiple lab PCs for DPI checks.
  • Coverage: auth flows, RBAC, product CRUD, cart/checkout transactions, reports, and password reset.
  • Limitation: no automated unit/integration test suite in the submitted coursework scope.

Lessons learned

  • Layered WinForms stays maintainable when repositories own all SQL.
  • Transactional checkout is essential before adding discounts and multi-item orders.
  • DPI scaling must be validated on real hardware, not only the developer machine.

Future improvements

  • Replace SHA256 with adaptive salted hashing (bcrypt/Argon2) for production.
  • Automated unit tests for repositories and checkout transactions.
  • Installer/ClickOnce packaging and CI build pipeline.
  • Accessibility and high-DPI improvements for varied display environments.

Downloads

Coursework report, GitHub release packages, portable Drive builds, and database dumps.

Demo credentials

Demonstration accounts from the GreenLife Organic Store coursework report. Intended for viva/marking only — not production credentials. SHA256 hashing was a coursework requirement; adaptive salted hashing is preferred for production systems.

RoleEmailPassword
Administrator[email protected]admin@123
Customer[email protected][email protected]

Database connection strings and SMTP secrets are never published here.

Conclusion

GreenLife Organic Store delivers a complete individual desktop coursework foundation: layered WinForms architecture, Repository DAL with transactional checkout, Admin/Customer RBAC, PdfSharpCore reporting, and 20 documented manual test cases — with MySQL master and portable SQLite extra deliverable, without claiming production-grade security beyond coursework scope.