Initial pocketkv: dashboard, read-only API, OpenAPI spec
A self-hosted key-value store for serving JSON values to static sites. - Dashboard behind HTTP Basic Auth (credentials from .env) to manage stores, edit JSON values in an Ace editor, and create read-only API keys - Read-only API authenticated with bearer tokens, CORS enabled - OpenAPI 3.1 spec served at /openapi.yaml - Go standard library only; data persisted to a single JSON file Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
commit
cb29d58aa2
16 files changed
+1318
No files matched your search
@@ -0,0 +1,23 @@
|
||||
{{define "content"}}
|
||||
<h1>Stores</h1>
|
||||
{{if .Error}}<p class="error">{{.Error}}</p>{{end}}
|
||||
<form method="post" action="/stores" class="row">
|
||||
<input type="text" name="name" placeholder="new-store-name" required autocomplete="off">
|
||||
<button class="primary" type="submit">Create store</button>
|
||||
</form>
|
||||
{{if .Stores}}
|
||||
<table>
|
||||
<tr><th>Name</th><th>Values</th><th>API keys</th><th>Created</th></tr>
|
||||
{{range .Stores}}
|
||||
<tr>
|
||||
<td><a href="/stores/{{.Name}}">{{.Name}}</a></td>
|
||||
<td>{{.Values}}</td>
|
||||
<td>{{.APIKeys}}</td>
|
||||
<td class="muted">{{.CreatedAt.Format "2006-01-02"}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
{{else}}
|
||||
<p class="muted">No stores yet.</p>
|
||||
{{end}}
|
||||
{{end}}
|
||||
Reference in new issue
Block a user