← All documentation

Infrastructure

How to create and edit infrastructure

Structures — bridges, kiosks, signs, counters — are filed from the field app and edited from the dashboard slide panel. Covers all six default structure types, per-type attributes, the bridge materials calculator, inspection tracking, and the delete behavior.

Infrastructure — internally called structures — is anything on the trail that isn't the trail itself: a bridge, a stair set, a kiosk, a trailhead sign, a trail-map board, a counter. Every structure carries its own coordinates, a condition, inspection dates, and photos, and can be attached to a trail (or stand alone before a trail exists).

What is a structure?

A structure is a permanent (or semi-permanent) built object on the trail. Every structure has a unique auto-generated code (e.g. BR-0001 for the first bridge), a name, a type, coordinates, an installer, an install date, an inspection cadence, a condition, photos, per-type technical attributes, and an optional link to a trail or network.

Structures are private to your organization — they show up on the dashboard and the field app, but not on the public trail pages or the public map. If you want to publish a specific structure to the outside world (say, an interpretive sign someone can look up), that's a documentation-side effort, not a settings toggle.

The URL segment stays /structures, but the whole UI (sidebar entry, page header, empty-state copy, section titles on trail pages) reads Infrastructure. Same concept, different label.

Structure types and categories

Every structure belongs to one structure type. The type controls:

  • The name shown in the UI ("Bridge", "Kiosk", "Trail Counter").
  • The prefix used to auto-generate the structure code (BR for Bridge → BR-0001, BR-0002; KI- for Kiosk; and so on).
  • The inspection interval (in months) — how often the next inspection is due.
  • The category the type belongs to: Built, Signage, Monitoring, or Natural.
  • The per-type attribute schema — which extra fields the wizard shows (e.g. span length for a bridge, sign height for a signpost).

Every fresh organization ships with six default types:

Type Prefix Category Default inspection
Bridge BR built 12 months
Stairs ST built 12 months
Sign SI signage 24 months
Kiosk KI signage 24 months
Trail Map TM signage 24 months
Trail Counter TC monitoring 6 months

You can add, edit, or delete types at Settings → Infrastructure types. Adding a type there means it appears in the field-app wizard's type picker on step 1; editing the attribute schema changes which extra fields the wizard shows on step 4.

Creating a structure

There is no dashboard "Create structure" form. Every structure is created through the field-app wizard — on your phone in the field or via the field app in a desktop browser tab. The Infrastructure index page's + New structure button opens the field app in a new tab; the field app then routes you into a 4-step wizard.

The wizard's four steps:

  1. Pick a type — grid of your organization's structure types (Bridge / Stairs / Sign / Kiosk / etc.). Tapping a type advances to the next step.
  2. Photos — capture 1 to 10 photos with your phone camera or pick from your camera roll. Optional but strongly recommended — the person doing the next inspection wants to see what it looks like now.
  3. Confirm the spot — GPS auto-locks to your current position; drag the pin if you're off. If GPS isn't available, tap-to-place works too.
  4. Details — the fields covered in the next section.

Anyone with active membership in your organization can create a structure — owner, manager, field worker, or volunteer. The dashboard + New structure button is only shown to managers, but that's just a UI convenience: field workers use the field-app FAB with a + icon on the Infrastructure tab.

Every field on the create form

Step 4 of the wizard collects the details. Labels below are verbatim.

  • Type — the type you picked on step 1, shown read-only. Change it by tapping back and picking again.
  • Name (optional) — plain text (placeholder: "Name this structure"). What shows in the list and on the trail's Show page. Blank is fine — the code (e.g. BR-0001) is unique on its own, but a name like "North Fork bridge" is friendlier.
  • Per-type custom fields — whatever attributes the structure type defines. See the Type-specific attributes section below.
  • Condition — dropdown with Good / Fair / Poor / Unknown. What state the structure is in today. Update this on future inspections to track drift over time.
  • Installer (optional) — plain text (placeholder: "Volunteer crew, contractor, …"). Who built or placed it. Useful for warranty conversations later.
  • Install date (optional) — date picker. When it was placed.
  • Description (optional) — textarea (placeholder: "What is this and why does it matter?"). Any context the next inspector needs.

Latitude / longitude aren't shown as manual fields on the wizard — they come from step 3 (Confirm the spot). Location source (gps vs manual) is stamped automatically so future reports can tell which spots came from a live fix vs a desk drop.

Hit Save to create the structure. The wizard closes, the new structure appears in the Infrastructure list, and its auto-generated code ({PREFIX}-{4-digit sequence}) is assigned server-side.

Type-specific attributes

Each structure type carries its own attribute schema — a list of dynamic fields that the wizard renders on step 4 alongside the standard fields above. Supported field types:

  • Text — single-line plain input.
  • Textarea — multi-line plain input for longer notes.
  • Number — numeric input with optional min/max.
  • Date — date picker.
  • Select — dropdown with predefined options (e.g. "Concrete / Wood / Steel").
  • Checkbox — a yes/no toggle.
  • Dimension — a specialised input for physical measurements. Bridges use this to capture length, width, and decking thickness in a way the materials calculator can read.

You define these schemas on Settings → Infrastructure types → Edit type → Attributes. Adding a new field to an existing type doesn't touch structures that were already saved — they just show a blank for that field until the next edit. Changing a field's type (e.g. number → select) does risk stranding old data, so change types with care.

Values are stored on the structure row as JSON under type_attributes. The dashboard slide panel renders them read-only in a Details block; the edit form renders them inline so a manager can update any of them.

Photos, code, and inspections

