{"id":19301873,"url":"https://github.com/darkness4/auth-web3-htmx","last_synced_at":"2025-08-11T18:31:03.496Z","repository":{"id":208889170,"uuid":"722725925","full_name":"Darkness4/auth-web3-htmx","owner":"Darkness4","description":"Experiment with Go + HTMX and Ethereum authentication","archived":false,"fork":false,"pushed_at":"2023-11-29T01:57:06.000Z","size":78,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-01T07:22:42.520Z","etag":null,"topics":["ethereum","go","htmx","sql","web3"],"latest_commit_sha":null,"homepage":"https://auth-web3-htmx.mnguyen.fr","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Darkness4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-23T19:52:36.000Z","updated_at":"2024-08-05T21:17:38.000Z","dependencies_parsed_at":"2023-11-29T00:30:00.132Z","dependency_job_id":"9c0af9f1-1a3d-4300-ac5a-b14e7e9fa3d7","html_url":"https://github.com/Darkness4/auth-web3-htmx","commit_stats":null,"previous_names":["darkness4/auth-web3-htmx"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Darkness4%2Fauth-web3-htmx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Darkness4%2Fauth-web3-htmx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Darkness4%2Fauth-web3-htmx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Darkness4%2Fauth-web3-htmx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Darkness4","download_url":"https://codeload.github.com/Darkness4/auth-web3-htmx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229574323,"owners_count":18094720,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ethereum","go","htmx","sql","web3"],"created_at":"2024-11-09T23:19:10.372Z","updated_at":"2024-12-13T17:26:40.228Z","avatar_url":"https://github.com/Darkness4.png","language":"Go","readme":"# Go + HTMX + Web3\n\nA very simple example HTMX with Web3 with:\n\n- Go HTML templating engine.\n- HTMX solution for SSR.\n- Ethereum as authenticator.\n- (+CSRF protection measures for all requests).\n- SQLite3 with sqlc and golang-migrate.\n\n## Motivation\n\nFor the hype.\n\n## Usage\n\n1. Set the necessary parameters or environment variables:\n\n   ```shell\n   ## .env.local\n   ## A 32 bytes hex secret (openssl rand -hex 32)\n   CSRF_SECRET=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n   ## A hex ECDSA private key in ethereum format (openssl rand -hex 32)\n   PRIVATE_KEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n   ## A unique string secret\n   JWT_SECRET=secret\n   ## PUBLIC_URL will be used as redirect url which is ${PUBLIC_URL}/callback\n   PUBLIC_URL=http://localhost:3000\n   DB_PATH=/data/db.sqlite3\n   ```\n\n2. Run the binary:\n\n   ```shell\n   ./auth-web3-htmx\n   ```\n\n**Help**:\n\n```\nNAME:\n   auth-web3-htmx - Demo of Auth and HTMX.\n\nUSAGE:\n   auth-web3-htmx [global options] command [command options] [arguments...]\n\nCOMMANDS:\n   help, h  Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --csrf.secret value  A 32 bytes hex secret [$CSRF_SECRET]\n   --jwt.secret value   A unique string secret [$JWT_SECRET]\n   --private-key value  A ecdsa private key in Hex. [$PRIVATE_KEY]\n   --db.path value      SQLite3 database file path. (default: \"./db.sqlite3\") [$DB_PATH]\n   --help, -h           show help\n   --version, -v        print the version\n```\n\n## Application Flow\n\n- A home page:\n  - Show login button if not logged in.\n  - Else, show a welcome with routing.\n- A protected counter page.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkness4%2Fauth-web3-htmx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarkness4%2Fauth-web3-htmx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkness4%2Fauth-web3-htmx/lists"}