Commit graph

58 commits

Author SHA1 Message Date
f6069a024a ui
Some checks are pending
CI / test-control-plane (push) Waiting to run
CI / test-node-agent (push) Waiting to run
CI / build-web (push) Waiting to run
2026-04-01 21:18:08 -04:00
171a682f6a tests 2026-04-01 21:10:13 -04:00
1d564b738d Fix install script: strip v prefix from version for archive name 2026-04-01 21:06:40 -04:00
8002158a45 docs
Some checks are pending
CI / test-control-plane (push) Waiting to run
CI / test-node-agent (push) Waiting to run
CI / build-web (push) Waiting to run
2026-04-01 20:55:17 -04:00
d670cfee7b Fix goreleaser config: remove monorepo field, add dir for node-agent 2026-04-01 20:40:19 -04:00
cce3e435d5 Remove duplicate workflow files (.yml -> .yaml) 2026-04-01 20:38:44 -04:00
18b4ce1a40 Add install script, CI workflows, and release pipeline
- Install script: curl-pipe-sh installer that downloads the right
  binary for the user's OS/arch from GitHub Releases
- CI workflow: runs go vet + go test for both Go modules and builds
  the web app on push/PR
- Release workflow: goreleaser builds cross-platform binaries
  (linux/darwin, amd64/arm64) on version tags
- Node-agent defaults BETTERNAS_CONTROL_PLANE_URL to
  https://api.betternas.com so users only need username/password
