web

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: AGPL-3.0 Imports: 37 Imported by: 0

Documentation

Overview

Package web assembles Outtake's inbound HTTP layer. It owns the route table and the middleware pipeline, and it builds the handlers under web/handlers from the services the composition root hands it. The templ pages and components those handlers render live in web/pages, web/components, and web/view, and the static files they link to live in web/assets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v0.3.0

func New(deps Deps) *fiber.App

New constructs the Fiber application and registers routes.

Parameters:

  • deps: Every dependency the route table and its handlers are built from.

Returns:

  • app: The Fiber application with every route registered.

Types

type Deps added in v0.3.0

type Deps struct {
	// Cfg is the loaded application configuration.
	Cfg *config.Config
	// DB is the clip database the handlers and middleware read through.
	DB *database.DB
	// Queue is the queue the clip handlers submit to.
	Queue *queue.Queue
	// Blob is the blob store the clip and thumbnail handlers use.
	Blob blob.Blob
	// Paths is the local layout of the stored blobs.
	Paths blob.Paths
	// Auth is the Plex authentication service, which owns the selected server.
	Auth *identity.Auth
	// Previews is the preview service the preview routes submit to.
	Previews *preview.Service
	// Sources resolves the media the pages describe.
	Sources *plexlib.MediaSource
	// Sessions persists web sessions. Nil keeps them in memory.
	Sessions fiber.Storage
}

Deps is every dependency the route table and its handlers are built from.

The composition root fills it in, so this package assembles the HTTP surface without knowing which backend sits behind any of it.

Directories

Path Synopsis
Package assets embeds the static files the web app serves under /assets, and names each one by a URL that carries a hash of its contents, so a browser can cache it for as long as the file is unchanged.
Package assets embeds the static files the web app serves under /assets, and names each one by a URL that carries a hash of its contents, so a browser can cache it for as long as the file is unchanged.
components
nav
Package exportform decodes the New export form from a request or a query, for the media item page and the redirect a finished preview comes back through.
Package exportform decodes the New export form from a request or a query, for the media item page and the redirect a finished preview comes back through.
handlers
auth
Package auth serves the Plex sign-in routes.
Package auth serves the Plex sign-in routes.
clip
Package clip serves the clip routes: creating a clip, editing one, canceling one, deleting one, listing them, and handing a finished file back.
Package clip serves the clip routes: creating a clip, editing one, canceling one, deleting one, listing them, and handing a finished file back.
health
Package health serves the liveness endpoint.
Package health serves the liveness endpoint.
home
Package home serves the dashboard, login, playback, and appearance pages.
Package home serves the dashboard, login, playback, and appearance pages.
library
Package library serves the media library pages: the browse grid, a media item, and the library navigation.
Package library serves the media library pages: the browse grid, a media item, and the library navigation.
library/media
Package media serves the routes that read Plex media directly: the live session lookup and the media search.
Package media serves the routes that read Plex media directly: the live session lookup and the media search.
library/thumb
Package thumb serves the Plex thumbnail cache proxy, which answers a poster request from the local cache and otherwise fetches it from the selected server.
Package thumb serves the Plex thumbnail cache proxy, which answers a poster request from the local cache and otherwise fetches it from the selected server.
live
Package live serves the event stream that keeps a page current.
Package live serves the event stream that keeps a page current.
preview
Package preview serves the segment previews the export form shows: rendering one, reporting its progress, canceling it, and serving the file a finished render published.
Package preview serves the segment previews the export form shows: rendering one, reporting its progress, canceling it, and serving the file a finished render published.
profile
Package profile serves the clip profile settings page and the edits posted to it.
Package profile serves the clip profile settings page and the edits posted to it.
server
Package server serves the Plex server list and the selection posted to it.
Package server serves the Plex server list and the selection posted to it.
storage
Package storage serves the storage settings page and its clear actions.
Package storage serves the storage settings page and its clear actions.
users
Package users serves the users settings page, where the owner and admins approve accounts, change roles, remove users, and set render limits, and the page an account waits on until it is approved.
Package users serves the users settings page, where the owner and admins approve accounts, change roles, remove users, and set render limits, and the page an account waits on until it is approved.
Package middleware provides HTTP middleware for the outtake API.
Package middleware provides HTTP middleware for the outtake API.
middlewaretest
Package middlewaretest lets handler tests make requests as a signed-in caller without a session, recording the caller the way the auth guard does.
Package middlewaretest lets handler tests make requests as a signed-in caller without a session, recording the caller the way the auth guard does.
Package respond holds how a handler answers a request.
Package respond holds how a handler answers a request.
respondtest
Package respondtest lets handler tests see the failure a handler left in the session for the next page, which a redirect carries there instead of the address.
Package respondtest lets handler tests see the failure a handler left in the session for the next page, which a redirect carries there instead of the address.
Package routes holds the vocabulary of the web surface: the paths it serves, the query parameters it reads, and how a link into it is built.
Package routes holds the vocabulary of the web surface: the paths it serves, the query parameters it reads, and how a link into it is built.
Package theme catalogs selectable UI color palettes.
Package theme catalogs selectable UI color palettes.
Package utils provides shared helpers for the Outtake web layer.
Package utils provides shared helpers for the Outtake web layer.
Package view holds shared HTML view models for Outtake pages and widgets.
Package view holds shared HTML view models for Outtake pages and widgets.

Jump to

Keyboard shortcuts

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