Shared

This directory contains code that is shared between the frontend and backend.

Files

  • utils.ts - Shared types, interfaces, and utility functions

Types

  • UserInfo - User information (without sensitive data)
  • LocationInfo - Location information
  • AlertInfo - Alert information
  • SignupRequest - Request body for signup
  • LoginRequest - Request body for login
  • AuthResponse - Response for authentication
  • AddLocationRequest - Request body for adding a location

Constants

  • OSUN_STATE_BOUNDS - Geographic boundaries of Osun State, Nigeria

Utility Functions

  • isInOsunState(latitude, longitude) - Check if coordinates are within Osun State
  • formatDate(dateString) - Format a date string for display