How itspankajrepo/cashrichassignment works
Project type and purpose
• This is a Spring-Boot based monolithic REST API service (“cashRichAssignment”) that exposes four endpoints: user sign-up, login, update profile, and fetch latest cryptocurrency quotes.
• There is no separate frontend; it is a backend service intended to be consumed by a client or mobile app.
File structure
• Top‐level files: pom.xml (Maven build), mvnw scripts, README.md, .mvn wrapper.
• src/main/java/com/assignment/cashRich:
• CashRichApplication.java – SpringBoot main class
• controller/… – REST controllers (CryptoController, UserController)
• handler/… – Business‐logic handlers (separating raw service logic)
• service/… – Service interfaces and implementations (UserService, TokenService)
• repository/… – Spring Data JPA repositories for User, UserToken, UserFetchingLatestQuotes
• entity/… – JPA entities
• config/ProjectSecurityConfig.java – Spring Security configuration
• filter/RestControllerRequestFilter.java – Pre‐authentication request filter
• advice/RestTemplateResponseErrorHandler.java and exception/… – Global exception handling
• util/validation and generic utility classes
• src/main/resources/application.properties – DB & external API configuration, message bundles.
• src/test – Integration/unit tests.
README for additional insights
• Describes the four APIs, required HTTP headers, and sample cURL commands.
• Indicates authenticated endpoints use JWT Bearer tokens.
• One endpoint calls an external cryptocurrency quotes API via RestTemplate.