How izzatarroyyan12/sharencare works
Project Type and Purpose
• SharenCare is a Windows desktop application (using .NET 7.0 with WPF, as seen from presence of XAML files and .csproj settings) that serves as a donation platform for orphanages in Yogyakarta.
• The README details user flows for login, registration, and the different dashboard experiences for admin versus customer users. In essence, it is a client-side application with clearly defined UI pages and business logic components.
Analyzing the File Structure
• At the top level, the main project folder “SharenCare_cs” contains:
– Multiple XAML files and their associated C# code-behind (e.g., AddItemPage.xaml, LoginPage.xaml, CustomerDashPage.xaml, AdminDashPage.xaml, etc.) which represent the primary views/screens.
– A “Classes” folder with domain models (such as AdminUser.cs, User.cs, Item.cs) and possibly utility classes (like Converter.cs). This suggests that the solution is organized in layers (presentation vs. domain models).
• There are also standard build folders (bin, obj) and Visual Studio configuration files, confirming the typical MS solution structure for a WPF full-stack application (client + business logic).
Key Components
a. UI/Presentation Layer:
– Pages/Views: HomePage, LoginPage, RegisterPage, AdminDashPage, CustomerDashPage, AddItemPage, ListItemPage, and potentially additional windows (MainWindow, Window1, Window2).
b. Domain/Business Logic Layer:
– Data classes and logic inside the “Classes” folder that include AdminUser, User, and Item. The Converter class might be responsible for data type transformations in the UI.
c. Application Infrastructure:
– The App.xaml and its corresponding code (App.xaml.cs) which likely manages application-wide resources and application startup.
d. Navigation / Flow:
– The README clearly outlines a flow where the application starts with HomePage and then navigates to Login or Register pages, subsequently moving to either AdminDashPage or CustomerDashPage based on user authentication. From CustomerDashPage, additional navigation to AddItemPage and ListItemPage is provided.
e. Dependencies and Framework Configuration:
– The use of .NET 7.0 and WPF (with XAML) needs to be noted, alongside the potential utilization of MVVM (or a similar pattern) if further details in code-behind suggest separation of concerns, even though the implementation seems to use “code-behind” logic.
Architectural Patterns and Design Principles
• The overall design appears to adopt a layered or MVVM-like separation: distinct UI views (XAML pages) coupled with underlying business logic (domain classes).
• An emphasis on clear user navigation, segregation of user roles (admin vs. customer), and the separation of visual presentation (XAML) from the business/data model logic (under Classes) is evident.
• While there isn’t an external database explicitly reachable from the file tree, the design might be using in-memory data storage or basic file-based persistence (if any) as no data access layer is clearly delineated.
– The “Entry Point” (App.xaml) connecting to the “MainWindow”.
– From “MainWindow”, layout the HomePage.
– Then, branch off to LoginPage and RegisterPage.
– From LoginPage, branch out to AdminDashPage vs. CustomerDashPage based on user role.
– In parallel, attach the “Classes” layer which holds the business entities and potentially the converter/logic utility.
• Be sure to include interface details (such as button triggers) if needed in a side note for clarity.