The cloud portion of Nidus
Find a file
Eli Ribble 14887722a0
Add debug endpoints for SMS POST webhook
This gets me data in the log, which actually has content.
2025-12-12 22:17:40 +00:00
arcgis-go@af786fabcc Initially made it through full update with new fieldseeker schema 2025-12-05 23:11:57 +00:00
cmd/query-test Fix query test to not reference defunct enums 2025-12-11 01:33:24 +00:00
db Initially made it through full update with new fieldseeker schema 2025-12-05 23:11:57 +00:00
go-geojson2h3@c2ff1a96ab Add mocks for data entry 2025-12-10 17:06:27 +00:00
static Add a basic main page with login 2025-11-03 22:13:19 +00:00
templates Add mocks for the various setting pages. 2025-12-12 21:52:55 +00: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 Initially made it through full update with new fieldseeker schema 2025-12-05 23:11:57 +00:00
auth.go Migrate auth to zerolog 2025-11-24 19:49:19 +00:00
content_negotiation.go Create settings page placeholder, add auth pattern 2025-11-13 16:48:23 +00:00
default.nix Correct vendorhash again. 2025-12-11 14:11:55 +00:00
endpoint.go Add debug endpoints for SMS POST webhook 2025-12-12 22:17:40 +00:00
errors.go Remove redundant API error type, use arcgis 2025-11-14 23:08:26 +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 Add a basic 'hello-world' buildable with Nix 2025-11-03 12:22:06 +00:00
flake.nix Add user sessions and login 2025-11-05 17:15:33 +00:00
go.mod Bump to bob v0.42.0 2025-12-11 01:31:10 +00:00
go.sum Bump to bob v0.42.0 2025-12-11 01:31:10 +00:00
h3.go Use new v2 release of go-geojson2h3 2025-11-21 17:44:29 +00:00
html.go Add mocks for the various setting pages. 2025-12-12 21:52:55 +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 Add debug endpoints for SMS POST webhook 2025-12-12 22:17:40 +00:00
model_conversion.go Move database logic into separate subdirectory 2025-11-24 18:08:31 +00:00
notification.go Convert notification.go to use zerolog 2025-12-02 00:30:46 +00:00
query.go Add missing query source file 2025-11-24 18:09:28 +00:00
README.md Save information about the organization and user from ArcGIS 2025-11-07 02:07:33 +00:00
response.go Format all source files. 2025-11-06 22:31:51 +00:00
strings.go Add cell debug page. 2025-11-19 15:21:06 +00:00
time.go Calculate treatment cadence by year 2025-11-21 17:26:49 +00: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

> 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