headplane/app/server/README.md

34 lines
1.9 KiB
Markdown
Raw Normal View History

2025-03-20 15:30:34 -04:00
# Headplane Server
This code is responsible for all code that is necessary *before* any
web server is started. It is the only part of the code that contains
many side-effects (in this case, importing a module may run code).
# Hierarchy
```
server
├── index.ts: Loads everything and starts the web server.
2025-05-30 19:35:47 -04:00
├── agent/
│ ├── dispatcher.ts: Serializes commands for the agent control fd (stdin).
│ ├── ssh.ts: Manages & multiplexes the active web SSH connections
│ ├── env.ts: Checks the environment variables for custom overrides.
2025-03-20 15:30:34 -04:00
├── config/
2025-04-02 21:29:00 -04:00
│ ├── integration/
│ │ ├── abstract.ts: Defines the abstract class for integrations.
│ │ ├── docker.ts: Contains the Docker integration.
│ │ ├── index.ts: Determines the correct integration to use (if any).
│ │ ├── kubernetes.ts: Contains the Kubernetes integration.
│ │ ├── proc.ts: Contains the Proc integration.
2025-03-20 15:30:34 -04:00
│ ├── env.ts: Checks the environment variables for custom overrides.
│ ├── loader.ts: Checks the configuration file and coalesces with ENV.
│ ├── schema.ts: Defines the schema for the Headplane configuration.
├── headscale/
│ ├── api-client.ts: Creates the HTTP client that talks to the Headscale API.
2025-04-03 03:07:47 -04:00
│ ├── api-error.ts: Contains the ResponseError definition.
2025-03-22 01:36:27 -04:00
│ ├── config-loader.ts: Loads the Headscale configuration (if available).
│ ├── config-schema.ts: Defines the schema for the Headscale configuration.
2025-03-20 15:30:34 -04:00
├── web/
│ ├── agent.ts: Handles setting up the agent WebSocket if needed.
2025-03-20 15:30:34 -04:00
│ ├── oidc.ts: Loads and validates an OIDC configuration (if available).
2025-03-29 14:12:15 -04:00
│ ├── roles.ts: Contains information about authentication permissions.
2025-03-20 15:30:34 -04:00
│ ├── sessions.ts: Initializes the session store and methods to manage it.