This is a simple Member Management system where users have to login and sees the list of members (with accounts and balances) and they can add new members, create accounts and assign those accounts to a selected member.
This simple app is divided into front and backend projects. Backend projects contains the API, ClassLibrary and Data class library itself which is just bunch of classes mimicking a database and we have front end project contains FrontEnd UI library and WPF application itself.
***NOTE: *** For now, I have only implemented GET feature in API (GET all Members, GET MemberAccounts (Not called in UI)) and in the future we can add PUT, POST, DELETE for members and member accounts. I have only updated the models and also mentioned in comments when and where we should call the API to update our database accordingly.
-
Clone the repository
-
Open it in Visual Studio
-
Select Multi Project Setup (Right click on Solution and select Set Startup Projects)
-
You can use the following credentials to login to WPF Application which requires login
- username: [email protected]
- password: Pwd123!
-
If you do not want or cannot use the credentials, then goto https://localhost:44312/swagger, then click Account and POST /api/Account/Register
-
After you have registered yourself, you can login in WPF application with your username and password
The motive for this design is to loosly couple code so that if we want to change front end in the future, it would not effect the backend libraries and API. We might have more leverage in adding and removing components from a system without worrying alot about code rewrite or failure.
- User login
- User creates a new account for a defined member
- User can import existing members in JSON format (NOTE: Account Status is boolean, Please Do follow the data type pattern when importing)
- User can export members with filter criteria
- User Login
- Can check all members with accounts and balances
- Can add new member
- Can add new account for a member
- Can add same account with balance will update the balance accordingly for only active accounts.
- Inactive accounts balances are not updated.
- Can import and export members in JSON format.
- .NET Framework 4.8 (in all ClassLibraries & WPF application)
- Web API MVC (.NET Framework 4.8) with Swagger Implementation
- Caliburn Micro (for MVVM, Depedency Injection, Binding, Event Aggregator etc.)
- AutoMapper (simple library for object-to-object mapping library)
- LoyaltyPrimeData (This classlibrary just mimiks a Database and classes which contains the data).
- LoyaltyPrimeDataManager.Library (This classlibrary is just a layer between API and Database i.e LoyaltyPrimeData. We don't want our API to directly fetch data from Database so this layer which has DataAccess)
- LoyaltyPrimeDataManager (This is a Web API which front end Library can use to talk to database, any database operation have to go through an API.)
- LoyaltyPrimeUI.Library (This classlibary basically gets the data from API, this library has API helpers)
- LoyaltyPrimeWPF (WPF Application which fetches data from LoyaltyPrimeUI Libaray and knows nothing about the database and backend system, it only talks to UI library, doing this way we could add multiple user interfaces in the future and do not have to change the libraries or API, we could just get the data from API library and implement Web App or Mobile App )