Jam-build propsdb-api service image: https://github.com/localnerve/jam-build-propsdb
1.9K
A high-performance data service built with Go and Fiber, serving as a drop-in replacement for the Node.js Express data service in the Jam Buildโ project. Supports all GORM-compatible databases including MariaDB/MySQL, PostgreSQL, SQLite, and SQL Server.
DB_TYPE configuration. Configuration detailsโ authorizer-go SDKE_VERSION conflict detectionhttps://hub.docker.com/r/localnerve/jam-build-propsdbโ
localnerve/jam-build-propsdb:latestEnvironment:
git clone https://github.com/localnerve/jam-build-propsdb.git
cd jam-build-propsdb
make deps
make install-tools
make docker-compose-up
The service will start on http://localhost:3000.
These are the ports used by default:
DB_TYPE, defaults to mariadb):
Configure the database type using the DB_TYPE environment variable (defaults to mariadb). For a detailed matrix of configuration requirements (ports, images, healthchecks), see the database documentationโ .
DB_TYPE=mysql or DB_TYPE=mariadbDB_TYPE=postgres or DB_TYPE=postgresqlDB_TYPE=sqlite (set DB_APP_DATABASE to file path)DB_TYPE=sqlserver or DB_TYPE=mssqlSQL migration files will be applied for each database type in the data/initdb/ directory:
data/initdb/mariadb/ - MariaDB initializationdata/initdb/mysql/ - MySQL initializationdata/initdb/postgres/ - PostgreSQL initializationdata/initdb/sqlite/ - SQLite initializationdata/initdb/sqlserver/ - SQL Server initializationSQL migration files will be applied for each database type in the data/migrations/ directory:
data/migrations/mariadb/ - MariaDB migrationsdata/migrations/mysql/ - MySQL migrationsdata/migrations/postgres/ - PostgreSQL migrationsdata/migrations/sqlite/ - SQLite migrationsdata/migrations/sqlserver/ - SQL Server migrationsThe service also supports GORM AutoMigrate as a fallback.
Swagger documentation is available at http://localhost:3000/swagger/ and updated with make swagger.
GET /api/data/app/:document/:collection - Get properties for a document/collectionGET /api/data/app/:document?collections=col1,col2 - Get collections and propertiesGET /api/data/app - Get all documents, collections, and propertiesPOST /api/data/app/:document - Upsert document (requires admin role)DELETE /api/data/app/:document/:collection - Delete collection (requires admin role)DELETE /api/data/app/:document - Delete document or properties (requires admin role)GET /api/data/user/:document/:collection - Get user propertiesGET /api/data/user/:document?collections=col1,col2 - Get user collectionsGET /api/data/user - Get all user documentsPOST /api/data/user/:document - Upsert user documentDELETE /api/data/user/:document/:collection - Delete user collectionDELETE /api/data/user/:document - Delete user document or propertiesThe service supports API versioning via the X-Api-Version header:
curl -H "X-Api-Version: 1.0.0" http://localhost:3000/api/data/app
Supported versions:
1.0.0 (default)1.0 (alias for 1.0.0)This will start the API service, database, cache, and authorizer.
make docker-compose-up
This will start the observability services for the API service.
make obs-up
For information on Prometheus metrics and Grafana dashboards, see OBSERVABILITYโ .
Full information on running tests is available in the testing documentationโ .
# Unit tests
make test
# Integration tests (requires Docker)
make test-integration
# End-to-end service health tests (requires Docker)
make test-e2e
# Full stack end-to-end tests (requires Docker)
make test-e2e-js # Params: DEBUG=1 (debug, no rebuild), DEBUG=2 (debug, full rebuild)
# Full stack end-to-end tests with coverage (requires Docker)
make test-e2e-js-cover # Params: REBUILD=1 (rebuild orchestrator), HOST_DEBUG=1 (debug host)
Many more tests are available in the Makefile, see the testing documentationโ for full details.
# Build the api service binary
make build
# Build the healthcheck binary
make build-healthcheck
# Build the testcontainers binary
make build-testcontainers
# Build the docker image
make docker-build
# Build and run the entire composition
make DB_TYPE=mariadb docker-compose-up # DB_TYPE = mariadb | mysql | mssql | postgres | sqlite
The service integrates with Authorizerโ for authentication and authorization.
admin roleuser rolecookie_sessionAll mutation operations (POST, DELETE) use optimistic locking:
version in request body409 Conflict with E_VERSION errorCopyright (c) 2026 Alex Grant [email protected]โ (https://www.localnerve.comโ ), LocalNerve LLC
This project is licensed under the GNU Affero General Public License v3.0 or later.
Special thanks to the Antigravity AI assistant for help with the Go migration, testing architecture, and documentation.
Content type
Image
Digest
sha256:fd0c384ffโฆ
Size
41.5 MB
Last updated
4 months ago
docker pull localnerve/jam-build-propsdb