Skip to content

EMaksy/GhostNetFishing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GhostNetFishing

Simple Spring Boot service for reporting and recovering ghost nets (lost or abandoned fishing nets).

Overview

GhostNetFishing helps coordinate the reporting and recovery of ghost nets, which pose serious environmental risks. The application allows anonymous reporting, structured recovery coordination, and lifecycle tracking of each reported net.

Goals

  • Make reporting ghost nets easy and accessible

  • Coordinate recovery efforts efficiently

  • Track ghost nets from report to recovery or confirmation of absence

Features

Reporting

  • Report ghost nets with:

    • GPS coordinates

    • Estimated size

    • Initial status (REPORTED)

  • A name is required to file a report; phone is optional when reporting anonymously

  • If reporting anonymously, the phone number is not required and will not be stored

  • A net can only be marked as missing by a non-anonymous, contactable person

Recovery Coordination

  • Rescuers can:

    • View ghost nets pending recovery

    • Claim a ghost net for recovery (at most one rescuer per net)

    • Mark a ghost net as recovered

    • Mark a ghost net as missing (requires name + phone; not anonymous)

    • See their assigned recoveries on the dashboard and /tasks

Visibility

  • View reported (unassigned) ghost nets on a map (/map)

  • See which rescuer is assigned to which net in the recoveries list

Domain Model

Ghost Net

A ghost net consists of:

  • GPS coordinates (latitude and longitude)

  • Estimated size

  • Status

  • Assigned rescuer (optional)

Status Lifecycle

  • REPORTED — Net has been reported

  • RECOVERY_PLANNED — A rescuer has claimed the net

  • RECOVERED — Net has been successfully recovered by the assigned rescuer

  • MISSING — Net could not be found at the reported location (requires name + phone; not anonymous)

Persons

Reporting Person

  • Name

  • Phone number is required unless the report is anonymous

  • May remain anonymous

Rescuer

  • Name and phone number

  • Can work on multiple ghost nets concurrently

  • Each ghost net can have at most one rescuer

User Stories (MoSCoW)

MUST

  1. As a reporting person, I want to report ghost nets (optionally anonymously).

  2. As a rescuer, I want to sign up to recover a ghost net.

  3. As a rescuer, I want to see ghost nets that still need recovery.

  4. As a rescuer, I want to mark ghost nets as recovered.

COULD

  1. As a rescuer, I want to see unrecovered ghost nets on a map.

  2. As a rescuer, I want to see who is planning to recover which nets.

User Stories Implementation

  • Reporting (anonymous allowed)
    Public forms on / and /report with GPS validation.
    Phone number is required only for non-anonymous reports.

  • Sign up for recovery
    Authenticated users can claim a ghost net.
    The system enforces at most one rescuer per net.

  • View nets to recover
    Open nets are listed on / and /recoveries with status filters.

  • Mark as recovered
    Only the assigned rescuer can mark a net as RECOVERED.

  • Mark as missing
    Only non-anonymous, contactable people can mark a net as MISSING.

  • Map view (optional)
    Leaflet-based map available on /map (requires network access for map tiles).

  • Coordination view (optional)
    Listings show the assigned rescuer’s name.
    Reassignment is manual (unassign → reassign).

Technology Stack

  • Java 21

  • Spring Boot 4

    • Spring Web

    • Spring Data JPA

    • Spring Security

    • Validation

    • Thymeleaf

  • MySQL (via Docker Compose)

  • Maven Wrapper

Prerequisites

  • Java 21 (JDK)

  • Docker and Docker Compose

  • Bash-compatible shell

  • Maven is shipped via the included wrapper (./mvnw); a global Maven install is optional

Configuration

Default database configuration in src/main/resources/application.properties:

spring.datasource.url=jdbc:mysql://localhost:3306/mydatabase
spring.datasource.username=myuser
spring.datasource.password=secret

Configuration can be overridden via environment variables or by editing application.properties.

Running Locally

1. Run the Application (starts DB via Docker Compose)

./mvnw spring-boot:run

Dependencies will be downloaded on the first run.

Spring Boot 4 with spring-boot-docker-compose starts/stops the MySQL service defined in docker-compose.yaml automatically (Docker daemon must be running). If you prefer manual control, you can still start it yourself with docker compose up -d before running the app.

3. Access the Application

Open your browser at:

http://localhost:8080

Building a Runnable JAR

mvn clean package
java -jar target/ghost-net-app-0.0.1-SNAPSHOT.jar

Development Notes

  • Database schema is managed by Spring Data JPA using ddl-auto=update for development.

  • Use proper database migrations (e.g. Flyway or Liquibase) for production.

  • SQL logging can be enabled via:

spring.jpa.show-sql=true

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published