{"id":24489735,"url":"https://github.com/otumian-empire/moexpensetracker","last_synced_at":"2025-04-13T23:03:53.839Z","repository":{"id":271442275,"uuid":"910331070","full_name":"Otumian-empire/MoExpenseTracker","owner":"Otumian-empire","description":"Mo Expense Tracker is a multi-user web api for tracking user's expenditure. It was implemented to learn dotnet.","archived":false,"fork":false,"pushed_at":"2025-01-20T13:12:37.000Z","size":74,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T14:24:20.917Z","etag":null,"topics":["api","database","dotnet","postgres"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Otumian-empire.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-31T02:11:39.000Z","updated_at":"2025-01-20T13:15:47.000Z","dependencies_parsed_at":"2025-01-07T19:55:14.919Z","dependency_job_id":"157c911e-dad5-4870-b9f6-3208c765fb5e","html_url":"https://github.com/Otumian-empire/MoExpenseTracker","commit_stats":null,"previous_names":["otumian-empire/moexpensetracker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Otumian-empire%2FMoExpenseTracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Otumian-empire%2FMoExpenseTracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Otumian-empire%2FMoExpenseTracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Otumian-empire%2FMoExpenseTracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Otumian-empire","download_url":"https://codeload.github.com/Otumian-empire/MoExpenseTracker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234988229,"owners_count":18918097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","database","dotnet","postgres"],"created_at":"2025-01-21T17:15:42.440Z","updated_at":"2025-01-21T17:15:44.818Z","avatar_url":"https://github.com/Otumian-empire.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MO Expense Tracker\n\nMo Expense Tracker is a multi-user web api for tracking user's expenditure. It was implemented to learn dotnet.\n\n## Application\n\n### Core\n\nCore has functionality or object that is shared across the api such as exception handling, endpoint filters (for validation), response objects...\n\n### Data\n\nData has the database context\n\n### Features\n\nIt says break your api into features and so it was done. There are four featuresc as of this time. There are the Account, Auth, Category and Expense. Each feature may have a controller, dao, dto, endpoint and validation. (There was a time I wanted to remove the dao).\n\n### Migrations\n\nMigrations has the table migrations created to the tables (models).\n\n### Models\n\nModels represent the table for users, categories and expenses.\n\n### Important files\n\n- Program.cs - the entry point into the app\n- MoExpenseTracker.http - used as the api client to make api requests\n\n## Some resources\n\nHow to CRUD\n\n- [ASP.NET Core Full Course For Beginners](https://www.youtube.com/watch?v=AhAxLiGC7Pc) by Julio Casal\n- [Build CRUD with .NET 6 Web API \u0026 Entity Framework Core](https://www.youtube.com/watch?v=wtFs4356xp4) by Mohamad Lawand\n\nHow to use ef core and relationship (I didn't really much of these but you'd understand)\n\n- [Getting Started with Entity Framework Core in .NET](https://www.youtube.com/watch?v=2t88FOeQ898) by Nick Chapsas\n- [DbContext, Code First Migrations and Database Creation with EFCore](https://www.youtube.com/watch?v=A4tpHy__LN0) by ISeeSharp\n- [1 to 1, 1 to Many and Many to Many Relationships with EFCore in 2023](https://www.youtube.com/watch?v=9sXXfq0GDYI) by ISeeSharp\n\nHow to connect to a database\n\n- [Getting Started with Entity Framework Core in .NET](https://www.youtube.com/watch?v=2t88FOeQ898) by Nick Chapsas\n\nHow to do authentication and authorization in dotnet\n\n- [How to implement JWT authentication in ASP.NET Core](https://www.infoworld.com/article/2336284/how-to-implement-jwt-authentication-in-aspnet-core.html) by Joydip Kanjilal\n- [JWT Authentication in ASP.NET Core Minimal API](https://dotnettutorials.net/lesson/jwt-authentication-in-asp-net-core-minimal-api) by dotnettutorials\n\nHow to hash password - hash and verify\n\n- [Best Practices for Hashing and Salting Passwords in .NET](https://www.youtube.com/watch?v=Sh_PxjTmBug) by Code Maze\n- [Best Practices for Secure Password Hashing in .NET (Stop Storing Passwords in Plain Text!)](https://www.youtube.com/watch?v=J4ix8Mhi3rs) by Milan Jovanović\n- [How to hash a password](https://stackoverflow.com/questions/4181198/how-to-hash-a-password/73125177#73125177) by [arad](https://stackoverflow.com/users/7734384/arad)\n\nHow to handle exceptions (global)\n\n- [Global Exception Handling in Asp.Net Core Web API using IExceptionHandler](https://www.youtube.com/watch?v=bEYlNuwTSms) by Nitish Kaushik\n- [The New Global Error Handling in ASP.NET Core 8](https://www.youtube.com/watch?v=uOEDM0c9BNI) by Milan Jovanović\n\nHow to route endpoints (group routes)\n\n- [NET Core 7 : Routing - UseRouting vs UseEndpoints // Map vs MapGet vs MapPost](https://www.youtube.com/watch?v=NCZzYxzHrN8) by hikitoc -[How To Organize Minimal API Endpoints Inside Of Clean Architecture](https://www.youtube.com/watch?v=GCuVC_qDOV4) by Milan Jovanović\n\nHow to create extension methods\n\n- [What are Extension Methods in C#? When to use extension methods in real applications?](https://www.youtube.com/watch?v=JDNPJyiu3Ec) by Interview Happy\n\nHow to validate request\n\n- [New AddEndpointFilter in .Net 7.0, filters in Minimal API](https://www.youtube.com/watch?v=rOr-7sNKUds) by Tech In Talk (endpoint filters)\n- [Coding Shorts: Minimal API Endpoint Filters for Model Validation](https://www.youtube.com/watch?v=_S-r6SxLGn4) by Shawn Wildermuth (+endpoint filters \u0026 fluent validation)\n- [Creating your first validator](https://docs.fluentvalidation.net/en/latest/start.html) by Fluentvalidation docs\n\nMISC (extra information, won't hurt to watch, read or run through)\n\n- [Mastering Minimal API's Dotnet 7](https://www.youtube.com/playlist?list=PLlfN4N9fXldtMXcDqtJFstYVtjX_Xt-gY) by Tech In Talk (dotnet)\n- [Back-end Web Development with .NET](https://www.youtube.com/playlist?list=PLdo4fOcmZ0oWunQnm3WnZxJrseIw2zSAk) by dotnet (dotnet)\n- [IResult/Results/TypedResult or IActionResult/ActionResult/controllerBase methods?](https://www.reddit.com/r/dotnet/comments/172wumc/iresultresultstypedresult_or/) (difference between IResults, ITypeResults, ...)\n- [.NET dependency injection](https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection#service-lifetimes) (difference between scoped, singleton, transcient)\n\n## V0\n\nMost contains the first implementations\n\n## V1 updates\n\nThese are the responses I had from reddit and discord (dotnet/csharp) group about this app and I am looking forward to integrate them in this version of the app.\n\n- api versioning ✅\n- rename controllers into handlers (not to miscommunicate that they are class \"controllers\") ✅\n- refactor to use endpoint filter for all validation ✅\n- refactor the content of the program.cs into another file ✅\n- use dateonly for the expense data ✅\n- lowercase user data on insert and update, especially email, description, etc ✅\n- for searching, implement filters and sorting and pagination ✅\n  - issue: could not search for an expense by text in the description ❌\n- refactor the user id check in the request handlers and pass it as a dependency or endpoint filter ✅\n- use a middleware or some sort to validate the authentication and don't inject the http context ✅\n- return every created/updated record, this way an extra db call will be saved ✅\n- reduce the logic in the request handlers\n- when checking if the email is used on profile update, compare the user id rather when the result is not null ✅\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotumian-empire%2Fmoexpensetracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fotumian-empire%2Fmoexpensetracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotumian-empire%2Fmoexpensetracker/lists"}