can you expand on this, fix any errors u see, and improve on the code. Include comment on what the code does and the such.
My code:
#### User Model

package org.yourname.wealthguardian.model;

import javax.persistence.;
import java.util.Set;

/
 * Represents a user in the WealthGuardian application.
 * Manages user information and authentication details.
 /
@Entity
@Table(name = “users”)
public class User {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long userId;

    @Column(nullable = false, unique = true)
    private String username;

    @Column(nullable = false)
    private String password;

    @OneToMany(mappedBy = “user”, cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    private Set<Account> accounts;

    // Getters and setters
}


#### Transaction Model

package org.yourname.wealthguardian.model;

import javax.persistence.;
import java.util.Date;

/
 * Represents a financial transaction in the WealthGuardian application.
 /
@Entity
@Table(name = “transactions”)
public class Transaction {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long transactionId;

    @ManyToOne
    @JoinColumn(name = “account_id”, nullable = false)
    private Account account;

    private String type; // e.g., expense, income, investment
    private double amount;
    private Date date;

    // Getters and setters
}


#### Account Model

package org.yourname.wealthguardian.model;

import javax.persistence.;
import java.util.Set;

/
 * Represents a financial account in the WealthGuardian application.
 * Can be checking, savings, investment, etc.
 /
@Entity
@Table(name = “accounts”)
public class Account {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long accountId;

    @ManyToOne
    @JoinColumn(name = “user_id”, nullable = false)
    private User user;
    
    private String type; // e.g., checking, savings, investment

    @OneToMany(mappedBy = “account”, cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    private Set<Transaction> transactions;

    // Getters and setters
}


#### Budget Model

package org.yourname.wealthguardian.model;

import javax.persistence.;

/
 * Represents a budget in the WealthGuardian application.
 /
@Entity
@Table(name = “budgets”)
public class Budget {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long budgetId;

    @ManyToOne
    @JoinColumn(name = “user_id”, nullable = false)
    private User user;

    private double monthlyLimit;
    private double currentSpending;

    // Getters and setters
}


### III. Repository Layer

Create repository interfaces for each model.

#### UserRepository

package org.yourname.wealthguardian.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import org.yourname.wealthguardian.model.User;

@Repository
public interface UserRepository extends JpaRepository<User, Long> {
    User findByUsername(String username);
}


#### TransactionRepository

package org.yourname.wealthguardian.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import org.yourname.wealthguardian.model.Transaction;

@Repository
public interface TransactionRepository extends JpaRepository<Transaction, Long> {
    // Custom queries can be added here
}


#### AccountRepository

package org.yourname.wealthguardian.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import org.yourname.wealthguardian.model.Account;

@Repository
public interface AccountRepository extends JpaRepository<Account, Long> {
    // Custom queries can be added here
}


#### BudgetRepository

package org.yourname.wealthguardian.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import org.yourname.wealthguardian.model.Budget;

@Repository
public interface BudgetRepository extends JpaRepository<Budget, Long> {
    // Custom queries can be added here
}


### IV. Service Layer

Create services to handle the business logic.

#### UserService

package org.yourname.wealthguardian.service;

import org.yourname.wealthguardian.model.User;
import org.yourname.wealthguardian.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class UserService {
    
    @Autowired
    private UserRepository userRepository;

    public User saveUser(User user) {
        return userRepository.save(user);
    }

    public User getUserById(Long userId) {
        return userRepository.findById(userId).orElse(null);
    }

    public List<User> getAllUsers() {
        return userRepository.findAll();
    }

    // Additional methods for user management
}


#### TransactionService

package org.yourname.wealthguardian.service;

import org.yourname.wealthguardian.model.Transaction;
import org.yourname.wealthguardian.repository.TransactionRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class TransactionService {

    @Autowired
    private TransactionRepository transactionRepository;

    public Transaction saveTransaction(Transaction transaction) {
        return transactionRepository.save(transaction);
    }

    public List<Transaction> getAllTransactions() {
        return transactionRepository.findAll();
    }

    public Transaction getTransactionById(Long transactionId) {
        return transactionRepository.findById(transactionId).orElse(null);
    }

    // Additional methods for transaction management
}


### V. Controllers

Create controllers to map RESTful endpoints.

#### UserController

package org.yourname.wealthguardian.controller;

import org.yourname.wealthguardian.model.User;
import org.yourname.wealthguardian.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.;

import java.util.List;

@RestController
@RequestMapping(“/api/users”)
public class UserController {

    @Autowired
    private UserService userService;
    
    @PostMapping
    public ResponseEntity<User> createUser(@RequestBody User user) {
        User createdUser = userService.saveUser(user);
        return new ResponseEntity<>(createdUser, HttpStatus.CREATED);
    }

    @GetMapping(“/{id}”)
    public ResponseEntity<User> getUserById(@PathVariable Long id) {
        User user = userService.getUserById(id);
        if (user != null) {
            return new ResponseEntity<>(user, HttpStatus.OK);
        } else {
            return new ResponseEntity<>(HttpStatus.NOT_FOUND);
        }
    }

    @GetMapping
    public ResponseEntity<List<User>> getAllUsers() {
        List<User> users = userService.getAllUsers();
        return new ResponseEntity<>(users, HttpStatus.OK);
    }
}


#### TransactionController

package org.yourname.wealthguardian.controller;

import org.yourname.wealthguardian.model.Transaction;
import org.yourname.wealthguardian.service.TransactionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.;

import java.util.List;

@RestController
@RequestMapping(“/api/transactions”)
public class TransactionController {

