# hari10031/location-management-application architecture

> Architecture diagram of the GitHub repository hari10031/location-management-application, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hari10031/location-management-application
- Repository: https://github.com/hari10031/location-management-application

## Overview

Fieldnote is a multi-user location manager. Users register or sign in, then save places manually or import coordinates from a ZIP and explore their own locations on a map. The client routes users through authentication and protected map/upload views; the API handles authentication and location operations, with PostgreSQL as persistent storage. The graph includes the upload parsing/archive stages documented by the README and indexed source references. Some client page internals and upload implementation were not excerpted, so those relationships are shown only where documented or indexed.

Main entry points: [`client/src/router.jsx`](https://github.com/hari10031/location-management-application/blob/main/client/src/router.jsx) (App routes), [`server/src/app.js`](https://github.com/hari10031/location-management-application/blob/main/server/src/app.js) (Express app), [`client/src/features/upload/uploadSlice.js`](https://github.com/hari10031/location-management-application/blob/main/client/src/features/upload/uploadSlice.js) (Upload state), [`server/src/modules/locations/service.js`](https://github.com/hari10031/location-management-application/blob/main/server/src/modules/locations/service.js) (Location service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Fieldnote client"]
  node_client_app["Client entry<br/>[main.jsx]"]
  node_routes["App routes<br/>[router.jsx]"]
  node_auth_ui["Sign-in / register<br/>[AuthPage.jsx]"]
  node_route_guard["Session guards<br/>[AuthRoutes.jsx]"]
  node_auth_state["Auth state<br/>[authSlice.js]"]
  node_http["HTTP client<br/>[http.js]"]
  node_map_ui["Location map<br/>[MapPage.jsx]"]
  node_location_state["Location state<br/>[locationsSlice.js]"]
  node_upload_ui["ZIP import<br/>[UploadPage.jsx]"]
  node_upload_state["Upload state<br/>[uploadSlice.js]"]
  node_toast["Notifications<br/>[Toast.jsx]"]
end

subgraph group_server["API and domain"]
  node_api_app["Express app<br/>[app.js]"]
  node_auth_routes["Auth routes<br/>[routes.js]"]
  node_auth_controller["Auth controller<br/>[controller.js]"]
  node_auth_service["Auth service<br/>[service.js]"]
  node_auth_repo["User repository<br/>[repository.js]"]
  node_location_routes["Location routes<br/>[routes.js]"]
  node_location_controller["Location controller<br/>[controller.js]"]
  node_location_service["Location service<br/>[service.js]"]
  node_location_repo["Location repository<br/>[repository.js]"]
  node_zip_parser["Text parser<br/>[parser.js]"]
  node_archive["ZIP processing<br/>[archive.js]"]
end

subgraph group_infra["Persistence and security"]
  node_jwt["JWT services<br/>[jwt.js]"]
  node_auth_middleware["Authentication middleware<br/>[auth.js]"]
  node_postgres[("PostgreSQL")]
end

node_visitor(("User"))

node_visitor -->|"uses"| node_client_app
node_client_app -->|"renders"| node_routes
node_routes -->|"routes to"| node_auth_ui
node_routes -->|"guards routes"| node_route_guard
node_route_guard -->|"loads session"| node_auth_state
node_auth_ui -->|"dispatches auth"| node_auth_state
node_auth_state -->|"requests auth"| node_http
node_routes -->|"routes to"| node_map_ui
node_routes -->|"routes to"| node_upload_ui
node_map_ui -.->|"manages places"| node_location_state
node_location_state -->|"requests locations"| node_http
node_upload_ui -->|"dispatches import"| node_upload_state
node_upload_state -->|"uploads archive"| node_http
node_upload_state -->|"refreshes locations"| node_location_state
node_upload_state -->|"reports outcome"| node_toast
node_http -.->|"calls API"| node_api_app
node_api_app -->|"mounts routes"| node_auth_routes
node_api_app -->|"mounts routes"| node_location_routes
node_auth_routes -->|"dispatches to"| node_auth_controller
node_auth_controller -.->|"delegates to"| node_auth_service
node_auth_service -->|"uses users"| node_auth_repo
node_auth_service -.->|"issues tokens"| node_jwt
node_api_app -->|"creates service"| node_jwt
node_api_app -->|"creates middleware"| node_auth_middleware
node_location_routes -->|"dispatches to"| node_location_controller
node_location_controller -->|"delegates to"| node_location_service
node_location_service -->|"uses repository"| node_location_repo
node_location_service -.->|"processes ZIP"| node_archive
node_location_service -.->|"parses coordinates"| node_zip_parser
node_auth_repo -.->|"reads / writes"| node_postgres
node_location_repo -.->|"reads / writes"| node_postgres

click node_client_app "https://github.com/hari10031/location-management-application/blob/main/client/src/main.jsx"
click node_routes "https://github.com/hari10031/location-management-application/blob/main/client/src/router.jsx"
click node_auth_ui "https://github.com/hari10031/location-management-application/blob/main/client/src/pages/AuthPage.jsx"
click node_route_guard "https://github.com/hari10031/location-management-application/blob/main/client/src/components/AuthRoutes.jsx"
click node_auth_state "https://github.com/hari10031/location-management-application/blob/main/client/src/features/auth/authSlice.js"
click node_http "https://github.com/hari10031/location-management-application/blob/main/client/src/api/http.js"
click node_map_ui "https://github.com/hari10031/location-management-application/blob/main/client/src/pages/MapPage.jsx"
click node_location_state "https://github.com/hari10031/location-management-application/blob/main/client/src/features/locations/locationsSlice.js"
click node_upload_ui "https://github.com/hari10031/location-management-application/blob/main/client/src/pages/UploadPage.jsx"
click node_upload_state "https://github.com/hari10031/location-management-application/blob/main/client/src/features/upload/uploadSlice.js"
click node_toast "https://github.com/hari10031/location-management-application/blob/main/client/src/features/notifications/Toast.jsx"
click node_api_app "https://github.com/hari10031/location-management-application/blob/main/server/src/app.js"
click node_auth_routes "https://github.com/hari10031/location-management-application/blob/main/server/src/modules/auth/routes.js"
click node_auth_controller "https://github.com/hari10031/location-management-application/blob/main/server/src/modules/auth/controller.js"
click node_auth_service "https://github.com/hari10031/location-management-application/blob/main/server/src/modules/auth/service.js"
click node_auth_repo "https://github.com/hari10031/location-management-application/blob/main/server/src/modules/auth/repository.js"
click node_location_routes "https://github.com/hari10031/location-management-application/blob/main/server/src/modules/locations/routes.js"
click node_location_controller "https://github.com/hari10031/location-management-application/blob/main/server/src/modules/locations/controller.js"
click node_location_service "https://github.com/hari10031/location-management-application/blob/main/server/src/modules/locations/service.js"
click node_location_repo "https://github.com/hari10031/location-management-application/blob/main/server/src/modules/locations/repository.js"
click node_zip_parser "https://github.com/hari10031/location-management-application/blob/main/server/src/modules/locations/parser.js"
click node_archive "https://github.com/hari10031/location-management-application/blob/main/server/src/modules/locations/archive.js"
click node_jwt "https://github.com/hari10031/location-management-application/blob/main/server/src/lib/jwt.js"
click node_auth_middleware "https://github.com/hari10031/location-management-application/blob/main/server/src/middleware/auth.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_client_app,node_routes,node_auth_ui,node_route_guard,node_auth_state,node_http,node_map_ui,node_location_state,node_upload_ui,node_upload_state,node_toast,node_visitor toneBlue
class node_api_app,node_auth_routes,node_auth_controller,node_auth_service,node_auth_repo,node_location_routes,node_location_controller,node_location_service,node_location_repo,node_zip_parser,node_archive toneAmber
class node_jwt,node_auth_middleware,node_postgres toneMint
```

## Components

### Fieldnote client

- [Client entry](https://github.com/hari10031/location-management-application/blob/main/client/src/main.jsx): `client/src/main.jsx`
- [App routes](https://github.com/hari10031/location-management-application/blob/main/client/src/router.jsx): `client/src/router.jsx`
- [Sign-in / register](https://github.com/hari10031/location-management-application/blob/main/client/src/pages/AuthPage.jsx): `client/src/pages/AuthPage.jsx`
- [Session guards](https://github.com/hari10031/location-management-application/blob/main/client/src/components/AuthRoutes.jsx): `client/src/components/AuthRoutes.jsx`
- [Auth state](https://github.com/hari10031/location-management-application/blob/main/client/src/features/auth/authSlice.js): `client/src/features/auth/authSlice.js`
- [HTTP client](https://github.com/hari10031/location-management-application/blob/main/client/src/api/http.js): `client/src/api/http.js`
- [Location map](https://github.com/hari10031/location-management-application/blob/main/client/src/pages/MapPage.jsx): `client/src/pages/MapPage.jsx`
- [Location state](https://github.com/hari10031/location-management-application/blob/main/client/src/features/locations/locationsSlice.js): `client/src/features/locations/locationsSlice.js`
- [ZIP import](https://github.com/hari10031/location-management-application/blob/main/client/src/pages/UploadPage.jsx): `client/src/pages/UploadPage.jsx`
- [Upload state](https://github.com/hari10031/location-management-application/blob/main/client/src/features/upload/uploadSlice.js): `client/src/features/upload/uploadSlice.js`
- [Notifications](https://github.com/hari10031/location-management-application/blob/main/client/src/features/notifications/Toast.jsx): `client/src/features/notifications/Toast.jsx`

### API and domain

- [Express app](https://github.com/hari10031/location-management-application/blob/main/server/src/app.js): `server/src/app.js`
- [Auth routes](https://github.com/hari10031/location-management-application/blob/main/server/src/modules/auth/routes.js): `server/src/modules/auth/routes.js`
- [Auth controller](https://github.com/hari10031/location-management-application/blob/main/server/src/modules/auth/controller.js): `server/src/modules/auth/controller.js`
- [Auth service](https://github.com/hari10031/location-management-application/blob/main/server/src/modules/auth/service.js): `server/src/modules/auth/service.js`
- [User repository](https://github.com/hari10031/location-management-application/blob/main/server/src/modules/auth/repository.js): `server/src/modules/auth/repository.js`
- [Location routes](https://github.com/hari10031/location-management-application/blob/main/server/src/modules/locations/routes.js): `server/src/modules/locations/routes.js`
- [Location controller](https://github.com/hari10031/location-management-application/blob/main/server/src/modules/locations/controller.js): `server/src/modules/locations/controller.js`
- [Location service](https://github.com/hari10031/location-management-application/blob/main/server/src/modules/locations/service.js): `server/src/modules/locations/service.js`
- [Location repository](https://github.com/hari10031/location-management-application/blob/main/server/src/modules/locations/repository.js): `server/src/modules/locations/repository.js`
- [Text parser](https://github.com/hari10031/location-management-application/blob/main/server/src/modules/locations/parser.js): `server/src/modules/locations/parser.js`
- [ZIP processing](https://github.com/hari10031/location-management-application/blob/main/server/src/modules/locations/archive.js): `server/src/modules/locations/archive.js`

### Persistence and security

- [JWT services](https://github.com/hari10031/location-management-application/blob/main/server/src/lib/jwt.js): `server/src/lib/jwt.js`
- [Authentication middleware](https://github.com/hari10031/location-management-application/blob/main/server/src/middleware/auth.js): `server/src/middleware/auth.js`
- **PostgreSQL**

### Other components

- **User**

## Connections

- User → Client entry: uses
- Client entry → App routes: renders (evidence: `client/src/main.jsx`)
- App routes → Sign-in / register: routes to (evidence: `client/src/router.jsx`)
- App routes → Session guards: guards routes (evidence: `client/src/router.jsx`)
- Session guards → Auth state: loads session (evidence: `client/src/components/AuthRoutes.jsx`)
- Sign-in / register → Auth state: dispatches auth (evidence: `client/src/pages/AuthPage.jsx`)
- Auth state → HTTP client: requests auth (evidence: `client/src/features/auth/authSlice.js`)
- App routes → Location map: routes to (evidence: `client/src/router.jsx`)
- App routes → ZIP import: routes to (evidence: `client/src/router.jsx`)
- Location map → Location state: manages places
- Location state → HTTP client: requests locations (evidence: `client/src/features/locations/locationsSlice.js`)
- ZIP import → Upload state: dispatches import (evidence: `client/src/pages/UploadPage.jsx`)
- Upload state → HTTP client: uploads archive (evidence: `client/src/features/upload/uploadSlice.js`)
- Upload state → Location state: refreshes locations (evidence: `client/src/features/upload/uploadSlice.js`)
- Upload state → Notifications: reports outcome (evidence: `client/src/features/upload/uploadSlice.js`)
- HTTP client → Express app: calls API
- Express app → Auth routes: mounts routes (evidence: `server/src/app.js`)
- Express app → Location routes: mounts routes (evidence: `server/src/app.js`)
- Auth routes → Auth controller: dispatches to (evidence: `server/src/modules/auth/routes.js`)
- Auth controller → Auth service: delegates to
- Auth service → User repository: uses users (evidence: `server/src/app.js`)
- Auth service → JWT services: issues tokens
- Express app → JWT services: creates service (evidence: `server/src/app.js`)
- Express app → Authentication middleware: creates middleware (evidence: `server/src/app.js`)
- Location routes → Location controller: dispatches to (evidence: `server/src/modules/locations/routes.js`)
- Location controller → Location service: delegates to (evidence: `server/src/modules/locations/controller.js`)
- Location service → Location repository: uses repository (evidence: `server/src/app.js`)
- Location service → ZIP processing: processes ZIP (evidence: `server/src/modules/locations/service.js`)
- Location service → Text parser: parses coordinates (evidence: `server/src/modules/locations/service.js`)
- User repository → PostgreSQL: reads / writes
- Location repository → PostgreSQL: reads / writes
