Help us shape the future of Go! Take the 2026 Go Developer Survey

quark

module
v0.56.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: MIT-0

README

Quark

Your own private cloud, running in your house. Photos, files, documents — all on hardware you own, off servers you don't trust.

Build Code Quality CodeQL Test


What is it?

Quark is a self-hosted personal cloud that runs on a device in your home. Think Google Drive or iCloud, except the data never leaves your house and nobody's training AI on your family photos.

You buy the hardware once. No subscriptions. No data mining. It's yours.

Stack

  • Go + Gin — backend server
  • Flutter — cross-platform frontend (web, iOS, Android)
  • SQLite — embedded local database
  • OpenTelemetry — observability

Getting started

Prerequisites: Go, Flutter, Make, air, sqlc, swag

git clone https://github.com/autobutler-org/quark.git # Include --recursive if you want to do OS image builds
cd quark
make setup
make generate
make build
Run it locally

Backend with hot reload. Pick a mode — they differ in scheme and port:

make watch/backend         # plain HTTP  on http://localhost:8080
make watch/backend/secure  # HTTPS       on https://localhost (:443), self-signed cert

The secure mode generates a self-signed certificate on first boot. It is not added to any trust store, so curl needs -k and browsers will warn; the Flutter app skips chain verification for local addresses on purpose. Binding :443 requires root on Linux — see AS_ROOT=1 below.

Without hot reload, make serve/backend and make serve/backend/secure are the same two modes.

Frontend (web):

make serve/frontend

Frontend (mobile emulator):

make emulate          # default platform
make emulate/android  # or emulate/ios
make serve/frontend/mobile
Container

Runs a published release, not your working tree:

make build/docker                       # build the image for the latest released tag
make serve/docker                       # run it on http://localhost:8080
make serve/docker DOCKER_PORT=9000      # different host port
make serve/docker DOCKER_DATA=/abs/path # use a Quark directory on the host
make clean/docker                       # remove the container

It downloads the tarball for a tagged version, so it will not pick up local changes — make watch/backend is still the development loop. Use this to check the shipped artifact, to reproduce something a user reports on a specific version, or to try Quark without a Go and Flutter toolchain.

State lives in the quark-data volume by default and persists between runs. See docs/container.md for Kubernetes, the uid 999 the data directory must be owned by on Linux, and the rest.

USB device mounting requires root on Linux, as does binding :443 in secure mode. Use AS_ROOT=1 with any backend target if you need it — e.g. make watch/backend/secure AS_ROOT=1.

Swagger UI is at http://localhost:8080/swagger in insecure mode, or https://localhost/swagger in secure mode.

Other useful commands
make check    # lint
make format   # format
make help     # all targets

Docs

Contributing

We use linear commit history — one focused commit per PR is the norm. See CONTRIBUTING.md for the full rundown.

License

MIT No Attribution (MIT-0). See LICENSE.

Directories

