Thanks for your interest in contributing! Here's what you need to know.
git clone https://github.com/faucetdb/faucet.git
cd faucet
cd ui && npm install && cd ..
make build
make testRequirements: Go 1.25+, Node.js 18+ (for UI), golangci-lint
- Fork the repo and create a branch from
main - Make your changes
- Run
make testandmake lintbefore committing - Open a PR targeting the
mainbranch
| Command | What it does |
|---|---|
make dev |
Run the server with hot reload |
make dev-ui |
Run the UI dev server (Vite) |
make test |
Run all tests with race detection |
make test-v |
Verbose test output |
make test-cover |
Generate coverage report |
make lint |
Run golangci-lint |
make bench |
Run benchmarks |
make build |
Build UI + Go binary |
cmd/faucet/ → CLI entrypoint (Cobra)
internal/
server/ → HTTP server and routes (Chi router)
handler/ → REST API handlers
connector/ → Database drivers (PostgreSQL, MySQL/MariaDB, SQL Server, Oracle, Snowflake, SQLite)
config/ → SQLite config store
rbac/ → Role-based access control
mcp/ → MCP server implementation
openapi/ → OpenAPI 3.1 generation
ui/ → Embedded admin UI assets
ui/ → Preact + Vite + Tailwind source
- Bug fixes — Always welcome. Include a test if possible.
- New database connectors — Implement the
connector.Connectorinterface. - Documentation — Improvements to this README and to the docs are appreciated (open an issue for docs changes).
- Performance improvements — Include benchmark results (
make bench).
- Follow existing patterns in the codebase
golangci-lintmust pass (make lint)- Tests use the standard
testingpackage — no test frameworks - Keep PRs focused. One feature or fix per PR.
Security issues: please follow SECURITY.md instead of opening a public issue.
Open an issue with:
- Faucet version (
faucet version) - Database type and version
- Steps to reproduce
- Expected vs. actual behavior
Maintainers cut a release by pushing a tag: git tag v0.1.14 && git push origin v0.1.14.
.github/workflows/release.yml(GoReleaser) builds the archives and publishes the GitHub release, Docker images and the Homebrew formula..github/workflows/npm-publish.ymlruns automatically once "Release" succeeds (workflow_run) and publishes@faucetdb/faucetplus the six platform packages from the release archives viascripts/npm-publish.sh. It can also be started by hand from the Actions tab ("Publish npm" -> Run workflow -> tag) to retry a partial publish; versions already on npm are skipped.
npm authentication, in order of preference:
- Trusted publishing (OIDC), no secret. On npmjs.com, for each of the 7 packages (
@faucetdb/faucet,linux-x64,linux-arm64,darwin-x64,darwin-arm64,win32-x64,win32-arm64): Settings -> Trusted Publisher -> GitHub Actions with ownerfaucetdb, repositoryfaucet, workflow filenpm-publish.yml, environment left blank. Test it with "Run workflow" and theuse_oidccheckbox (ignores the secret for that run), then delete theNPM_TOKENrepository secret. While the secret exists the script uses it and never tries OIDC. NPM_TOKENsecret. A granular access token for the@faucetdbscope with read/write and 2FA bypass. npm limits these to 90 days; an expired token shows up as404 Not Found - PUT https://registry.npmjs.org/@faucetdb%2f.... The script now checks the token withnpm whoamibefore touching any package and prints how to fix it.
Only final release tags (vX.Y.Z) are published to npm; prerelease tags are rejected by the workflow.
To exercise the pipeline locally without publishing: DRY_RUN=1 ./scripts/npm-publish.sh v0.1.13 (needs gh and npm).
By contributing, you agree that your contributions will be licensed under the MIT License.