A contact list can tell you who to call, but it doesn’t always tell you what was discussed last time or what still needs doing. A small CRM can keep that context with the business record, where it’s easier to find.

Project write-up · 7 November 2026

A small CRM for work that happens locally.

A map gives location-based work some useful context. You can find a business, open its details and see previous conversations without keeping a separate set of notes. That can suit local service work, site visits or managing business relationships.

The demonstration is adapted from a working application we built. It has a single administrator and records activity and follow-up dates. It does not send emails, discover businesses automatically, plan routes or run a calendar reminder service.

For a customer project, we’d work through which details matter and build the fields and statuses around those needs. The examples here use a simple New, In progress and Complete workflow; they’re an illustration of a possible build, rather than a settings menu in a ready-made product.

Adding a business and recording a conversation.

Add a business, place its pin and save a name. Other details can follow. The sidebar and map share the same filtered records, so searching for a business or contact, choosing a status, or showing due follow-ups changes both views together.

An adapted CRM demonstration with six fictional businesses and coloured pins on a real map around the Louvre and Palais-Royal in Paris
An example CRM with demo records on a map of central Paris. Select the image for full size. Map © OpenStreetMap contributors.

Keep business locations, contacts and conversation notes together, so you can see what’s happened and what needs attention. Open a record to find the people involved, previous discussions and the next action. We can tailor the fields and statuses to suit how your business works.

An adapted CRM demonstration showing the fictional Paperbark Workshop contact, conversation history and next action beside a real Paris map
A contact record showing conversation history and the next action. Map © OpenStreetMap contributors.

Follow-ups use Brisbane dates, with due and overdue filters. On smaller screens, the list and map switch between views. Archiving keeps the record and its history available to restore later.

How the list and map stay in sync.

1. Sidebar filters →2. Authenticated PHP API →3. SQLite records →4. Shared list & map results

A Vue application owns the filters, selected business and edit forms. Leaflet displays the map and markers. PHP handles authentication, validation and database transactions; SQLite stores the business records. Both map and list render the items returned by the same query. Panning the map does not silently change the prospect list.

Illustrative data relationships
RecordWhat it holds
prospectsBusiness name, coordinates, address, category, contact details, notes, status, follow-up date/action, archive state and revision.
contactsMany people per business, with name, role, phone, email and notes. At most one primary contact per business.
activityVisits, calls, emails, notes and status changes. Includes UTC timestamps and snapshots of the contact’s name and role at the time.

A separate table throttles failed logins. The CRM has its own configuration, database and authentication cookie; it does not use the analytics database or put a recorder on private CRM screens.

Preserve history and unfinished work.

Every change supplies the business’s current revision. The server checks it inside a transaction, applies the change and increments the revision. If another tab saved first, the API returns a conflict instead of overwriting that newer work.

Failed saves and expired logins keep the draft in memory. Reloading the latest version asks before discarding it. Drafts do not survive closing or reloading the tab, so leaving with unsaved work produces a warning. After a network timeout, the user may need to check whether the save completed before retrying.

Activity stores the name and role as they were when the conversation happened. Editing or removing a contact does not rewrite that history. Correcting an old note changes its wording without applying an earlier status change again.

Keep the map useful and the records private.

The working application uses Leaflet with OpenStreetMap tiles and visible attribution. Tile requests send the viewed map area and viewer IP to the provider, but not business names, contacts or conversation notes. These screenshots use real map tiles around the Louvre and Palais-Royal in Paris. Viewing this article loads the saved images, not a live map.

Location access happens only when the user selects My location. Denying it leaves manual navigation available. If tiles fail, the list, saved records and editing still work; an internet connection to the CRM server is required to save.

The application requires administrator login, uses HttpOnly session cookies scoped to the CRM, and checks origin and CSRF tokens on writes. Configuration, credentials and SQLite files live outside the public document root. Search filters and the map view can persist in session storage; contacts and drafts do not go there.

This is designed for a modest local prospect list, with all matching lightweight records returned together. A larger or multi-user CRM would need an explicit access model and a different loading strategy. Those are extensions to plan, rather than features to assume are already present.

Build something similar.

This illustrative rebuild uses Node 22.12+, Vite, Vue 3 and Leaflet 1.9.4. Production needs PHP 8.3+ with PDO SQLite and sessions, plus HTTPS. Compile the browser assets once; no Node server is needed to handle CRM requests. The examples explain the approach, rather than providing a specification of our internal application.

Separate the public shell, compiled assets and API entrypoint from the private runtime, configuration, database, sessions and backups. Build the basic business/contact/history workflow before adding more CRM features.

Keep list and map results together

This illustrative frontend fragment assumes an authenticated session, a Leaflet map, a marker layer and a Vue items ref. Create those once; give the map container an explicit height and load Leaflet’s CSS.

import L from 'leaflet';
import 'leaflet/dist/leaflet.css';

async function refreshProspects(filters) {
  const query = new URLSearchParams({
    action: 'prospects', ...filters
  });
  const response = await fetch(`/crm/api.php?${query}`, {
    credentials: 'same-origin', cache: 'no-store'
  });
  if (!response.ok) throw new Error('Could not load prospects.');
  const result = await response.json();

  items.value = result.items; // The sidebar uses this same array.
  markers.clearLayers();
  for (const prospect of items.value) {
    const label = document.createElement('span');
    label.textContent = prospect.name; // Never interpolate HTML.
    L.marker([prospect.latitude, prospect.longitude])
      .bindTooltip(label)
      .on('click', () => selectProspect(prospect.id))
      .addTo(markers);
  }
}

