diff --git a/.claude/settings.local.json b/.claude/settings.local.json index bd8e905..2f9fef4 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -4,7 +4,13 @@ "Bash(git add:*)", "Bash(git commit:*)", "Bash(dotnet ef migrations:*)", - "Bash(dotnet ef database:*)" + "Bash(dotnet ef database:*)", + "Bash(mkdir \"C:\\Users\\AJ\\Desktop\\MoneyMap\\MoneyMap\\Prompts\")", + "Bash(dotnet build)", + "Bash(dotnet build --no-restore /p:UseAppHost=false)", + "Bash(dotnet build /property:UseAppHost=false)", + "Bash(git reset --soft d0f4b42)", + "Bash(git reset HEAD)" ], "deny": [], "ask": [] diff --git a/MoneyMap/Data/MoneyMapContext.cs b/MoneyMap/Data/MoneyMapContext.cs index 32284f6..2eb9897 100644 --- a/MoneyMap/Data/MoneyMapContext.cs +++ b/MoneyMap/Data/MoneyMapContext.cs @@ -1,6 +1,4 @@ -using System; -using System.Text.RegularExpressions; -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using MoneyMap.Models; using MoneyMap.Services; diff --git a/MoneyMap/Migrations/20251004000603_InitialCreate.cs b/MoneyMap/Migrations/20251004000603_InitialCreate.cs index 4dbea2a..ad1dd49 100644 --- a/MoneyMap/Migrations/20251004000603_InitialCreate.cs +++ b/MoneyMap/Migrations/20251004000603_InitialCreate.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/MoneyMap/Migrations/20251010003334_SplitCardsAndAccounts.cs b/MoneyMap/Migrations/20251010003334_SplitCardsAndAccounts.cs index 9f54eac..590807e 100644 --- a/MoneyMap/Migrations/20251010003334_SplitCardsAndAccounts.cs +++ b/MoneyMap/Migrations/20251010003334_SplitCardsAndAccounts.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/MoneyMap/Migrations/20251012145117_AddAICategorization.cs b/MoneyMap/Migrations/20251012145117_AddAICategorization.cs index 3bf0272..316648a 100644 --- a/MoneyMap/Migrations/20251012145117_AddAICategorization.cs +++ b/MoneyMap/Migrations/20251012145117_AddAICategorization.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/MoneyMap/Migrations/20251012185017_AddReceiptDueDate.cs b/MoneyMap/Migrations/20251012185017_AddReceiptDueDate.cs index 5a29be4..76fcc64 100644 --- a/MoneyMap/Migrations/20251012185017_AddReceiptDueDate.cs +++ b/MoneyMap/Migrations/20251012185017_AddReceiptDueDate.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/MoneyMap/Models/Card.cs b/MoneyMap/Models/Card.cs index d681e3d..c0ac0aa 100644 --- a/MoneyMap/Models/Card.cs +++ b/MoneyMap/Models/Card.cs @@ -1,6 +1,5 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using System.Transactions; namespace MoneyMap.Models; diff --git a/MoneyMap/Models/Merchant.cs b/MoneyMap/Models/Merchant.cs index a13bbab..b2532f4 100644 --- a/MoneyMap/Models/Merchant.cs +++ b/MoneyMap/Models/Merchant.cs @@ -1,5 +1,5 @@ -using System.ComponentModel.DataAnnotations; using MoneyMap.Services; +using System.ComponentModel.DataAnnotations; namespace MoneyMap.Models; diff --git a/MoneyMap/Models/Transaction.cs b/MoneyMap/Models/Transaction.cs index 2ff1452..eed3024 100644 --- a/MoneyMap/Models/Transaction.cs +++ b/MoneyMap/Models/Transaction.cs @@ -1,7 +1,6 @@ using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using System.Transactions; namespace MoneyMap.Models; diff --git a/MoneyMap/Pages/AccountDetails.cshtml.cs b/MoneyMap/Pages/AccountDetails.cshtml.cs index b4ec6c0..97e936b 100644 --- a/MoneyMap/Pages/AccountDetails.cshtml.cs +++ b/MoneyMap/Pages/AccountDetails.cshtml.cs @@ -1,6 +1,3 @@ -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.EntityFrameworkCore; diff --git a/MoneyMap/Pages/Cards.cshtml.cs b/MoneyMap/Pages/Cards.cshtml.cs index 5708436..09f974c 100644 --- a/MoneyMap/Pages/Cards.cshtml.cs +++ b/MoneyMap/Pages/Cards.cshtml.cs @@ -1,6 +1,3 @@ -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.EntityFrameworkCore; diff --git a/MoneyMap/Pages/CategoryMappings.cshtml.cs b/MoneyMap/Pages/CategoryMappings.cshtml.cs index 3bf5136..058b134 100644 --- a/MoneyMap/Pages/CategoryMappings.cshtml.cs +++ b/MoneyMap/Pages/CategoryMappings.cshtml.cs @@ -1,15 +1,11 @@ -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Text; -using System.Text.Json; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.EntityFrameworkCore; using MoneyMap.Data; using MoneyMap.Services; +using System.ComponentModel.DataAnnotations; +using System.Text; +using System.Text.Json; namespace MoneyMap.Pages { diff --git a/MoneyMap/Pages/EditAccount.cshtml.cs b/MoneyMap/Pages/EditAccount.cshtml.cs index 01338b3..8ae5751 100644 --- a/MoneyMap/Pages/EditAccount.cshtml.cs +++ b/MoneyMap/Pages/EditAccount.cshtml.cs @@ -1,9 +1,8 @@ -using System.ComponentModel.DataAnnotations; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -using Microsoft.EntityFrameworkCore; using MoneyMap.Data; using MoneyMap.Models; +using System.ComponentModel.DataAnnotations; namespace MoneyMap.Pages { diff --git a/MoneyMap/Pages/EditCard.cshtml.cs b/MoneyMap/Pages/EditCard.cshtml.cs index bcfcd28..c846d0f 100644 --- a/MoneyMap/Pages/EditCard.cshtml.cs +++ b/MoneyMap/Pages/EditCard.cshtml.cs @@ -1,10 +1,9 @@ -using System.ComponentModel.DataAnnotations; -using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.EntityFrameworkCore; using MoneyMap.Data; using MoneyMap.Models; +using System.ComponentModel.DataAnnotations; namespace MoneyMap.Pages { diff --git a/MoneyMap/Pages/EditTransaction.cshtml.cs b/MoneyMap/Pages/EditTransaction.cshtml.cs index 2407728..9c86c2f 100644 --- a/MoneyMap/Pages/EditTransaction.cshtml.cs +++ b/MoneyMap/Pages/EditTransaction.cshtml.cs @@ -1,7 +1,3 @@ -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.EntityFrameworkCore; diff --git a/MoneyMap/Pages/Error.cshtml.cs b/MoneyMap/Pages/Error.cshtml.cs index 1f5ce6f..6c0ff08 100644 --- a/MoneyMap/Pages/Error.cshtml.cs +++ b/MoneyMap/Pages/Error.cshtml.cs @@ -1,6 +1,6 @@ -using System.Diagnostics; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; +using System.Diagnostics; namespace MoneyMap.Pages { diff --git a/MoneyMap/Pages/Index.cshtml.cs b/MoneyMap/Pages/Index.cshtml.cs index 5d7658d..33b975e 100644 --- a/MoneyMap/Pages/Index.cshtml.cs +++ b/MoneyMap/Pages/Index.cshtml.cs @@ -1,6 +1,3 @@ -using System; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.EntityFrameworkCore; using MoneyMap.Data; diff --git a/MoneyMap/Pages/Merchants.cshtml.cs b/MoneyMap/Pages/Merchants.cshtml.cs index f2d144a..f75b706 100644 --- a/MoneyMap/Pages/Merchants.cshtml.cs +++ b/MoneyMap/Pages/Merchants.cshtml.cs @@ -1,12 +1,9 @@ -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.EntityFrameworkCore; using MoneyMap.Data; using MoneyMap.Models; +using System.ComponentModel.DataAnnotations; namespace MoneyMap.Pages { diff --git a/MoneyMap/Pages/Privacy.cshtml.cs b/MoneyMap/Pages/Privacy.cshtml.cs index e3619a0..48c5a56 100644 --- a/MoneyMap/Pages/Privacy.cshtml.cs +++ b/MoneyMap/Pages/Privacy.cshtml.cs @@ -1,5 +1,4 @@ -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.RazorPages; +using Microsoft.AspNetCore.Mvc.RazorPages; namespace MoneyMap.Pages { diff --git a/MoneyMap/Pages/Recategorize.cshtml.cs b/MoneyMap/Pages/Recategorize.cshtml.cs index 5eff134..7dd76d5 100644 --- a/MoneyMap/Pages/Recategorize.cshtml.cs +++ b/MoneyMap/Pages/Recategorize.cshtml.cs @@ -1,5 +1,3 @@ -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.EntityFrameworkCore; diff --git a/MoneyMap/Pages/Receipts.cshtml.cs b/MoneyMap/Pages/Receipts.cshtml.cs index f5d124f..aa5c78d 100644 --- a/MoneyMap/Pages/Receipts.cshtml.cs +++ b/MoneyMap/Pages/Receipts.cshtml.cs @@ -2,7 +2,6 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.EntityFrameworkCore; using MoneyMap.Data; -using MoneyMap.Models; using MoneyMap.Services; namespace MoneyMap.Pages diff --git a/MoneyMap/Pages/Transactions.cshtml.cs b/MoneyMap/Pages/Transactions.cshtml.cs index a7a5524..8e0c0e2 100644 --- a/MoneyMap/Pages/Transactions.cshtml.cs +++ b/MoneyMap/Pages/Transactions.cshtml.cs @@ -1,7 +1,3 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.EntityFrameworkCore; diff --git a/MoneyMap/Pages/Upload.cshtml.cs b/MoneyMap/Pages/Upload.cshtml.cs index 8597e76..f3ea167 100644 --- a/MoneyMap/Pages/Upload.cshtml.cs +++ b/MoneyMap/Pages/Upload.cshtml.cs @@ -1,11 +1,5 @@ -using System.Globalization; -using System.IO; -using System.Linq; -using System.Text.Json; -using System.Text.RegularExpressions; using CsvHelper; using CsvHelper.Configuration; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.EntityFrameworkCore; @@ -13,6 +7,9 @@ using MoneyMap.Data; using MoneyMap.Models; using MoneyMap.Models.Import; using MoneyMap.Services; +using System.Globalization; +using System.Text.Json; +using System.Text.RegularExpressions; namespace MoneyMap.Pages { diff --git a/MoneyMap/Program.cs b/MoneyMap/Program.cs index d5cc43b..aa95896 100644 --- a/MoneyMap/Program.cs +++ b/MoneyMap/Program.cs @@ -1,4 +1,3 @@ -using CsvHelper; using Microsoft.EntityFrameworkCore; using MoneyMap.Data; using MoneyMap.Pages; @@ -34,7 +33,7 @@ builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); -builder.Services.AddHttpClient(); +builder.Services.AddHttpClient(); // AI categorization service builder.Services.AddHttpClient(); diff --git a/MoneyMap/Services/OpenAIReceiptParser.cs b/MoneyMap/Services/AIReceiptParser.cs similarity index 99% rename from MoneyMap/Services/OpenAIReceiptParser.cs rename to MoneyMap/Services/AIReceiptParser.cs index 0dadb9b..78f693d 100644 --- a/MoneyMap/Services/OpenAIReceiptParser.cs +++ b/MoneyMap/Services/AIReceiptParser.cs @@ -12,7 +12,7 @@ namespace MoneyMap.Services Task ParseReceiptAsync(long receiptId, string? model = null); } - public class OpenAIReceiptParser : IReceiptParser + public class AIReceiptParser : IReceiptParser { private readonly MoneyMapContext _db; private readonly IWebHostEnvironment _environment; @@ -22,7 +22,7 @@ namespace MoneyMap.Services private readonly IServiceProvider _serviceProvider; private string? _promptTemplate; - public OpenAIReceiptParser( + public AIReceiptParser( MoneyMapContext db, IWebHostEnvironment environment, IConfiguration configuration, diff --git a/MoneyMap/Services/MerchantService.cs b/MoneyMap/Services/MerchantService.cs index 4a5e547..1f1dab1 100644 --- a/MoneyMap/Services/MerchantService.cs +++ b/MoneyMap/Services/MerchantService.cs @@ -1,4 +1,3 @@ -using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; using MoneyMap.Data; using MoneyMap.Models; diff --git a/MoneyMap/Services/ReceiptManager.cs b/MoneyMap/Services/ReceiptManager.cs index 129071a..f9bdf1f 100644 --- a/MoneyMap/Services/ReceiptManager.cs +++ b/MoneyMap/Services/ReceiptManager.cs @@ -1,14 +1,8 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Http; using Microsoft.EntityFrameworkCore; using MoneyMap.Data; using MoneyMap.Models; -using System; -using System.IO; -using System.Linq; using System.Security.Cryptography; using System.Text; -using System.Threading.Tasks; namespace MoneyMap.Services { diff --git a/MoneyMap/Services/TransactionAICategorizer.cs b/MoneyMap/Services/TransactionAICategorizer.cs index 59dce8b..c913106 100644 --- a/MoneyMap/Services/TransactionAICategorizer.cs +++ b/MoneyMap/Services/TransactionAICategorizer.cs @@ -1,10 +1,9 @@ -using System.Net.Http; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; using Microsoft.EntityFrameworkCore; using MoneyMap.Data; using MoneyMap.Models; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; namespace MoneyMap.Services; diff --git a/MoneyMap/Services/TransactionCategorizer.cs b/MoneyMap/Services/TransactionCategorizer.cs index 7fd5312..3632ef2 100644 --- a/MoneyMap/Services/TransactionCategorizer.cs +++ b/MoneyMap/Services/TransactionCategorizer.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using MoneyMap.Data; namespace MoneyMap.Services diff --git a/MoneyMap/Services/TransactionFilters.cs b/MoneyMap/Services/TransactionFilters.cs index 0fdf54e..074e372 100644 --- a/MoneyMap/Services/TransactionFilters.cs +++ b/MoneyMap/Services/TransactionFilters.cs @@ -1,4 +1,3 @@ -using System.Linq; using MoneyMap.Models; namespace MoneyMap.Services