    @Autowired
    private TransactionService transactionService;

    @PostMapping
    public ResponseEntity<Transaction> createTransaction(@RequestBody Transaction transaction) {
        Transaction createdTransaction = transactionService.saveTransaction(transaction);
        return new ResponseEntity<>(createdTransaction, HttpStatus.CREATED);
    }

    @GetMapping
    public ResponseEntity<List<Transaction>> getAllTransactions() {
        List<Transaction> transactions = transactionService.getAllTransactions();
        return new ResponseEntity<>(transactions, HttpStatus.OK);
    }

    @GetMapping(“/{id}”)
    public ResponseEntity<Transaction> getTransactionById(@PathVariable Long id) {
        Transaction transaction = transactionService.getTransactionById(id);
        if (transaction != null) {
            return new ResponseEntity<>(transaction, HttpStatus.OK);
        } else {
            return new ResponseEntity<>(HttpStatus.NOT_FOUND);
        }
    }
}


### VI. Exception Handling

#### GlobalExceptionHandler

package org.yourname.wealthguardian.exception;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(Exception.class)
    public ResponseEntity<String> handleException(Exception e) {
        return new ResponseEntity<>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
    }
}
Guidelines:
### I. Project Structure, Standardization, and Conventions (12%)

1. Project Package Structure (2%)
- Create packages for models, repositories, services, controllers, exceptions, etc.
- Example structure:

org.yourname.wealthguardian
├── controller
├── service
├── model
├── repository
├── exception
└── util


2. Class Comments (2%)
- Add class-level Javadoc. Example:

/**
* Represents a user in the WealthGuardian application.
* Manages user information and authentication details.
*/
public class User {}


3. GitHub Hosting (5%)
- Push your code to GitHub early. Include a README.md with an overview of your project.
- Example README:

# WealthGuardian
WealthGuardian is a comprehensive personal financial management application designed to help individuals monitor and manage their daily economic activities.


4. Standard Java Naming Conventions (3%)
- Follow PascalCase for class names, camelCase for variables, methods, and URLs, snake_case for file names, and lowercase with dots for packages.
- Example:

package org.yourname.wealthguardian.controller;


### II. Core Java and Models (16%)

1. Constants in Java Classes (2%)
- Use constants for unchanging variables. Example:

public class AppConstants {
public static final String USER_TABLE = “Users”;
}


2. Models and Tables (12%)
- Ensure you have four models: User, Transaction, Account, Budget.
- Create corresponding tables in your database. Ensure correct implementations and optimize the schema.

3. Exception Handling (2%)
- Implement global exception handling using @ControllerAdvice.

@ControllerAdvice
public class GlobalExceptionHandler {
@ExceptionHandler(Exception.class)
public ResponseEntity<String> handleException(Exception e) {
return new ResponseEntity<>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
}
}


### III. Database, ORM, and Hibernate (18%)

1. MySQL DBMS (2%)
- Ensure MySQL is used as your DBMS.

2. Schema Diagram and SQL (2%)
- Include a schema diagram and SQL creation scripts in your documentation.

3. Spring Initializr Configuration (2%)
- Configure application.properties correctly.

spring.datasource.url=jdbc:mysql://localhost:3306/wealthguardian
spring.datasource.username=root
spring.datasource.password=password


4. Custom Queries (3%)
- Implement at least three custom queries in your repositories.

5. Use Hibernate/JPA (3%)
- Use Spring Data JPA for data access.

6. CRUD Operations (6%)
- Ensure you perform Create, Read, Update, and Delete operations in your application.

### IV. Front-end Development (16%)

1. Styling with CSS (3%)
- Use external CSS and possibly Bootstrap for minimal styling.

2. Six Views/Pages (4%)
- Ensure you have six distinct views: Dashboard, Transaction History, Budget Management, Investments Tracker, Savings Goals, Debt Overview.

3. HTML and Thymeleaf (3%)
- Use Thymeleaf for dynamic web pages.

4. JavaScript External Scripts (3%)
- Include at least one external JavaScript file.

5. Navigation (3%)
- Include a reusable navigation bar across your pages.

### V. Spring Framework (25%)

1. Spring Boot (2%)
- Develop your project using Spring Boot.

2. Data Binding and Validation (3%)
- Annotate models for data binding and validation.

3. Repositories and Services (4%)
- Include at least two repositories and two interconnected service classes/interfaces.

4. Managed Beans/Objects (2%)
- Create managed beans using @Component, @Service, or other relevant annotations.

5. Dependency Injection (3%)
- Use @Autowired for dependency injection correctly.

6. Session Management (3%)
- Implement session management, possibly using Spring Security.

7. Transaction and Request/Response Logging (2%)
- Add transaction and logging mechanisms.

8. Web Services (3%)
- Implement RESTful web services using Spring REST.

9. Sign-up and Login with BCrypt (3%)
- Implement user registration and login with password encryption using BCrypt.

### VI. Unit Testing (8%)

1. Test Query Methods (3%)
- Write unit tests for repository query methods.

2. Service Method Tests (3%)
- Unit test at least one method in each service class.

3. Parameterized Test (2%)
- Include at least one parameterized test