A complete implementation also guards against out-of-order search responses, preserves the selected record, and shows an error state without losing drafts. Pin placement should occur only while adding or editing a business.

Save the conversation and its outcome together

The following illustrative request records a conversation and its next action through POST /crm/api.php?action=activity. Replace the example IDs, revision and dates with values from the selected record. Send JSON with the current session’s X-CRM-CSRF token.

{
  "prospect_id": "<selected-prospect-id>",
  "revision": 3,
  "contact_id": "<selected-contact-id>",
  "kind": "visit",
  "occurred_at": "2026-11-07T09:30:00+10:00",
  "notes": "Discussed the project requirements. Send an updated outline.",
  "changes": {
    "followup_date": "2026-11-10",
    "followup_action": "Send the updated project outline."
  }
}

The transaction checks the revision, snapshots the selected contact, inserts the activity, applies the outcome, records any stage change and increments the revision. Return the updated detail on success. On 409, keep the draft and offer an explicit reload; on 401, retain it while asking the user to sign in again.

Representative API operations
Action on api.phpResponsibility
GET auth
POST login / logout
Session and CSRF handling; throttle failed logins.
GET settings / prospects / detailAuthenticated map settings, filtered records and one business with contacts/history.
POST save / archiveCreate/update a business or archive/restore it. Existing records require their current revision.
POST contact / remove_contactMaintain people and the primary contact while preserving historical snapshots.
POST activityLog a conversation and optional outcome atomically, or correct an existing note.

Read the building blocks

A brief you can give your LLM.

Use this page as a starting point and adapt the fields and statuses to your business. This is an illustrative build brief, not a specification of EasierIT’s internal process. The complete application source is not distributed here.

Build a private, single-administrator CRM for business locations, contacts and follow-ups. This is an illustrative customer project, not a replica of EasierIT's internal workflow.
Reference: https://easierit.com.au/prospect-crm.html

Use Vue 3 and Vite for the UI, Leaflet 1.9.4 for mapping, PHP 8.3+ with PDO SQLite and sessions for the API. Node 22.12+ is for builds only.
Sources: https://github.com/Leaflet/Leaflet
https://leafletjs.com/reference-1.9.4.html
https://vuejs.org/guide/introduction.html
https://www.php.net/manual/en/ref.pdo-sqlite.php
Map policy: https://operations.osmfoundation.org/policies/tiles/

Build in stages:
1. Separate public shell/assets/API from private runtime, configuration, database, sessions and backups. Implement a password-hashed administrator login, throttling, 12-hour authentication expiry, HttpOnly/SameSite cookies scoped to the CRM, and origin/CSRF checks for JSON POST writes. Do not install analytics or advertising trackers on private screens.
2. Model business records (name, coordinates, address/category/contact details, notes, status, follow-up date/action, archived flag, revision and timestamps); contacts (many per business, at most one primary); activity (type/time/notes, contact ID and historical name/role snapshot, status transitions). Use foreign keys and transactional migrations.
3. Provide authenticated settings, prospects and detail reads; save, archive/restore, contact, remove_contact and activity writes. Detail returns prospect, contacts and activity. Every existing-record mutation checks and increments the parent prospect revision atomically. Return 409 for stale revisions without overwriting newer data.
4. Build a filterable sidebar and Leaflet map from the SAME result array. Search businesses and people. Filter status, follow-up due/today/overdue/upcoming and archive state. Map panning must not change the list. Place/move pins only while editing; validate finite coordinate ranges. Render user text as text, never HTML.
5. Use New, In progress and Complete as demonstration statuses. Agree the actual fields and statuses with the customer before implementing their version. Status changes record progress; they do not trigger external actions.
6. Support multiple contacts and visit/call/email/note history. A new conversation can atomically change status and follow-up. Snapshot who was spoken to; preserve history after contact edits/removal. Correcting a past note changes only its text. Archive/restore retains history; do not add permanent deletion by default.
7. Store activity timestamps in UTC and display/enter them in Australia/Brisbane. Treat follow-ups as Brisbane calendar dates. Preserve in-memory drafts on failed saves, 409 conflicts and login expiry; require confirmation before discarding. Warn on leaving with unsaved edits. Store only filters/map view in session storage. Explain drafts do not survive reload and a timed-out save may have succeeded.
8. Use attributed OpenStreetMap tiles with normal browser caching. Request location only on an explicit action. Tile failures or denied location must leave records and forms usable. Keep desktop list/map together and offer mobile view switching. This first version is for a modest prospect list; no email sending, calendar reminders, discovery, route planning, multi-user roles or offline saves.

Acceptance: use fresh fictional databases and locally mocked map tiles. Verify login/CSRF, matching filtered list and pins, keyboard marker selection, contacts/primary-contact rules, conversation outcomes, historical snapshots, stale revisions, failed-save draft preservation, archive/restore, Brisbane date boundaries, mobile overflow and tile/location failure states. Document local setup, HTTPS deployment, migrations and safe backups. Never import real customer records into tests or screenshots.