Skip to content

Profile Page Implementation Plan

İrem Önen edited this page Apr 7, 2026 · 1 revision

1. Basic Identity

The fundamental data required for user login and identification within the system.

  • id (Using a UUID is highly recommended for security)
  • firstName
  • lastName
  • email (Unique - for login)
  • password (Hashed)

2. Contact & Location - Critical

Internet infrastructure may collapse during a disaster, making alternative communication methods and pinpoint location accuracy highly important.

  • phoneNumber (Unique - essential for SMS or voice calls)
  • neighborhood (Neighborhood name or ID - zoning is a requirement for the "Neighborhood Hub" concept)
  • address (Explicit home or work address)
  • latitude & longitude (Necessary for map-based matching and distance calculations)

3. Emergency Info

Information that must be known if the user needs assistance themselves or is taking an active role in the field.

  • bloodType (Enum: A_POS, O_NEG, etc.)
  • emergencyContactName (Name of the person to contact in an emergency)
  • emergencyContactPhone (Phone number of the emergency contact)
  • specialNeeds or hasDisability (Does the user require extra assistance during an evacuation? E.g., mobility impaired, dialysis patient, etc.)

4. Role & Status

Fields that will govern the application's business logic.

  • userType (Enum: STANDARD, EXPERT)
  • verificationStatus (Enum: PENDING, VERIFIED, REJECTED - Specifically tracks the approval status of documents proving an expert user's credentials, such as medical or engineering licenses)
  • availabilityStatus (Enum: SAFE, NEEDS_HELP, AVAILABLE_TO_HELP - The user's current status during an active disaster)

5. Hub Features (Relational Tables)

Instead of adding these directly as columns in the User table, storing them in separate tables using a @OneToMany relationship in Spring Boot is much better for database normalization and health.

  • resources: A list of items that both Standard and Expert users can add.

Example Resource Object: id, name (e.g., Generator), category (e.g., Power Supply), quantity (e.g., 2), condition (e.g., Working).

  • expertiseFields: A list of skills that will only appear in the profiles of users where userType = EXPERT.

Example Expertise Object: id, field (e.g., First Aid), certificationLevel (e.g., Basic/Advanced), certificationDocumentUrl (Link to the supporting verification document).

Clone this wiki locally