Photos. Every structure supports up to 20 photos, with each upload batch capped at 10 files, 5 MB per file, PNG or JPEG. When the 21st photo is uploaded, the oldest one rotates off so the count stays at 20. Photos land in the dashboard slide panel as a grid; tapping any photo opens the lightbox for full-size viewing.

Code. Every structure gets an auto-generated identifier: the type's prefix (e.g. BR for Bridge), a dash, and a 4-digit zero-padded sequence unique inside your organization (e.g. BR-0001). The code appears on the structure card, in exports, and next to the name on trail Show pages. It's stable once assigned — even if you change the structure's type later, the code stays.

Inspections. The structure type carries an inspection interval in months, and a new structure's first inspection is due that far after its install date. Filing an inspection from the field app moves the date forward and sets the structure's condition from the answers — see Inspecting structures. Overdue structures show an Overdue chip on the slide panel and can be filtered on the index page; that's your worklist for the next round.

Recording an inspection is done from the slide panel via Log inspection (managers only). It stamps the date, updates the next-due, and lets you attach notes.

Viewing and editing a structure

There's no standalone Structure show page — every structure "opens" as a slide-out panel on the Infrastructure index page. Clicking a structure card, or hitting a direct URL like /structures/BR-0001, both open the panel with the structure pre-selected.

The slide panel shows:

  • Type + condition chips at the top (color-coded).
  • Coordinates + a small map pin.
  • Overdue chip if the next-inspection date has passed.
  • Trail linkage (or "not on a trail").
  • Description, installer, install date, next inspection, code.
  • Details block — per-type attributes rendered read-only.
  • Calculate replacement materials button (bridges only — see next section).
  • Photo grid.

Managers see an Edit details collapsible below the read-only view. Every field is editable — including the structure's type, which is intentional (a mis-picked type on creation can be corrected without recreating). Field workers see the panel as read-only; they file structures via the field app but rely on a manager to correct a name or update a condition.

The slide panel also carries a Log inspection button for managers — see the previous section.

Bridges: the materials calculator

Bridges are the only structure type with a special affordance: on the slide panel, managers see a Calculate replacement materials button. Tapping it opens a materials sheet that reads the bridge's canonical dimensions (length, width, decking thickness) from its type attributes and generates a materials list — number of decking boards, structural stringers, hardware — plus a downloadable PDF you can hand to a lumber supplier.

The calculator needs all three canonical dimensions to be set. If any is missing, the button surfaces the missing values so you know what to fill in before recalculating. Materials selection (dimensional lumber sizes, hardware options) is controlled by your organization's lumber-type picks; those live in the structure's edit form as decking picker / structural picker fields.

The PDF export is generated via /structures/{id}/materials-pdf — a link to it appears in the sheet once the calculator has valid dimensions.

Linkage to trails, networks, and maintenance items

A structure can live in one of three states:

  • On a trailtrail_id is set. The structure appears in the trail's Show page under Structures ({{ n }}) with its code, name, type, and condition. Deleting the trail nulls the trail_id (the structure survives as standalone).
  • On a networknetwork_id is set. Useful for a kiosk at a trailhead that serves multiple trails in the network. Deleting the network nulls the network_id.
  • Standalone — no trail or network link. Common for structures created before the trails they'll eventually attach to were imported.

You can attach or reassign from the slide panel's edit form via the Trail dropdown ("— None —" is a valid choice) — no need to recreate.

Maintenance items. Every maintenance issue can be linked to a structure via the Broken structure issue type — see the How to create a maintenance item article. Deleting a structure doesn't delete its linked maintenance items; their structure_id is nulled and they show up on the general maintenance list without the structure link.

Deleting a structure

The Delete button lives on the slide panel edit form. It's owner/manager only. Confirmation reads "Delete this structure? This cannot be undone."

What happens on delete:

  • The structure row is removed.
  • Any maintenance issues that pointed at it lose the link (structure_id set to NULL) but the maintenance issues themselves stay.
  • The auto-generated code is not reused — if you delete BR-0003, the next bridge you create is BR-0004, not BR-0003. This keeps historical references stable.
  • Photos are not auto-purged from storage on structure delete — orphaned photos linger unless you delete each one first via the photo controls in the slide panel. Small annoyance today; may be automated later.

If you want to hide a structure temporarily rather than deleting it, drop it off its trail and let it sit as standalone. There's no soft-delete for structures.

Common gotchas

  • There is no dashboard "Create structure" form. Every structure is filed via the field-app wizard. The dashboard + New structure button opens the field app in a new tab.
  • The menu says Infrastructure and the web address says structures. Same thing — the address kept its older name so existing bookmarks and links still work.
  • Structure codes are stable and never reused. Deleting a structure leaves a gap in the numbering — that's intentional.
  • Deleting a structure deletes its photos. They stop counting against your storage at the same moment the structure goes.
  • Bridge materials calculator needs the three canonical dimensions. If you haven't filled in length / width / decking thickness on the bridge's type attributes, the button surfaces the missing fields instead of a lumber list.
  • Type changes are allowed and safe. A mis-picked type on creation can be fixed by editing the structure and picking a different type. The code stays, the type-attribute values may or may not carry over depending on schema overlap.
  • Field workers can create but can't edit. They file structures via the field app; a manager corrects any typos or updates conditions afterwards.

What's next

  • Set up your organization's structure types at Settings → Infrastructure types. Add the ones you'll actually use, delete the ones you won't, and configure each type's attribute schema (dimensions for bridges, sign height for signposts, etc.).
  • Read the How to create a maintenance item article for the Broken structure issue-type flow — that's how you file "the bridge decking is rotting" against a specific structure.
  • Point-of-interest data (viewpoints, campsites, hazards) is a separate model — see the How to create and edit points of interest article.