No description
  • Go 47.9%
  • Vue 43.4%
  • JavaScript 4.5%
  • Makefile 2.8%
  • HTML 1.1%
  • Other 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Mert Gör cdc510c10b
docs: add SiteEye screenshots to project documentation
Signed-off-by: Mert Gör <mert.gor@dynacore.tr>
2026-09-07 20:40:31 +03:00
backend Add Go+Vue analytics dashboard shipped as a single embedded binary 2026-09-07 19:49:16 +03:00
frontend Add Go+Vue analytics dashboard shipped as a single embedded binary 2026-09-07 19:49:16 +03:00
img docs: add SiteEye screenshots to project documentation 2026-09-07 20:40:31 +03:00
.gitignore Add Go+Vue analytics dashboard shipped as a single embedded binary 2026-09-07 19:49:16 +03:00
CHANGELOG.md docs: add SiteEye screenshots to project documentation 2026-09-07 20:40:31 +03:00
LICENSE ilk 2026-09-06 18:32:47 +03:00
Makefile Add Go+Vue analytics dashboard shipped as a single embedded binary 2026-09-07 19:49:16 +03:00
README.md docs: add SiteEye screenshots to project documentation 2026-09-07 20:40:31 +03:00

SiteEye

SiteEye is a customer analytics dashboard, built and shipped the no-nonsense way: a Go backend, a Vue 3 + Bootstrap frontend, and the whole thing packed into one single, self-contained Go binary (the built frontend rides along inside the binary itself, courtesy of go:embed). No separate web server, no static file directory to babysit — build it once, copy it anywhere, run it.

Features

  • Customer geographic distribution map — OpenStreetMap/Leaflet by default, with Google Maps as an optional toggle (enabled automatically once a GOOGLE_MAPS_API_KEY is configured on the server).
  • Quantitative dashboard: total/active/inactive customers, revenue totals & averages, countries/cities covered, top countries by customer count, and customer growth over time.
  • Searchable, paginated customer table.
  • SQLite storage (pure Go driver, no CGO), auto-seeded with 500 mock customers across ~30 world cities on first run.

Stack

  • Backend: Go (stdlib net/http), modernc.org/sqlite (pure-Go, no CGO — one less thing to compile against).
  • Frontend: Vue 3, Vue Router, Bootstrap 5, Leaflet, Chart.js / vue-chartjs, built with Vite.
  • Packaging: the Vite build output gets embedded into the Go binary at build time. One binary in, one binary out — nothing else to deploy.

Prerequisites

  • Go 1.22+
  • Node.js 18+ and npm

Build & run (single binary)

This is the whole point — one command, one binary, done.

make build   # builds the Vue frontend, embeds it, and builds the Go binary
make run     # builds (if needed) and runs ./bin/analytics-dashboard

Or manually:

cd frontend && npm install && npm run build
rm -rf ../backend/internal/webui/dist && cp -r dist ../backend/internal/webui/dist
cd ../backend && go build -o ../bin/analytics-dashboard ./cmd/server
../bin/analytics-dashboard

The server listens on :8080 by default and serves both the API and the UI — no reverse proxy required. Open http://localhost:8080 and you're in business.

Configuration (environment variables)

Variable Default Description
ADDR :8080 Address/port the server listens on
DB_PATH analytics.db Path to the SQLite database file (created/seeded automatically)
GOOGLE_MAPS_API_KEY (unset) Enables the Google Maps toggle on the map view when set

Example:

GOOGLE_MAPS_API_KEY=your-key ADDR=:9000 DB_PATH=/var/lib/siteeye/analytics.db ./bin/analytics-dashboard

Note: a Google Maps JavaScript API key is meant to be used client-side and restricted by HTTP referrer in the Google Cloud Console — it is not treated as a backend secret, so it's safe for the server to hand it to the browser via /api/config.

Local development (hot reload)

Want to move fast while you're building features? Run the backend and frontend separately, with Vite proxying /api calls straight through to the Go server:

# terminal 1
cd backend && go run ./cmd/server

# terminal 2
cd frontend && npm install && npm run dev

Then open the Vite dev server URL (typically http://localhost:5173).

API

Everything lives under /api. Straightforward, RESTful, JSON in and out:

  • GET /api/health — health check
  • GET /api/config — frontend config (map provider availability)
  • GET /api/customers — full customer list
  • GET /api/customers/geo — lightweight geo points for map markers
  • GET /api/stats/summary — top-level KPIs
  • GET /api/stats/by-country — customer count/revenue per country
  • GET /api/stats/timeseries — monthly new-customer counts and running totals

Screenshots

Here is SiteEye in action: the dashboard, map, and customer views, all in one place.

SiteEye dashboard

SiteEye map view

SiteEye customers view

Project layout

Here's where everything lives, no digging required:

backend/
  cmd/server/          # main entrypoint
  internal/api/         # HTTP handlers
  internal/db/            # SQLite access layer + schema
  internal/mock/           # sample data generator
  internal/models/          # shared data structures
  internal/webui/             # embeds the built frontend (frontend/dist copied here)
frontend/
  src/views/                   # Dashboard, MapView, Customers pages
  src/components/                # SummaryCard, LeafletMap, GoogleMap
  src/api/client.js                 # fetch wrapper for the backend API
Makefile                             # build-frontend / build-backend / build / run / dev

License

MIT License

Copyright (c) 2026-2027 SiteEye Authors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.