This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Popspot is a Spring Boot backend for a popup store platform. Users can browse/reserve popup stores, purchase goods, and manage coupons. Two roles exist: USER (customers) and ORGANIZER (store operators).
# Build
./gradlew build
# Run
./gradlew bootRun
# Run tests (all)
./gradlew test
# Run a single test class
./gradlew test --tests "com.back.popspot.domain.payment.entity.PaymentTest"
# Run a single test method
./gradlew test --tests "com.back.popspot.domain.SomeTest.methodName"
# Check code style
./gradlew checkstyleMain- Java 25, Spring Boot 4.1.0
- Spring Data JPA with MySQL (prod) / H2 (dev/test)
- Spring Security + OAuth2 Client (social login)
- Lombok, Bean Validation
src/main/java/com/back/popspot/
├── domain/ # Feature domains
│ ├── coupon/ # Coupons issued per popup store
│ ├── goods/ # Goods (products) sold at popup stores
│ ├── oauthAccount/ # Social login accounts linked to users
│ ├── payment/ # Payments for reservations and goods orders
│ ├── popupStore/ # Popup stores and reservation time slots
│ ├── reservation/ # User reservations for popup store slots
│ └── user/ # User accounts
└── global/
├── entity/ # BaseEntity (id, createdAt, modifiedAt)
├── exception/ # BusinessException, ErrorCode enum, GlobalExceptionHandler
└── response/ # CommonApiResponse<T>
User→OauthAccount(1:N) — a user can have multiple OAuth providersUser(as ORGANIZER) →PopupStore(1:N)PopupStore→ReservationSlot(1:N) — time slots with capacityUser+ReservationSlot→Reservation(unique constraint per user+slot)PopupStore→Goods(1:N) — products sold at the storePopupStore→Coupon(1:N) — discount coupons per storeUser+Coupon→UserCoupon— coupon issuance recordsUser→GoodsOrder(1:N) — order with optional coupon discount and shipping infoGoodsOrder→GoodsOrderItem(1:N)Payment— covers bothPOPUPtype (linked toReservation) andGOODStype (linked toGoodsOrder)
Response wrapper: All controllers return CommonApiResponse<T>. Use:
CommonApiResponse.success(data)— 200 with dataCommonApiResponse.successMessage("message")— 200 no dataCommonApiResponse.created("message", data)— 201 with data
Exceptions: Throw BusinessException(ErrorCode) for domain errors. GlobalExceptionHandler maps ErrorCode enum values to HTTP responses. Add new error codes to ErrorCode enum.
Base entity: All entities extend BaseEntity which provides id (auto-increment), createdAt, modifiedAt via JPA auditing.
Soft delete: Goods uses deletedAt for soft deletion (set timestamp instead of deleting rows).
Code style: Naver Java coding convention (Checkstyle). Max line length 120, LF line endings, UTF-8, tabs=4 spaces.
Each domain currently only has an entity/ subpackage. When adding features, follow the layered pattern: entity/ → repository/ → service/ → controller/, with dto/ for request/response objects.