How nipalab/nipa works
Nipa is a centralized version-control system for binary-heavy repositories. In the primary workflow, a developer uses the CLI to clone or edit a working copy, stage changes, and push commits; the client transfers chunked content to the server, which applies repository rules and persists metadata and chunks. Updates, branches, merges, diffs, locks, and merge requests support ongoing collaboration. GUI clients can use a local daemon, while browser users access repository and administration features through the web UI and HTTP API. The map follows the README and sampled startup, CLI, and daemon code; unsampled subsystem wiring is shown only where documented.
Main entry points: client/usecase Client operations · internal/usecase Business usecases · main.go Server entry · cli Nipa CLI
Components 21
Client workflow
- Nipa CLI
internal/client/cli - Client operations
internal/client/usecase - Server transport
internal/client/grpc - Working copy
internal/client/localrepo - Chunk transfer
internal/chunker - Local daemon
internal/client/daemon
Server services
- Server entry
cmd/nipad/main.go - gRPC services
internal/grpc/server - HTTP API
internal/http/api - Business usecases
internal/usecase - Diff engine
internal/diff
Web interface
- Nipa web app
web/src/App.tsx - Web API client
web/src/api/client.ts - Embedded web UI
web/server/webui.go
Persistence
- Chunk storage
internal/storage - Metadata repositories
internal/repository/sqlite
Other components
- Developer
- GUI integrations
- SQL database
- Browser user
- OS keyring
Connections 21
- Developer → Nipa CLI: runs commands
- Nipa CLI → Client operations: dispatches operations
- Client operations → Working copy: reads/writes state
- Client operations → Server transport: requests server
- Client operations → Chunk transfer: chunks content
- Server transport → gRPC services: RPC calls
- GUI integrations → Local daemon: connects locally
- Local daemon → Client operations: runs operations
- Server entry → gRPC services: registers services
- Server entry → HTTP API: routes HTTP
- gRPC services → Business usecases: dispatches requests
- HTTP API → Business usecases: handles API requests
- Business usecases → Metadata repositories: reads/writes metadata
- Business usecases → Chunk storage: stores/retrieves chunks
- Metadata repositories → SQL database: queries
- Business usecases → Diff engine: compares trees
- Browser user → Nipa web app: uses browser
- Nipa web app → Web API client: requests data
- Web API client → HTTP API: calls REST API
- Server entry → Embedded web UI: serves UI
- Nipa CLI → OS keyring: stores credentials