Skip to main content

seeCph Backend API

seeCph Backend API
#

  1. Project Start

    21 august, 2026

  2. Planning

    25 august, 2026

    Making user stories to get a better grasp of the projects and make it easier to analyze further on. First in form of a domain model seen below, though it’s a rough model and probably will evolve doing the project.

    Domain model
    Domain model
  3. JPA

    25 august, 2026

    Class Diagram
    #

    Working from the domain model and user stories, I started creating a class diagram and mapping out the relations between entities.

    While building the class diagram, I coded alongside it — starting with all entities from the domain model to get a better overview and catch anything I might be missing.

    I changed Event to an abstract class, since I wanted to support both one-time and recurring events. In the end I only needed Event, because I decided to store dates in a Set instead of splitting into subclasses.

    After that, I added the ENUMS I needed and filled in their constants.

    JPA
    #

    Next was wiring up the relations through JPA annotations. I started simple — @OneToOne, @OneToMany, @ManyToMany — and built from there. Two areas needed extra research making annotations for Sets from Collections, and abstract entity classes.

    Sets

    @ElementCollection

    abstract classes

    @Inheritance(strategy = InheritanceType.SINGLE_TABLE)

    Every subclass of an abstract entity gets its own table, keeping the inheritance hierarchy properly represented in the database.

    Class Diagram
    Class Diagram 1.0