2026-04-01 20:37:40 -04:00
Hari
1bbfb6647d
user-owned DAVs (#14) 2026-04-01 20:26:44 -04:00
Hari
ca5014750b
frontend deploy (#13) 2026-04-01 19:26:28 -04:00
c499e46a4d Add SQLite store and user auth for production deployment
Replace the in-memory JSON-backed store with a SQLite option using
modernc.org/sqlite (pure Go, no CGo). Add user authentication with
bcrypt password hashing and random session tokens.

SQLite store:
- Schema covers nodes, exports, tokens, ordinals, users, sessions
- WAL mode and foreign keys enabled
- Set BETTERNAS_CONTROL_PLANE_DB_PATH to activate (falls back to
  memory store when empty)

User auth:
- POST /api/v1/auth/register, login, logout, GET /me
- bcrypt (cost 10) for passwords, 32-byte hex session tokens
- Sessions stored in SQLite with configurable TTL
- Client endpoints accept session tokens or static client token
- CORS middleware via BETTERNAS_CORS_ORIGIN env var

New env vars: BETTERNAS_CONTROL_PLANE_DB_PATH, BETTERNAS_SESSION_TTL,
BETTERNAS_REGISTRATION_ENABLED, BETTERNAS_CORS_ORIGIN

24 tests pass including 7 SQLite store tests and 7 auth tests.
Builds clean with CGO_ENABLED=0.
2026-04-01 18:47:59 -04:00
1bb065ade0 Shorten mount credential username token to fix macOS WebDAV mount
macOS WebDAVFS truncates HTTP Basic Auth passwords at 255 bytes. The
mount credential password (base64 payload + HMAC signature) was 260
bytes because the full username token (32 random bytes / 43 base64url
chars) is embedded in the signed payload.

Reduce the username token from 32 bytes to 24 bytes (32 base64url
chars), bringing the total password to ~246 chars with margin for
longer node IDs and mount paths.
2026-04-01 17:24:47 -04:00
a6c74c2a39 Allow OPTIONS to bypass WebDAV auth for Finder discovery
macOS Finder sends an unauthenticated OPTIONS request before attempting
auth. It needs to see the DAV: 1, 2 compliance header in the response
to know the server supports WebDAV. Without it, Finder shows "problem
connecting to the server" and never prompts for credentials.

OPTIONS is a safe discovery method that exposes no data, so it can be
served without auth.
2026-04-01 16:57:55 -04:00
Hari
18b6ac625f
Fix macOS Finder WebDAV mount by handling GET on directories (#12)
Go's webdav.Handler returns 405 Method Not Allowed for GET on
collections (directories). macOS Finder sends GET to the WebDAV root
as part of its mount flow and refuses to connect when it gets 405.

Add a finderCompatible wrapper that intercepts GET/HEAD on directories
and returns a minimal 200 response, while passing all standard WebDAV
methods through to the underlying handler unchanged.
2026-04-01 16:42:34 -04:00
b74db855c8 Migrate apps/web to shadcn/ui with preset b2D1F1IZv
Replace custom CSS module UI with shadcn radix-luma components,
Tailwind v4, and Manrope font. Remove packages/ui.
2026-04-01 18:11:52 +00:00
73e4d026bb shadcn skill 2026-04-01 18:04:36 +00:00
Hari
8b4efa19fd
Merge pull request #11 from harivansh-afk/feat/backend-mount-contract
Make control-plane the real mount authority
2026-04-01 14:03:27 -04:00
87de69520c Make the web app consume the live mount contract
Add the first control-plane UI over the verified backend seam so exports,
issued DAV credentials, and Finder instructions can be exercised from the
running stack.
2026-04-01 17:56:05 +00:00
b5f8ea9c52 Make control-plane the real mount authority
Split node enrollment from export sync and issue Finder-compatible DAV
credentials so the stack proves the real backend seam before any web UI
consumes it.
2026-04-01 17:46:50 +00:00
5bc24fa99d update docs 2026-04-01 16:43:25 +00:00
c5be520772 update todos 2026-04-01 16:13:45 +00:00
74b2a91bba fix secrets 2026-04-01 15:58:28 +00:00
Hari
1fbbe5ea90
Merge pull request #10 from harivansh-afk/fix/control-plane-auth-hardening
Secure first-loop control-plane auth and explicit mount paths
2026-04-01 10:57:22 -04:00
8e0636f6a3 Keep stack verification idempotent under node auth.
Use a unique machine ID for each stack verification run so repeated checks
against a persisted control-plane state keep exercising the bootstrap flow
without failing on node-scoped re-registration auth.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-04-01 14:52:14 +00:00
ed40da7326 Secure first-loop control-plane auth and mount routing.
Protect the control-plane API with explicit bearer auth, add node-scoped
registration/heartbeat credentials, and make export mount paths an explicit
contract field so mount profiles stay correct across runtimes.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-04-01 14:13:14 +00:00
Hari
a7f85f4871
Merge pull request #8 from harivansh-afk/prep-runtime-loop
prepare runtime loop
2026-04-01 01:12:30 -04:00
f754a217f4 prepare runtime loop
Co-authored-by: Codex <noreply@openai.com>
2026-04-01 05:12:11 +00:00
Hari
e75b3f98a6
setup agent runtime requirements (#7) 2026-04-01 00:37:15 -04:00
5d97c33d7e introduce .env 2026-04-01 04:32:08 +00:00
4f46d2f3df edit readme 2026-04-01 04:29:52 +00:00
6b7e201066 edit 2026-04-01 04:04:04 +00:00
Hari
e2f03f47af
pnpm, verify, cleanup (#6) 2026-03-31 23:59:52 -04:00
Hari
b68151035a
init (#5) 2026-03-31 23:50:51 -04:00
4f174ec3a8 skeleton schemas 2026-04-01 03:11:43 +00:00
0032487ca1 clean 2026-04-01 03:02:53 +00:00
ca4315a92d brought together 2026-04-01 02:52:13 +00:00
c7560e1630 rename3 2026-04-01 02:40:21 +00:00
Hari
c3b5332477
Merge pull request #4 from harivansh-afk/doc-scaaffold
doc scaaffold
2026-03-31 22:38:13 -04:00
b8b87a10d2 doc scaaffold 2026-04-01 02:37:54 +00:00
Hari
8c4c10df5d
Merge pull request #2 from harivansh-afk/rename
rename
2026-03-31 22:27:25 -04:00
4ac6275dbf rename 2026-04-01 02:27:08 +00:00
7ae2b7a71c birdseyeview 2026-04-01 00:56:25 +00:00
Hari
e8584e4a2d
Update README.md 2026-03-31 20:37:59 -04:00
fc6c0c737f current state 2026-04-01 00:19:50 +00:00
a377a295f1 update tasks 2026-04-01 00:03:52 +00:00
8078b92c6c correct dev script 2026-04-01 00:02:16 +00:00
Hari
753f3df197
Merge pull request #1 from harivansh-afk/phase1
Scaffold control plane foundation
2026-03-31 17:34:21 -04:00
d864b6480d update scaffold tasks
Co-authored-by: Codex <noreply@openai.com>
2026-03-31 21:26:01 +00:00
540313016b add local dev setup
Co-authored-by: Codex <noreply@openai.com>
2026-03-31 21:25:57 +00:00
e5619bb002 style the shell app
Co-authored-by: Codex <noreply@openai.com>
2026-03-31 21:25:53 +00:00
eea46f28ad add nextcloud shell
Co-authored-by: Codex <noreply@openai.com>
2026-03-31 21:25:48 +00:00