2.6 KiB
Internal Drop MVP Implementation Plan
For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Build the PRD's recommended MVP: a Go single-binary LAN file and text transfer app with temporary local storage.
Architecture: The service is a Go standard-library monolith. HTTP serves the static frontend and REST endpoints; a small internal WebSocket implementation handles presence, text offers, file offers, and transfer status messages; files are cached under a configured temporary directory and removed by TTL cleanup.
Tech Stack: Go standard library only, embedded static HTML/CSS/JS, local filesystem storage, Docker Compose and systemd deployment docs.
Task 1: Core Domain and Storage
Files:
-
Create:
go.mod -
Create:
internal/drop/types.go -
Create:
internal/drop/config.go -
Create:
internal/drop/store.go -
Create:
internal/drop/store_test.go -
Write failing tests for session creation, code conflict recovery, transfer expiry, and file storage cleanup.
-
Implement thread-safe in-memory users/transfers plus local filesystem storage.
-
Run
go test ./internal/dropand confirm pass.
Task 2: HTTP API and WebSocket Hub
Files:
-
Create:
internal/drop/websocket.go -
Create:
internal/drop/hub.go -
Create:
internal/drop/server.go -
Create:
internal/drop/server_test.go -
Write tests for API handlers and WebSocket frame encode/decode helpers.
-
Implement REST endpoints, static file serving, WebSocket handshake, hub registration, presence broadcasting, text forwarding, transfer accept/reject/complete events.
-
Run
go test ./internal/dropand confirm pass.
Task 3: Frontend Experience
Files:
-
Create:
web/index.html -
Create:
web/styles.css -
Create:
web/app.js -
Build a first-screen app UI with user code, nickname, peer list, text/file sender, incoming requests, and status log.
-
Use REST for session/upload/download and WebSocket for live events.
-
Open the app locally and verify browser render plus file-offer notification flow.
Task 4: Entrypoint and Deployment
Files:
-
Create:
main.go -
Create:
Dockerfile -
Create:
docker-compose.yml -
Create:
internal-drop.service.example -
Create:
README.md -
Wire config, server startup, static embed, and graceful shutdown.
-
Document Docker Compose and systemd deployment.
-
Run build and tests once Go is available:
go test ./...andgo build ..