# Getting Started

## What This Project Does

This is a Java-based backend system that handles order processing and product management for a Japanese business domain. It defines core business entities with localized field labels and provides service classes to orchestrate operations. The codebase is intentionally lean — a small set of focused classes that form the foundation for larger application layers.

## Recommended Reading Order

If you are new to the codebase, read the pages in this order:

1. **[Architecture Overview](../architecture/overview.md)** — high-level system design and module boundaries
2. **[Data Models](../data-models/entities.md)** — the entity classes and their field conventions
3. **[Service Layer](../services/overview.md)** — how business logic is organized and wired together
4. **[API Reference](../api/overview.md)** — method-level documentation for classes you will interact with daily

## Key Entry Points

Start with these classes:

| Class | Path | Why Start Here |
|-------|------|----------------|
| [OrderProcessor](../classes/OrderProcessor.md) | `src/main/java/OrderProcessor.java` | Main entry point for order lifecycle — `createOrder(String orderId)` |
| [ProductService](../classes/ProductService.md) | `src/main/java/ProductService.java` | Product management and lookups |

These two classes are the heart of the application. Everything else in the codebase is entity data that flows through them.

## Project Structure

```
src/main/java/
  OrderProcessor.java          # Order processing entry point
  ProductService.java          # Product management service
  A.java                       # Minimal utility class
  EucJpClass.java              # Entity with Japanese-labeled fields
  LargeBusinessLabelClass.java # Entity with 50+ Japanese-labeled business fields
  LargeFieldMap.java           # Service IF field mapping entity
  MixedLabelClass.java         # Entity mixing labeled and unlabeled fields
  MultiPattern.java            # Entity with mixed comment patterns
  PartialLabelEntity.java      # Entity with alternating labeled/unlabeled fields
```

**Structure highlights:**

- All source lives under `src/main/java/` — there are no sub-packages.
- Entity classes use simple POJOs with private fields, no getters/setters beyond accessor methods where needed.
- Field naming follows a mix of camelCase and Japanese transliteration (e.g., `keiNo` for 契約番号).

```mermaid
flowchart TD
    subgraph BusinessLogic["Service Layer"]
        OP["OrderProcessor"]
        PS["ProductService"]
    end

    subgraph Entities["Data Classes"]
        EJP["EucJpClass"]
        LBL["LargeBusinessLabelClass"]
        LFM["LargeFieldMap"]
        MLC["MixedLabelClass"]
        MP["MultiPattern"]
        PLE["PartialLabelEntity"]
    end

    OP -->|"creates"| O["Order"]
    PS -->|"manages"| P["Product"]

    style OP fill:#e1f5fe
    style PS fill:#e1f5fe
    style EJP fill:#f3e5f5
    style LBL fill:#f3e5f5
    style LFM fill:#f3e5f5
    style MLC fill:#f3e5f5
    style MP fill:#f3e5f5
    style PLE fill:#f3e5f5
```

## Configuration

This is a small project with minimal configuration:

- **No build config files** — the project does not use Maven, Gradle, or other build descriptors. Java source files are compiled directly.
- **No application properties** — classes use inline default values (e.g., `private String productId = ""`) rather than external config files.
- **No framework config** — all classes are plain Java with no Spring, Hibernate, or other framework dependencies.

When extending the project, follow the existing pattern: add your field declarations inline with class-level defaults.

## Common Patterns

### Field Conventions

| Pattern | Example | Meaning |
|---------|---------|---------|
| `keiNo` | `private String keiNo = ""` | Contract number (契約番号) |
| `syoriDiv` | `private String syoriDiv = ""` | Processing division (処理区分) |
| `idoDiv` | `private String idoDiv = ""` | Movement division (移動区分) |

- **Default values**: Every field is initialized to `""` (empty string).
- **Comments**: Fields are documented with inline Japanese comments. Multi-language comments are supported (`// English / Japanese`).
- **Tagged sections**: Some classes use commit-style markers like `// ANK-4494-00-00 ADD START` to delimit feature additions.

### Naming Conventions

- **Class names**: PascalCase, descriptive nouns (`OrderProcessor`, `LargeBusinessLabelClass`).
- **Field names**: camelCase for English words, Romanized Japanese for Japanese domain terms (`keiNo`, `syoriDiv`, `kotsuDiv`).
- **Package**: No package declaration — all classes are in the default package.

### Code Style

- Javadoc is used for public-facing classes like `OrderProcessor`.
- Simple field-only POJOs have no Javadoc — just inline comments.
- No access modifiers beyond `private` for fields and default package visibility for the class itself.
