newdrive/README.md
Elijah 715423ab8e
Some checks failed
CI / Backend (push) Failing after 1s
CI / Frontend (push) Successful in 13s
CI / Contracts and repository policy (push) Failing after 3s
CI / Container (push) Has been skipped
Implement owner setup and browser authentication sessions
2026-07-16 19:45:40 -07:00

2.4 KiB

Drive v2

Drive v2 is a private, single-owner, self-hosted file suite for Unraid. Stable v1 will provide file management, sharing, OnlyOffice integration, core previews, an installable PWA, a bulk importer, and a durable API suitable for a future desktop sync client.

The approved product and architecture baseline is Drive_v2_final_plan.md. Implementation decisions that refine it are recorded in docs/adr/.

Repository status

Phase 0 established the repository, module boundaries, contracts, development environment, and CI. Phase 1 now includes embedded forward-only migrations, the core persistence schema, atomic single-owner setup, recovery-code generation, Argon2id password hashing, revocable browser sessions, CSRF-protected logout, database-backed readiness, and persistent setup status. File-product endpoints are not implemented yet.

Prerequisites

  • Docker Engine with Compose v2
  • Go 1.26.x for native backend development
  • Node.js 24 LTS and npm for native frontend development

Docker is the canonical environment when local toolchains are unavailable.

Quick start

  1. Copy .env.example to .env and replace the development passwords.
  2. Run docker compose up --build.
  3. Open http://localhost:8080.
  4. Check http://localhost:8080/health/live and http://localhost:8080/health/ready.

Do not expose an uninitialized production instance through Nginx Proxy Manager. The approved open setup flow must be completed first.

Browser authentication cookies are deliberately Secure and use the __Host- prefix. Setup and login therefore require HTTPS through Nginx Proxy Manager; direct HTTP remains suitable for health checks and the development shell only.

Development

  • go test ./cmd/... ./internal/... runs backend tests.
  • npm --prefix web install installs frontend dependencies.
  • npm --prefix web run dev starts the frontend development server.
  • npm --prefix web run check runs frontend lint, type checking, and tests.
  • docker compose run --rm verify runs the repository checks in the pinned container environment.

See docs/development.md for structure, generated contracts, and workflow details. The approved baseline packages and update rules are in docs/dependencies.md.

Licensing

This is currently a private personal project. No license is granted for redistribution or reuse.