The cloud portion of Nidus
Find a file
2025-11-05 23:41:21 +00:00
dberrors Add user sessions and login 2025-11-05 17:15:33 +00:00
dbinfo Retroactively fix some SQL schema problems 2025-11-05 17:36:32 +00:00
enums Retroactively fix some SQL schema problems 2025-11-05 17:36:32 +00:00
factory Retroactively fix some SQL schema problems 2025-11-05 17:36:32 +00:00
migrations Retroactively fix some SQL schema problems 2025-11-05 17:36:32 +00:00
models Retroactively fix some SQL schema problems 2025-11-05 17:36:32 +00:00
sql Retroactively fix some SQL schema problems 2025-11-05 17:36:32 +00:00
static Add a basic main page with login 2025-11-03 22:13:19 +00:00
templates Add update location page. 2025-11-05 23:41:21 +00:00
.air.toml Air: Don't rebuild for html, don't restart on error 2025-11-05 17:34:51 +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
auth.go Retroactively fix some SQL schema problems 2025-11-05 17:36:32 +00:00
bobgen.yaml Add generated Bob database integration 2025-11-04 23:11:32 +00:00
database.go Add user sessions and login 2025-11-05 17:15:33 +00:00
default.nix Add a basic 'hello-world' buildable with Nix 2025-11-03 12:22:06 +00:00
endpoint.go Add update location page. 2025-11-05 23:41:21 +00:00
fileserver.go Add a basic main page with login 2025-11-03 22:13:19 +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 Add support for generating the QR code in the page. 2025-11-05 21:21:58 +00:00
go.sum Add support for generating the QR code in the page. 2025-11-05 21:21:58 +00:00
html.go Add update location page. 2025-11-05 23:41:21 +00:00
LICENSE Initial commit 2025-11-03 05:12:02 -07:00
main.go Add update location page. 2025-11-05 23:41:21 +00:00
README.md Update readme with air instructions 2025-11-05 17:17:03 +00:00
response.go Add a basic main page with login 2025-11-03 22:13:19 +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.