Digital Local Artisan Showcase Platform Design Using Object-Oriented Design (OOD)
1. Overview
The goal of the Digital Local Artisan Showcase Platform is to provide a space where local artisans can display and sell their handmade products online. The platform should be user-friendly, intuitive, and designed with Object-Oriented Design (OOD) principles to ensure scalability, maintainability, and flexibility.
2. Identifying the Core Objects
The primary objects for this platform will be:
-
Artisan
-
Product
-
Category
-
User
-
Order
-
Payment
-
Review
Each of these objects will have their own properties and methods.
3. Classes and Objects
3.1 Artisan Class
An Artisan will represent a local creator who will list their products on the platform.
-
Properties:
-
artisan_id(Unique identifier for the artisan) -
name(Artisan’s name) -
email(Artisan’s email) -
address(Physical address for deliveries) -
bio(Brief bio about the artisan) -
contact_number(Phone number) -
product_list(List of products created by the artisan)
-
-
Methods:
-
createProduct()(Create and list a new product) -
updateProduct()(Modify an existing product) -
removeProduct()(Delete a product from the platform) -
viewOrders()(View all the orders placed for their products) -
viewReviews()(View customer reviews for their products)
-
3.2 Product Class
A Product will represent a physical item that is being sold by an artisan.
-
Properties:
-
product_id(Unique identifier for the product) -
name(Product name) -
description(Detailed description of the product) -
price(Price of the product) -
category(Category to which the product belongs) -
stock_quantity(Number of units available) -
image_url(Link to the product image) -
artisan_id(Foreign key to the artisan selling it)
-
-
Methods:
-
updateStock()(Update the stock quantity of the product) -
updatePrice()(Update the price of the product) -
setCategory()(Assign a category to the product) -
viewDetails()(Show detailed information about the product)
-
3.3 Category Class
A Category represents different product categories (e.g., pottery, woodworking, textiles, etc.).
-
Properties:
-
category_id(Unique identifier for the category) -
name(Category name) -
description(Description of the category)
-
-
Methods:
-
createCategory()(Create a new product category) -
viewProducts()(List all products belonging to this category)
-
3.4 User Class
A User represents a customer or visitor who browses products on the platform.
-
Properties:
-
user_id(Unique identifier for the user) -
name(User’s name) -
email(User’s email) -
password(User’s login password) -
address(User’s shipping address) -
order_history(List of all orders placed by the user) -
wishlist(List of favorite products)
-
-
Methods:
-
register()(Register a new user account) -
login()(Login to the platform) -
updateProfile()(Update user profile) -
viewOrderHistory()(View past orders) -
addToWishlist()(Add a product to the wishlist)
-
3.5 Order Class
An Order represents a purchase made by a user for one or more products.
-
Properties:
-
order_id(Unique identifier for the order) -
user_id(The user placing the order) -
product_list(List of products in the order) -
total_price(Total price of the order) -
order_date(Date of order) -
status(Order status like ‘Pending’, ‘Shipped’, ‘Delivered’)
-
-
Methods:
-
addProduct()(Add products to an order) -
updateStatus()(Update the status of the order) -
calculateTotalPrice()(Calculate the total price of the order)
-
3.6 Payment Class
A Payment represents the transaction process for an order.
-
Properties:
-
payment_id(Unique identifier for the payment) -
order_id(Foreign key to the order) -
amount(Amount paid) -
payment_date(Date of payment) -
payment_method(Method of payment, e.g., credit card, PayPal) -
payment_status(Status of the payment like ‘Completed’, ‘Failed’)
-
-
Methods:
-
processPayment()(Process the payment) -
refundPayment()(Initiate a refund if needed)
-
3.7 Review Class
A Review will represent feedback given by a user for a specific product.
-
Properties:
-
review_id(Unique identifier for the review) -
product_id(Foreign key to the product being reviewed) -
user_id(Foreign key to the user who left the review) -
rating(Rating out of 5 stars) -
comment(Review text) -
review_date(Date the review was left)
-
-
Methods:
-
leaveReview()(Allow a user to leave a review for a product) -
viewReviews()(Allow users to view reviews for a product)
-
4. Database Schema
Here’s an example of how the database might be structured:
-
Artisans Table:
artisan_id,name,email,address,bio,contact_number -
Products Table:
product_id,name,description,price,category_id,stock_quantity,artisan_id -
Categories Table:
category_id,name,description -
Users Table:
user_id,name,email,password,address -
Orders Table:
order_id,user_id,total_price,order_date,status -
Payments Table:
payment_id,order_id,amount,payment_date,payment_method,payment_status -
Reviews Table:
review_id,product_id,user_id,rating,comment,review_date
5. User Interface (UI)
The user interface should include the following sections:
-
Home Page: A curated list of featured products and categories.
-
Artisan Pages: Profiles for individual artisans showcasing their products and reviews.
-
Product Pages: Detailed pages for each product with images, descriptions, and an option to purchase.
-
Search & Filters: Allow users to search by keyword, filter by category, price, or rating.
-
User Profile: For users to manage their personal information and view their orders and wishlist.
-
Cart & Checkout: Users can add products to a shopping cart, proceed to checkout, and make payments.
6. System Interactions
-
Artisan-Product Interaction: An artisan can create, update, and manage their products through a dedicated dashboard.
-
User-Product Interaction: Users can browse products, view product details, and leave reviews for purchased products.
-
Order-Payment Interaction: Once an order is placed, it triggers a payment process.
-
Review Interaction: After receiving a product, users can leave a review and rating for that product, which helps future customers.
7. Conclusion
Using Object-Oriented Design for the Digital Local Artisan Showcase Platform ensures that each entity (artisan, user, product, order) has clear responsibilities and can be easily modified or extended in the future. This design not only simplifies maintenance but also facilitates adding new features like product recommendations or artisan marketing tools down the line.