Implement geo backend, TS client, frontend, and CI tests.

Add a Go HTTP API with Ed25519 auth and invitation onboarding, user-scoped GeoJSON Point management, a Bun-tested @noble/ed25519 TypeScript client, static Vue/Vuetify frontend integration, and a Gitea CI workflow running both Go and Bun test suites.

Made-with: Cursor
This commit is contained in:
2026-03-01 11:41:21 +00:00
parent 5c73295ce5
commit 6e2becb06a
164 changed files with 446560 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
import { getPublicKeyAsync, signAsync } from "@noble/ed25519";
import { base64UrlToBytes, bytesToBase64Url, textToBytes } from "./encoding";
import type { StoredKeys } from "./types";
function randomPrivateKey(): Uint8Array {
const out = new Uint8Array(32);
crypto.getRandomValues(out);
return out;
}
export async function generateKeyPair(): Promise<StoredKeys> {
const privateKey = randomPrivateKey();
const publicKey = await getPublicKeyAsync(privateKey);
return {
publicKey: bytesToBase64Url(publicKey),
privateKey: bytesToBase64Url(privateKey),
};
}
export async function signMessage(privateKeyBase64: string, message: string): Promise<string> {
const privateKey = base64UrlToBytes(privateKeyBase64);
const signature = await signAsync(textToBytes(message), privateKey);
return bytesToBase64Url(signature);
}