Path Synopsis
cmd
knowledge command
Command knowledge builds a map of this repository out of the repository itself: Go packages and the imports between them, the HTTP routes in the swagger spec, the SQLite tables and the sqlc queries that touch them, the Flutter tree, and the user journeys.
Command knowledge builds a map of this repository out of the repository itself: Go packages and the imports between them, the HTTP routes in the swagger spec, the SQLite tables and the sqlc queries that touch them, the Flutter tree, and the user journeys.
lsusb command
Command lsusb prints the USB devices Quark can see, with their partitions and mount points; -storage narrows the list to storage devices.
Command lsusb prints the USB devices Quark can see, with their partitions and mount points; -storage narrows the list to storage devices.
provisioning command
Command provisioning mints single-use Headscale pre-auth keys for quarks that POST /provision (#1876).
Command provisioning mints single-use Headscale pre-auth keys for quarks that POST /provision (#1876).
quark command
Command quark is the Quark binary: quark serve runs the API and the embedded web app, quark install sets it up as a system service, quark auth-key derives the key a script signs in with, and quark version reports the build.
Command quark is the Quark binary: quark serve runs the API and the embedded web app, quark install sets it up as a system service, quark auth-key derives the key a script signs in with, and quark version reports the build.
quark/authkey
Package authkey is the quark auth-key subcommand, which derives the auth key a script signs in to a Quark with (#2713): it fetches the account's salt, derives the key on this machine, and prints it.
Package authkey is the quark auth-key subcommand, which derives the auth key a script signs in to a Quark with (#2713): it fetches the account's salt, derives the key on this machine, and prints it.
quark/install
Package install is the quark install subcommand, which sets Quark up as a system service through internal/install, caps its memory through pkg/util/memutil and keeps the OS patched through pkg/util/aptutil.
Package install is the quark install subcommand, which sets Quark up as a system service through internal/install, caps its memory through pkg/util/memutil and keeps the OS patched through pkg/util/aptutil.
quark/serve
Package serve is the quark serve subcommand: it builds the default dependency graph and starts the HTTP server, over plain HTTP when --insecure is set.
Package serve is the quark serve subcommand: it builds the default dependency graph and starts the HTTP server, over plain HTTP when --insecure is set.
quark/version
Package version is the quark version subcommand, which prints the version this binary was built as.
Package version is the quark version subcommand, which prints the version this binary was built as.
tsnetbridge command
Command tsnetbridge is the C library the iOS and Android app loads (#1881).
Command tsnetbridge is the C library the iOS and Android app loads (#1881).
docs
swagger
Package swagger Code generated by swaggo/swag.
Package swagger Code generated by swaggo/swag.
internal
db
Package db is Quark's database layer, for both engines it runs on: SQLite, the default, and PostgreSQL (#2955).
Package db is Quark's database layer, for both engines it runs on: SQLite, the default, and PostgreSQL (#2955).
db/dbtest
Package dbtest opens a real Quark database for a test.
Package dbtest opens a real Quark database for a test.
db/genpgadapter command
Command genpgadapter writes internal/db/querier_postgres.go, the type that makes the PostgreSQL queries in internal/db/pgdb satisfy db.Querier.
Command genpgadapter writes internal/db/querier_postgres.go, the type that makes the PostgreSQL queries in internal/db/pgdb satisfy db.Querier.
db/pgdb
Package pgdb is the PostgreSQL half of Quark's query layer: the methods sqlc generates from sql/queries/ and sql/queries/postgres/ against the schema in internal/db/migrations_postgres/.
Package pgdb is the PostgreSQL half of Quark's query layer: the methods sqlc generates from sql/queries/ and sql/queries/postgres/ against the schema in internal/db/migrations_postgres/.
install
Package install sets Quark up as a systemd service on Linux, along with the root-owned helpers the service is allowed to call but not rewrite.
Package install sets Quark up as a systemd service on Linux, along with the root-owned helpers the service is allowed to call but not rewrite.
server
Package server assembles the HTTP server: the gin engine and its middleware, every /api/v0 router (mounted in routes.go), Swagger, and the embedded web build served as a single-page app.
Package server assembles the HTTP server: the gin engine and its middleware, every /api/v0 router (mounted in routes.go), Swagger, and the embedded web build served as a single-page app.
server/api/v0
Package v0 holds the version-0 HTTP API: one handler package per URL segment under /api/v0, each mounted in internal/server/routes.go.
Package v0 holds the version-0 HTTP API: one handler package per URL segment under /api/v0, each mounted in internal/server/routes.go.
server/api/v0/access
Package v0_access serves /api/v0/access: the path-based grants that share a folder with a user or group — listing, setting and revoking them — and what has been shared with the caller.
Package v0_access serves /api/v0/access: the path-based grants that share a folder with a user or group — listing, setting and revoking them — and what has been shared with the caller.
server/api/v0/admin
Package v0_admin serves the admin-only /api/v0/admin routes: creating, approving, denying, promoting, demoting, disabling, enabling and deleting users, groups and their members, listing the history of account request decisions, and repairing the installation.
Package v0_admin serves the admin-only /api/v0/admin routes: creating, approving, denying, promoting, demoting, disabling, enabling and deleting users, groups and their members, listing the history of account request decisions, and repairing the installation.
server/api/v0/albums
Package v0_albums serves /api/v0/albums: the caller's photo albums, as a list or a nested tree, and the photos in them.
Package v0_albums serves /api/v0/albums: the caller's photo albums, as a list or a nested tree, and the photos in them.
server/api/v0/auth
Package v0_auth serves /api/v0/auth: first-boot setup, login and logout, account recovery, requests for an account, the salt a client derives its auth key with, the caller's recovery key and password, and the caller's sessions and account.
Package v0_auth serves /api/v0/auth: first-boot setup, login and logout, account recovery, requests for an account, the salt a client derives its auth key with, the caller's recovery key and password, and the caller's sessions and account.
server/api/v0/books
Package v0_books serves /api/v0/books, which finds the books in the files directory.
Package v0_books serves /api/v0/books, which finds the books in the files directory.
server/api/v0/calendar
Package v0_calendar serves /api/v0/calendar: the household calendar's events, which every signed-in account reads and writes (#1144).
Package v0_calendar serves /api/v0/calendar: the household calendar's events, which every signed-in account reads and writes (#1144).
server/api/v0/chat
Package v0_chat serves /api/v0/chat: the chat channels the caller belongs to, creating, renaming and deleting channels, listing and changing a channel's members, and each account's chat keys, where /chat/keys/me holds the caller's wrapped identity and /chat/keys/:userId serves any account's public keys.
Package v0_chat serves /api/v0/chat: the chat channels the caller belongs to, creating, renaming and deleting channels, listing and changing a channel's members, and each account's chat keys, where /chat/keys/me holds the caller's wrapped identity and /chat/keys/:userId serves any account's public keys.
server/api/v0/devices
Package v0_devices serves /api/v0/devices: the clients that have connected to this Quark.
Package v0_devices serves /api/v0/devices: the clients that have connected to this Quark.
server/api/v0/events
Package v0_events serves /api/v0/events, the WebSocket that streams event-bus events to open clients, filtered to what each user can read, so every client refreshes when the file tree changes.
Package v0_events serves /api/v0/events, the WebSocket that streams event-bus events to open clients, filtered to what each user can read, so every client refreshes when the file tree changes.
server/api/v0/favorites
Package v0_favorites serves the photo favorites, which sit under /api/v0/photos (/photos/favorite and /photos/favorites): marking a photo as a favorite, checking whether one is, and listing them.
Package v0_favorites serves the photo favorites, which sit under /api/v0/photos (/photos/favorite and /photos/favorites): marking a photo as a favorite, checking whether one is, and listing them.
server/api/v0/files
Package v0_files serves /api/v0/files: listing, searching and stat-ing files, uploads (including resumable upload sessions), downloads and archive views, moves, deletes and new folders, spreadsheet conversions between .xlsx and .qsheet (the .xlsx export streamed back as a download), and a presentation's .pptx export and import.
Package v0_files serves /api/v0/files: listing, searching and stat-ing files, uploads (including resumable upload sessions), downloads and archive views, moves, deletes and new folders, spreadsheet conversions between .xlsx and .qsheet (the .xlsx export streamed back as a download), and a presentation's .pptx export and import.
server/api/v0/health
Package v0_health serves /api/v0/health, the device metrics the Health page shows.
Package v0_health serves /api/v0/health, the device metrics the Health page shows.
server/api/v0/hostname
Package v0_hostname serves the admin-only /api/v0/hostname routes: reading what the device is called and whether it can be renamed, and renaming it.
Package v0_hostname serves the admin-only /api/v0/hostname routes: reading what the device is called and whether it can be renamed, and renaming it.
server/api/v0/jobs
Package v0_jobs serves /api/v0/jobs: listing background jobs, and getting, canceling or retrying one.
Package v0_jobs serves /api/v0/jobs: listing background jobs, and getting, canceling or retrying one.
server/api/v0/music
Package v0_music serves /api/v0/music: the music library built from the audio files on each device.
Package v0_music serves /api/v0/music: the music library built from the audio files on each device.
server/api/v0/notifications
Package v0_notifications serves /api/v0/notifications, the caller's current notifications.
Package v0_notifications serves /api/v0/notifications, the caller's current notifications.
server/api/v0/photos
Package v0_photos serves /api/v0/photos: the photo library listing and its file name search, a photo's metadata, likely duplicates, and rotating or copying a photo.
Package v0_photos serves /api/v0/photos: the photo library listing and its file name search, a photo's metadata, likely duplicates, and rotating or copying a photo.
server/api/v0/playback
Package v0_playback serves /api/v0/playback: reading and saving how far the caller has watched a video, and marking one watched or unwatched.
Package v0_playback serves /api/v0/playback: reading and saving how far the caller has watched a video, and marking one watched or unwatched.
server/api/v0/previews
Package v0_previews serves /api/v0/previews, read-only views of office documents the client cannot open itself: a word-processing document as a stream of blocks (GET /previews/document) and one image from inside it (GET /previews/part), and the properties a document carries (GET /previews/properties).
Package v0_previews serves /api/v0/previews, read-only views of office documents the client cannot open itself: a word-processing document as a stream of blocks (GET /previews/document) and one image from inside it (GET /previews/part), and the properties a document carries (GET /previews/properties).
server/api/v0/settings
Package v0_settings serves /api/v0/settings.
Package v0_settings serves /api/v0/settings.
server/api/v0/ssh
Package v0_ssh serves the admin-only /api/v0/ssh routes: turning SSH access on and off, setting or clearing its password, and managing its authorized keys.
Package v0_ssh serves the admin-only /api/v0/ssh routes: turning SSH access on and off, setting or clearing its password, and managing its authorized keys.
server/api/v0/storage
Package v0_storage serves /api/v0/storage: the storage devices Quark manages, their snapshot backups, and how protected the files are.
Package v0_storage serves /api/v0/storage: the storage devices Quark manages, their snapshot backups, and how protected the files are.
server/api/v0/thumbnails
Package v0_thumbnails serves /api/v0/thumbnails, the cached image previews the photo and file views load, and takes the thumbnails clients render for files the device cannot decode (PUT).
Package v0_thumbnails serves /api/v0/thumbnails, the cached image previews the photo and file views load, and takes the thumbnails clients render for files the device cannot decode (PUT).
server/api/v0/trash
Package v0_trash serves /api/v0/trash: listing a device's trash, restoring items to where they were deleted from, and deleting them for good.
Package v0_trash serves /api/v0/trash: listing a device's trash, restoring items to where they were deleted from, and deleting them for good.
server/api/v0/users
Package v0_users serves /api/v0/users, profile pictures: PUT and DELETE /users/me/avatar change the caller's own, and GET /users/{id}/avatar serves anyone's to any signed-in user.
Package v0_users serves /api/v0/users, profile pictures: PUT and DELETE /users/me/avatar change the caller's own, and GET /users/{id}/avatar serves anyone's to any signed-in user.
server/api/v0/vault
Package v0_vault serves /api/v0/vault, each account's end-to-end encrypted vault (#3456): the account's wrapped vault key and its encrypted items.
Package v0_vault serves /api/v0/vault, each account's end-to-end encrypted vault (#3456): the account's wrapped vault key and its encrypted items.
server/api/v0/version
Package v0_version serves /api/v0/version: the installed version, the SBOM, the versions available, and, for admins, updating to one.
Package v0_version serves /api/v0/version: the installed version, the SBOM, the versions available, and, for admins, updating to one.
server/api/v0/versions
Package v0_versions serves /api/v0/versions, a file's version history (#1173): taking a snapshot, listing a file's versions, downloading one, restoring one, and deleting a named one.
Package v0_versions serves /api/v0/versions, a file's version history (#1173): taking a snapshot, listing a file's versions, downloading one, restoring one, and deleting a named one.
server/api/v0/videos
Package v0_videos serves /api/v0/videos: video metadata, the formats a video can be converted to, and converting or trimming one.
Package v0_videos serves /api/v0/videos: video metadata, the formats a video can be converted to, and converting or trimming one.
server/frame
Package frame serves /frame: a small slideshow page for a dedicated screen such as a photo frame (#3021).
Package frame serves /frame: a small slideshow page for a dedicated screen such as a photo frame (#3021).
server/middleware
Package middleware is the gin middleware every request passes through — dependency injection, connected-device tracking, and session auth with its short list of exempt paths — plus RequireAdmin for the admin group and RequireFeatureEnabled for the routes of a beta feature.
Package middleware is the gin middleware every request passes through — dependency injection, connected-device tracking, and session auth with its short list of exempt paths — plus RequireAdmin for the admin group and RequireFeatureEnabled for the routes of a beta feature.
server/stress
Package stress is the capacity harness for a running Quark (#2507).
Package stress is the capacity harness for a running Quark (#2507).
pkg
backup
Package backup snapshots managed-device files, and the chat and vault tables as the ciphertext they are, onto a target device, keeps the files in sync as they change, and verifies and restores what it wrote.
Package backup snapshots managed-device files, and the chat and vault tables as the ciphertext they are, onto a target device, keeps the files in sync as they change, and verifies and restores what it wrote.
util/accessutil
Package accessutil answers who may reach a path (#1902).
Package accessutil answers who may reach a path (#1902).
util/albumutil
Package albumutil holds the photo album writes that carry naming rules: an album name cannot contain '/', and it is unique among its siblings ignoring case.
Package albumutil holds the photo album writes that carry naming rules: an album name cannot contain '/', and it is unique among its siblings ignoring case.
util/aptutil
Package aptutil keeps a Debian-based Quark patched without risking its boot.
Package aptutil keeps a Debian-based Quark patched without risking its boot.
util/audiotagutil
Package audiotagutil reads the tags, the duration and the embedded cover of an audio file (mp3, aac, flac, ogg/opus, m4a, wav and wma) without trusting any length the file declares.
Package audiotagutil reads the tags, the duration and the embedded cover of an audio file (mp3, aac, flac, ogg/opus, m4a, wav and wma) without trusting any length the file declares.
util/authutil
Package authutil handles authentication: hashing the auth and recovery keys clients derive, first-boot setup, login, session issue and validation, account status, and admin role management.
Package authutil handles authentication: hashing the auth and recovery keys clients derive, first-boot setup, login, session issue and validation, account status, and admin role management.
util/avatarutil
Package avatarutil stores, serves and removes profile pictures.
Package avatarutil stores, serves and removes profile pictures.
util/bookutil
Package bookutil finds the book files (PDF and EPUB) in a files namespace.
Package bookutil finds the book files (PDF and EPUB) in a files namespace.
util/calendarutil
Package calendarutil holds the household calendar's events (#1144): creating, reading, listing, updating and deleting them, and the rules an event must meet to be stored.
Package calendarutil holds the household calendar's events (#1144): creating, reading, listing, updating and deleting them, and the rules an event must meet to be stored.
util/chatutil
Package chatutil manages chat channels and who belongs to them (#2415).
Package chatutil manages chat channels and who belongs to them (#2415).
util/ctxutil
Package ctxutil stores and fetches typed values on a gin context.
Package ctxutil stores and fetches typed values on a gin context.
util/deputil
Package deputil carries the server's dependency graph: the Dependencies interface every layer is handed, and the constructors that build it either empty (for tests) or wired to the real database, storage, and VFS.
Package deputil carries the server's dependency graph: the Dependencies interface every layer is handed, and the constructors that build it either empty (for tests) or wired to the real database, storage, and VFS.
util/deviceutil
Package deviceutil holds the services behind /api/v0/storage/devices: the mount and unmount of a USB storage device, the display name and role the database keeps for each device, and the status list that overlays the two onto what the detector reports.
Package deviceutil holds the services behind /api/v0/storage/devices: the mount and unmount of a USB storage device, the display name and role the database keeps for each device, and the status list that overlays the two onto what the detector reports.
util/docpropsutil
Package docpropsutil reads the properties an office document carries about itself — title, author, dates, and the page, word and character counts its authoring application last saved — without parsing the document's body.
Package docpropsutil reads the properties an office document carries about itself — title, author, dates, and the page, word and character counts its authoring application last saved — without parsing the document's body.
util/docreadutil
Package docreadutil reads word-processing documents into one small block model, for the read-only document viewer and for "Open as Quark doc" (docs/architecture/read-only-documents.md, Decision 2).
Package docreadutil reads word-processing documents into one small block model, for the read-only document viewer and for "Open as Quark doc" (docs/architecture/read-only-documents.md, Decision 2).
util/downloadutil
Package downloadutil issues the tokens a browser download authenticates with.
Package downloadutil issues the tokens a browser download authenticates with.
util/eventbus
Package eventbus is the in-process publish/subscribe bus behind /api/v0/events.
Package eventbus is the in-process publish/subscribe bus behind /api/v0/events.
util/favoritesutil
Package favoritesutil manages a user's Favorites, a system photo album created on first use, and toggles photos in and out of it.
Package favoritesutil manages a user's Favorites, a system photo album created on first use, and toggles photos in and out of it.
util/featureflagutil
Package featureflagutil is the registry of beta feature flags (#2542): the switches an admin uses to turn a feature that is still in beta on or off for the whole Quark.
Package featureflagutil is the registry of beta feature flags (#2542): the switches an admin uses to turn a feature that is still in beta on or off for the whole Quark.
util/fileutil
Package fileutil holds the services behind /api/v0/files: the listings the file browser pages through, the archive views that read only headers, the download pipeline that zips a folder or re-encodes an image on its way out, and the mutations (delete, move, new folder) the browser sends back.
Package fileutil holds the services behind /api/v0/files: the listings the file browser pages through, the archive views that read only headers, the download pipeline that zips a folder or re-encodes an image on its way out, and the mutations (delete, move, new folder) the browser sends back.
util/fileversionutil
Package fileversionutil keeps a file's version history (#1173): earlier copies of a file, stored as files in a hidden store beside it (storageutil.VersionsDirName), with a small JSON index.
Package fileversionutil keeps a file's version history (#1173): earlier copies of a file, stored as files in a hidden store beside it (storageutil.VersionsDirName), with a small JSON index.
util/githubutil
Package githubutil fetches release metadata from the GitHub REST API.
Package githubutil fetches release metadata from the GitHub REST API.
util/grouputil
Package grouputil manages the groups admins put accounts in (#1910).
Package grouputil manages the groups admins put accounts in (#1910).
util/healthutil
Package healthutil provides gopsutil-based host hardware health metrics.
Package healthutil provides gopsutil-based host hardware health metrics.
util/hostnameutil
Package hostnameutil lets an admin rename the device: it sets the system hostname and keeps what follows from it in step — the name Avahi answers to and advertises `Quark on <name>` under, and the TLS certificate's SANs (#2344).
Package hostnameutil lets an admin rename the device: it sets the system hostname and keeps what follows from it in step — the name Avahi answers to and advertises `Quark on <name>` under, and the TLS certificate's SANs (#2344).
util/indexutil
Package indexutil keeps the in-memory filename index behind filename search: one tree of folders per managed device, built by walking each device's files namespace in the VFS registry and kept current from file events.
Package indexutil keeps the in-memory filename index behind filename search: one tree of folders per managed device, built by walking each device's files namespace in the VFS registry and kept current from file events.
util/iosemutil
Package iosemutil bounds the server's heavy work — image decodes, video frame extraction, RAW conversion and whole-file copies — with one counting semaphore per kind of work, so memory and disk stay bounded under concurrent load.
Package iosemutil bounds the server's heavy work — image decodes, video frame extraction, RAW conversion and whole-file copies — with one counting semaphore per kind of work, so memory and disk stay bounded under concurrent load.
util/jobutil
Package jobutil runs background jobs.
Package jobutil runs background jobs.
util/memutil
Package memutil sizes Quark's memory limits from the board's RAM (#2761).
Package memutil sizes Quark's memory limits from the board's RAM (#2761).
util/musicutil
Package musicutil keeps the music library: the music_tracks cache built from the audio files on each device, the Songs, Albums, Artists and Genres views over it, and the tag search (#2982, docs/architecture/music-library.md).
Package musicutil keeps the music library: the music_tracks cache built from the audio files on each device, the Songs, Albums, Artists and Genres views over it, and the tag search (#2982, docs/architecture/music-library.md).
util/notificationutil
Package notificationutil works out which notifications an account has.
Package notificationutil works out which notifications an account has.
util/odputil
Package odputil reads an OpenDocument presentation (.odp) and writes it as the .qslide JSON Quark's slides editor and viewer already understand — the same file pptxutil's import writes for a .pptx, so one viewer and one editor serve both formats.
Package odputil reads an OpenDocument presentation (.odp) and writes it as the .qslide JSON Quark's slides editor and viewer already understand — the same file pptxutil's import writes for a .pptx, so one viewer and one editor serve both formats.
util/odsutil
Package odsutil reads an OpenDocument spreadsheet and writes it as the .qsheet JSON envelope Quark's Sheets editor already understands:
Package odsutil reads an OpenDocument spreadsheet and writes it as the .qsheet JSON envelope Quark's Sheets editor already understands:
util/officezip
Package officezip opens the zip packages office documents are made of — DOCX, PPTX, XLSX and their ODF cousins ODT, ODP and ODS — with every read bounded, so a hostile file costs one failed request rather than the server's memory.
Package officezip opens the zip packages office documents are made of — DOCX, PPTX, XLSX and their ODF cousins ODT, ODP and ODS — with every read bounded, so a hostile file costs one failed request rather than the server's memory.
util/photoutil
Package photoutil reads, transforms, and thumbnails photo and video files: listing the photo library through each device's VFS namespace, extracting EXIF metadata, correcting orientation, converting camera RAW, generating thumbnails, and comparing images by perceptual hash.
Package photoutil reads, transforms, and thumbnails photo and video files: listing the photo library through each device's VFS namespace, extracting EXIF metadata, correcting orientation, converting camera RAW, generating thumbnails, and comparing images by perceptual hash.
util/playbackutil
Package playbackutil remembers how far each account has watched each video: a resume position and a watched flag, one row per (user, device, path) in the VFS metadata store under the key "playback.<user id>".
Package playbackutil remembers how far each account has watched each video: a resume position and a watched flag, one row per (user, device, path) in the VFS metadata store under the key "playback.<user id>".
util/pptxutil
Package pptxutil converts between .qslide presentations and PowerPoint (.pptx) packages, using nothing but archive/zip and encoding/xml: it writes a .qslide out as a .pptx for export (#1172), and reads a .pptx back in as a .qslide for import (#1171).
Package pptxutil converts between .qslide presentations and PowerPoint (.pptx) packages, using nothing but archive/zip and encoding/xml: it writes a .qslide out as a .pptx for export (#1172), and reads a .pptx back in as a .qslide for import (#1171).
util/protectionutil
Package protectionutil derives how protected a Quark's files are.
Package protectionutil derives how protected a Quark's files are.
util/provisionutil
Package provisionutil asks the provisioning service (cmd/provisioning) for a Headscale pre-auth key, so enabling remote access never needs a key from the user (#1876).
Package provisionutil asks the provisioning service (cmd/provisioning) for a Headscale pre-auth key, so enabling remote access never needs a key from the user (#1876).
util/ratelimitutil
Package ratelimitutil provides a per-IP token-bucket rate limiter for protecting sensitive endpoints (e.g.
Package ratelimitutil provides a per-IP token-bucket rate limiter for protecting sensitive endpoints (e.g.
util/remoteutil
Package remoteutil runs an embedded Tailscale node and reverse-proxies tailnet traffic to the local quark server.
Package remoteutil runs an embedded Tailscale node and reverse-proxies tailnet traffic to the local quark server.
util/repairutil
Package repairutil lets an admin repair the Quark installation (#2121).
Package repairutil lets an admin repair the Quark installation (#2121).
util/requestlogutil
Package requestlogutil keeps the history of account request decisions: who asked, whether an admin approved or denied them, which admin, and when.
Package requestlogutil keeps the history of account request decisions: who asked, whether an admin approved or denied them, which admin, and when.
util/resetutil
Package resetutil tells a running instance that the install it booted on has been factory reset, possibly by another instance serving the same database.
Package resetutil tells a running instance that the install it booted on has been factory reset, possibly by another instance serving the same database.
util/searchutil
Package searchutil provides text extraction and full-text search over indexed file contents using SQLite FTS5.
Package searchutil provides text extraction and full-text search over indexed file contents using SQLite FTS5.
util/serverutil
Package serverutil holds the HTTP building blocks the server layer is assembled from: the Response envelope handlers return, the Route/Router registration types that wire handlers onto gin, the HttpError type that lets a service function name its own status code, and the ports the server binds.
Package serverutil holds the HTTP building blocks the server layer is assembled from: the Response envelope handlers return, the Route/Router registration types that wire handlers onto gin, the HttpError type that lets a service function name its own status code, and the ports the server binds.
util/settingsutil
Package settingsutil reads and writes the Quark's settings.
Package settingsutil reads and writes the Quark's settings.
util/sqlutil
Package sqlutil holds small conversions between Go values and database/sql types, and recognizes a unique-constraint error from either engine.
Package sqlutil holds small conversions between Go values and database/sql types, and recognizes a unique-constraint error from either engine.
util/sshutil
Package sshutil lets an admin turn SSH access to the Quark on and off, and manage how the quark login account signs in: public keys and an optional password (#2131).
Package sshutil lets an admin turn SSH access to the Quark on and off, and manage how the quark login account signs in: public keys and an optional password (#2131).
util/storageutil
Package storageutil is the storage layer beneath the VFS: detecting and mounting USB drives and their partitions, device status and roles, the trash, reading and extracting archives, and the file operations the services call.
Package storageutil is the storage layer beneath the VFS: detecting and mounting USB drives and their partitions, device status and roles, the trash, reading and extracting archives, and the file operations the services call.
util/thumbnailutil
Package thumbnailutil generates and caches image and video thumbnails, and the cover art of music tracks, on disk.
Package thumbnailutil generates and caches image and video thumbnails, and the cover art of music tracks, on disk.
util/tlsutil
Package tlsutil provides helpers for provisioning self-signed TLS certificates used by the Quark server when running in production (HTTPS) mode.
Package tlsutil provides helpers for provisioning self-signed TLS certificates used by the Quark server when running in production (HTTPS) mode.
util/transcodeutil
Package transcodeutil is the video-transcode job kind: Enqueue validates and queues a conversion into another video container, and the Handler from NewHandler remuxes the source into a new file beside it when the job runs.
Package transcodeutil is the video-transcode job kind: Enqueue validates and queues a conversion into another video container, and the Handler from NewHandler remuxes the source into a new file beside it when the job runs.
util/trashutil
Package trashutil is the trash as the API and the delete path use it: every operation resolves the device's namespace from the VFS registry and goes through its vfs.Trasher, then publishes what changed on the event bus with the device's serial (#2641).
Package trashutil is the trash as the API and the delete path use it: every operation resolves the device's namespace from the VFS registry and goes through its vfs.Trasher, then publishes what changed on the event bus with the device's serial (#2641).
util/updateutil
Package updateutil discovers, downloads, and installs quark releases from GitHub and Azure Blob Storage.
Package updateutil discovers, downloads, and installs quark releases from GitHub and Azure Blob Storage.
util/uploadutil
Package uploadutil owns the server side of file uploads: where a finished upload lands, and the resumable chunked sessions that feed it (#1629).
Package uploadutil owns the server side of file uploads: where a finished upload lands, and the resumable chunked sessions that feed it (#1629).
util/usersettingsutil
Package usersettingsutil stores the settings one account chooses for itself, as opposed to settingsutil's, which apply to the whole Quark.
Package usersettingsutil stores the settings one account chooses for itself, as opposed to settingsutil's, which apply to the whole Quark.
util/vaultutil
Package vaultutil stores each account's end-to-end encrypted vault (#3456): its vault key, a random key made on the client and stored only wrapped under the login password and, optionally, the recovery phrase, and its items, encrypted on the client under that key.
Package vaultutil stores each account's end-to-end encrypted vault (#3456): its vault key, a random key made on the client and stored only wrapped under the login password and, optionally, the recovery phrase, and its items, encrypted on the client under that key.
util/versionutil
Package versionutil reports and compares the build version of the binary.
Package versionutil reports and compares the build version of the binary.
util/videoutil
Package videoutil probes, trims, and remuxes video files with sprocket, in pure Go: none of the three decodes a frame, so they work for every codec and need nothing installed on the device.
Package videoutil probes, trims, and remuxes video files with sprocket, in pure Go: none of the three decodes a frame, so they work for every codec and need nothing installed on the device.
util/workerutil
Package workerutil runs the background worker the server starts beside it: a loop that runs until it is told to quit, and a logger for the errors it reports.
Package workerutil runs the background worker the server starts beside it: a loop that runs until it is told to quit, and a logger for the errors it reports.
util/xlsutil
Package xlsutil reads a legacy Excel 97–2003 workbook (.xls, BIFF8) and rewrites it as the same .qsheet JSON envelope xlsxutil writes for an .xlsx, so the Sheets UI has one format to understand whichever reader ran:
Package xlsutil reads a legacy Excel 97–2003 workbook (.xls, BIFF8) and rewrites it as the same .qsheet JSON envelope xlsxutil writes for an .xlsx, so the Sheets UI has one format to understand whichever reader ran:
util/xlsxutil
Package xlsxutil reads an OOXML spreadsheet (.xlsx / .xlsm) and rewrites it as the .qsheet JSON envelope Quark's Sheets editor already understands, and writes a .qsheet back out as an .xlsx for export (ExportQsheet):
Package xlsxutil reads an OOXML spreadsheet (.xlsx / .xlsm) and rewrites it as the .qsheet JSON envelope Quark's Sheets editor already understands, and writes a .qsheet back out as an .xlsx for export (ExportQsheet):
vfs
Package vfs provides the virtual filesystem layer: a common file interface over local disk, in-memory and storage-service namespaces, a registry that maps namespaces to implementations, and per-path metadata.
Package vfs provides the virtual filesystem layer: a common file interface over local disk, in-memory and storage-service namespaces, a registry that maps namespaces to implementations, and per-path metadata.
test
chaos
Package chaos holds defensive API stress/chaos checks for Quark.
Package chaos holds defensive API stress/chaos checks for Quark.
chaos/powercut command
Command powercut drives Quark's real upload write paths on a LazyFS mount and checks what a simulated power cut left behind (#2517).
Command powercut drives Quark's real upload write paths on a LazyFS mount and checks what a simulated power cut left behind (#2517).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL