Skip to content

Conversation

@EnesEfeTokta
Copy link
Owner

This pull request introduces significant new functionality and structural enhancements to the FinTrack application, including a database context setup, DTOs for user authentication, and session management. The changes also add migration files for initializing the database schema and update package dependencies for improved compatibility and tooling.

Database and ORM Setup:

  • Added AppDatabaseContext in FinTrack/Data/AppDatabaseContext.cs to configure the database context, including DbSet properties for various models and relationships between entities. It uses SQLite as the database provider and includes configuration for cascading deletes and unique constraints.
  • Introduced the InitialCreate migration file in FinTrack/Migrations/20250626151252_InitialCreate.cs to define the database schema, including tables for Accounts, Budgets, Categories, Transactions, and Notifications.

Models and DTOs:

  • Added AccountModel in FinTrack/Models/AccountModel.cs to represent user accounts with properties such as Name, Balance, and AccountType. It includes validation attributes and relationships with TransactionModel.
  • Introduced LoginRequestDto, LoginResponseDto, RegisterRequestDto, and OtpVerifyCodeRequestDto in FinTrack/Dtos to handle user authentication and registration requests and responses. [1] [2]

Session and User Management:

  • Added SessionManager in FinTrack/Core/SessionManager.cs to manage user sessions, including methods to set, clear, and check the current session token.
  • Added NewUserInformationManager in FinTrack/Core/NewUserInformationManager.cs for temporarily storing new user information during the registration process.

Dependency Updates:

  • Updated the Microsoft.EntityFrameworkCore.Sqlite package to version 9.0.6 and added Microsoft.EntityFrameworkCore.Tools for database migrations in FinTrack/FinTrack.csproj.

These changes collectively establish the foundation for database operations, user authentication, and session handling in the application.

…rn ComboBox style

Introduces NotificationView and FeedbackView user controls with their code-behind files. Updates MainWindow to display NotificationView. Adds modern ComboBox styles to ModernStyles.xaml for improved UI consistency.
Introduced Entity Framework Core models for users, accounts, transactions, categories, budgets, notifications, and user settings. Added AppDatabaseContext with full entity configuration and relationships. Updated project dependencies for EF Core 9.0.6 and tools. Added initial migration and model snapshot for local SQLite database setup.
- Updated `App.xaml` to include a new `ResourceDictionary` for styles.
- Changed application startup to display `LoginWindow`.
- Removed `DBScheme.cs` and updated `UserRepository.cs` for connection management.
- Simplified `LoginPanelViewModel` and `SessionManager.cs`.
- Introduced `RelayCommand` and `InvertedBooleanToVisibilityConverter` for MVVM support.
- Added new views for login, registration, and OTP verification.
- Enhanced UI with new styles in `ModernStyles.xaml`.
- Added multiple PNG image files for UI elements and icons.
@EnesEfeTokta EnesEfeTokta requested a review from Copilot June 26, 2025 17:21
@EnesEfeTokta EnesEfeTokta self-assigned this Jun 26, 2025
@EnesEfeTokta EnesEfeTokta added the enhancement New feature or request label Jun 26, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request establishes core application functionalities by setting up the database context and migrations, defining user-related models and DTOs, and implementing new authentication and session management features. Key changes include updating viewmodels and views to support OTP verification and adding new services for authentication and session handling.

Reviewed Changes

Copilot reviewed 30 out of 31 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
FinTrack/Views/OtpVerificationView.xaml Updated binding commands for OTP verification buttons.
FinTrack/ViewModels/RegisterViewModel.cs Added async registration flow with OTP navigation events.
FinTrack/ViewModels/OtpVerificationViewModel.cs Refactored property names and updated OTP verification logic.
FinTrack/Models/DebtModel.cs Introduced an empty DebtModel class.
FinTrack/Core/SessionManager.cs Added session management with token storage and clearance.
FinTrack/Migrations/* Added initial migration and updated database schema.
Files not reviewed (1)
  • FinTrack/Migrations/20250626151252_InitialCreate.Designer.cs: Language not supported
Comments suppressed due to low confidence (1)

FinTrack/ViewModels/OtpVerificationViewModel.cs:13

  • [nitpick] The property name 'verificationCode_OtpVerificationView_TextBox' is overly verbose; consider renaming it to a more concise format (e.g., 'OtpCode') for clarity and consistency.
        private string? verificationCode_OtpVerificationView_TextBox;

private async Task Register_RegisterView_Button()
{
Console.WriteLine("Register denendi.");
NavigateToOtpVerificationRequested?.Invoke();
Copy link

Copilot AI Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OTP navigation event is being invoked twice in the registration process. Consider removing the first invocation to avoid navigating away before validating the input.

Suggested change
NavigateToOtpVerificationRequested?.Invoke();

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,6 @@
namespace FinTrack.Models
{
Copy link

Copilot AI Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DebtModel class is currently empty; if it is intended as a placeholder, consider adding a comment to indicate future implementation or removing it if not needed.

Suggested change
{
{
// Placeholder for future implementation of DebtModel

Copilot uses AI. Check for mistakes.
{
public static class SessionManager
{
public static string CurrentToken { get; private set; }
Copy link

Copilot AI Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CurrentToken is assigned a null value in ClearToken but is declared as a non-nullable string. Consider changing its type to 'string?' to accurately represent potential null values.

Suggested change
public static string CurrentToken { get; private set; }
public static string? CurrentToken { get; private set; }

Copilot uses AI. Check for mistakes.
Eliminated unnecessary using statements from multiple ViewModel and View files to improve code clarity and maintainability. This reduces clutter and potential confusion, making the codebase easier to read and maintain.
@EnesEfeTokta EnesEfeTokta merged commit e3d1da5 into main Jun 26, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants