The cloud portion of Nidus
Find a file
2026-01-07 14:24:56 +00:00
api Properly save audio and image notes when uploaded 2026-01-06 22:23:59 +00:00
arcgis-go@af786fabcc Initially made it through full update with new fieldseeker schema 2025-12-05 23:11:57 +00:00
auth Properly save audio and image notes when uploaded 2026-01-06 22:23:59 +00:00
cmd/query-test Fix query test to not reference defunct enums 2025-12-11 01:33:24 +00:00
db Get project building by fixing automatic tests 2026-01-07 01:49:59 +00:00
debug Begin work on debugging user behavior in early setup 2026-01-06 14:46:31 +00:00
go-geojson2h3@c2ff1a96ab Add mocks for data entry 2025-12-10 17:06:27 +00:00
label-studio WIP migration of API from fieldseeker-sync 2025-12-16 16:37:53 +00:00
minio WIP migration of API from fieldseeker-sync 2025-12-16 16:37:53 +00:00
platform Properly save audio and image notes when uploaded 2026-01-06 22:23:59 +00:00
queue Properly save audio and image notes when uploaded 2026-01-06 22:23:59 +00:00
static Add a basic main page with login 2025-11-03 22:13:19 +00:00
templates Add ongoing sync indicator to dashboard 2026-01-06 15:32:26 +00:00
userfile Move logic for dealing with image file uploads to userfile 2025-12-18 03:36:52 -07:00
.air.toml Shorten the time waiting for air to kill my webserver 2025-11-07 08:46:26 +00:00
.gitattributes Add a basic main page with login 2025-11-03 22:13:19 +00:00
.gitignore Ignore air's temp building directory 2025-11-05 17:17:21 +00:00
.gitmodules Move database logic into separate subdirectory 2025-11-24 18:08:31 +00:00
arcgis.go Fix a few error messages 2026-01-07 01:49:49 +00:00
default.nix Bump to v0.0.6 2026-01-07 01:53:30 +00:00
endpoint.go Show error when credentials are invalid 2026-01-07 03:42:18 +00:00
fieldseeker.go Add trap count data to source page 2025-11-20 20:59:28 +00:00
fileserver.go Format all source files. 2025-11-06 22:31:51 +00:00
flake.lock Move to nixos pkg 25.11 base 2026-01-06 14:27:19 +00:00
flake.nix Move to nixos pkg 25.11 base 2026-01-06 14:27:19 +00:00
go.mod Add precalc h3 cells to fieldseeker tables 2026-01-05 23:25:16 +00:00
go.sum Add precalc h3 cells to fieldseeker tables 2026-01-05 23:25:16 +00:00
h3.go Add precalc h3 cells to fieldseeker tables 2026-01-05 23:25:16 +00:00
html.go Make inspections failure for cells have unique error message 2026-01-07 14:24:56 +00:00
lefthook.yml Add lefthook configuration for formatting 2025-11-06 22:31:29 +00:00
LICENSE Initial commit 2025-11-03 05:12:02 -07:00
main.go Properly save audio and image notes when uploaded 2026-01-06 22:23:59 +00:00
model_conversion.go Add precalc h3 cells to fieldseeker tables 2026-01-05 23:25:16 +00:00
notification.go Begin work on debugging user behavior in early setup 2026-01-06 14:46:31 +00:00
query.go Add missing query source file 2025-11-24 18:09:28 +00:00
README.md Document the required env vars 2025-12-18 03:36:32 -07:00
response.go Format all source files. 2025-11-06 22:31:51 +00:00
sms.go Fix a few error messages 2026-01-07 01:49:49 +00:00
start-air.sh Read secrets when running air 2026-01-06 14:46:54 +00:00
strings.go Add cell debug page. 2025-11-19 15:21:06 +00:00
time.go Remove old FieldSeeker tables, use v2 generated tables. 2025-12-24 17:58:08 -07:00

Nidus Sync

This is the software that powers Nidus Cloud Sync.

Building from source

First, you'll need Nix.

Then:

nix develop
go build .

Running

You'll need a number of environment variables for configuring things;

  • ARCGIS_CLIENT_ID - The client ID for ArcGIS oauth, configured with esri.
  • ARCGIS_CLIENT_SECRET - The client secret for ArcGIS oauth, configured with esri.
  • BASE_URL - The URL the site is hosted at, used for forming callback URLs. Should be complete like 'https://foo.bar'
  • BIND - The address and port to bind to. Use ':9001' for 'any address, port 9001'
  • ENVIRONMENT - either 'PRODUCTION' or 'DEVELOPMENT'. It's used to set things like oauth token length.
  • MAPBOX_TOKEN - The token to use with mapbox which is important for rendering maps.
  • POSTGRES_DSN - The DSN for connecting to the postgres database.
  • FIELDSEEKER_SCHEMA_DIRECTORY - The directory to write fieldseeker schema files for debugging.
  • USER_FILES_DIRECTORY - The directory for writing uploaded user data files (audio, images).
> BASE_URL=https://sync.nidus.cloud ARCGIS_CLIENT_ID=foo ARCGIS_CLIENT_SECRET=bar POSTGRES_DSN='postgresql://?host=/var/run/postgresql&dbname=nidus-sync' ./nidus-sync

Hacking

air

This project uses air for fast compile-and-test loops. You can run it with:

> BASE_URL=https://sync.nidus.cloud ARCGIS_CLIENT_ID=foo ARCGIS_CLIENT_SECRET=bar POSTGRES_DSN='postgresql://?host=/var/run/postgresql&dbname=nidus-sync' air

bob

This uses the bob query framework. You can regenerate the models for bob with:

PSQL_DSN="postgresql://dbname?host=/var/run/postgresql&sslmode=disable" go run github.com/stephenafamo/bob/gen/bobgen-psql@latest"
PSQL_DSN="postgresql://?host=/var/run/postgresql&sslmode=disable&dbname=nidus-sync" go run github.com/stephenafamo/bob/gen/bobgen-psql@latest

This will generate a bunch of files. They're already committed, you only need this if you change the database schema in some way.

goose

This uses goose. You can use the goose command line to check status and make changes

> cd migrations
> GOOSE_DRIVER=postgres GOOSE_DBSTRING="dbname=nidus-sync sslmode=disable" goose status
> GOOSE_DRIVER=postgres GOOSE_DBSTRING="dbname=nidus-sync sslmode=disable" goose down
> GOOSE_DRIVER=postgres GOOSE_DBSTRING="dbname=nidus-sync sslmode=disable" goose up