Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Customer Management Application

A simple full-stack application for managing customer records.

Tech Stack

Backend

  • Java: 17.x.x
  • Spring Boot: 3.5.8
  • Spring Data JPA
  • H2 In-Memory Database
  • Bean Validation
  • OpenAPI / Swagger
  • Actuator

Frontend

  • React: 19.2.8
  • TypeScript: 6.0.2
  • Vite: 8.2.0
  • Tailwind CSS: 4.3.3
  • Node: 24.14.0
  • npm: 11.9.0

Features

  • Create customer records
  • View customer records
  • Input validation
  • Global exception handling
  • REST API documentation using Swagger
  • Unit and integration tests

Customer Model

{
  "id": "uuid",
  "firstName": "Rohit",
  "lastName": "Kori",
  "dateOfBirth": "1993-11-14"
}

Running the Backend

Navigate to the backend directory:

cd backend

Start the application:

mvn spring-boot:run

The backend will start on:

http://localhost:8080

Swagger UI

http://localhost:8080/swagger-ui.html

H2 Console

http://localhost:8080/h2-console

Running the Frontend

Navigate to the frontend directory:

cd frontend

Install dependencies:

npm install

Start the development server:

npm run dev

The frontend will start on:

http://localhost:5173 (otherwise check the terminal for the correct url)

Running Tests

Backend Tests

mvn test

API Endpoints

Create Customer

POST /api/customers

Request:

{
  "firstName": "Rohit",
  "lastName": "Kori",
  "dateOfBirth": "1993-11-14"
}

Get Customers

GET /api/customers

Design Decisions

  • Layered architecture (Controller, Service, Repository)
  • DTO pattern used to separate API contracts from persistence entities
  • Global exception handling for consistent error responses
  • Bean Validation for request validation
  • H2 in-memory database for simplicity and portability
  • React with TypeScript for type-safe frontend development

Project Structure

customer-management
  - backend
  - frontend

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages