alex 1021d61be3 refactor: organize frontend components into features/ directories
Moved 43 component files into 9 feature domains:
- features/git/ — commit-dialog, commit-panel, file-editor, git-mount-editor,
  git-toolbar, merge-dialog
- features/project/ — repositories-settings-tab, repository-create-dialog
- features/terminal/ — special-keys-panel, special-keys-strip,
  terminal-session-tabs, terminal
- features/workspace/ — workspace-card, workspace-create-form,
  workspace-header, workspace-instance-chips
- features/session/ — create-session-form, session-card, session-list
- features/tool/ — instance-list, manifest-editor, start-tool-fab,
  start-tool-modal, tool-starter, tools-bottom-sheet
- features/notification/ — event-toast-bridge, notification-center,
  notification-item
- features/settings/ — settings-tab-layout
- features/mobile/ — mobile-action-sheet, mobile-detail-view, mobile-edit-view,
  mobile-fab, mobile-list-view, mobile-nav, mobile-page-header,
  mobile-terminal-header, mobile-terminal-wrapper

Updated all imports across pages and components.
Root components/ now only contains generic UI pieces:
app-shell, code-editor, data-states, icon, protected-route, syntax-highlighter.

Quality gates: verified no remaining old imports.
2026-06-04 12:37:24 +02:00
2026-05-24 17:58:39 +00:00

Headquarter

A self-hosted platform for managing projects, git repositories, and development tools with OAuth2 authentication.

Overview

Headquarter provides a centralized workspace for development teams to:

  • Manage projects and their associated git repositories
  • Browse repository files and view git history
  • Spawn development tools (VS Code Server, Jupyter Notebook, etc.)
  • Manage SSH keys and user preferences

Features

Project Management

  • Create and manage projects
  • View all projects in a dashboard
  • Click any project to open its workspace

Git Repository Management

  • Initialize bare repositories
  • Clone repositories (including mirror clones)
  • Smart URL parsing (converts browser URLs to git URLs)
  • View repository history and commit details

Repository Workspace

  • Browse files and directories
  • View file contents with syntax highlighting
  • Switch between branches
  • Quick file editing with automatic commits

Git History Visualization

  • View commit history with branch graph
  • See commit details, statistics, and diffs
  • Filter by branch

Authentication

  • OAuth2 via Authentik
  • Session-based authentication
  • User profile management

Tool Management

  • Built-in tool types (code-server, jupyter-notebook)
  • Create custom tool types with Docker Compose templates
  • Template validation

User Settings

  • Theme selection (system/light/dark)
  • Git identity configuration
  • Default editor preference

SSH Key Management

  • Generate Ed25519 key pairs
  • Copy public keys to clipboard
  • Delete keys

Quick Start

Prerequisites

  • Docker and Docker Compose
  • Git

Local Development

  1. Clone the repository:

    git clone <repository-url>
    cd headquarter
    
  2. Set up environment:

    cp .env.example .env
    # Edit .env with your settings
    
  3. Start services:

    docker compose up -d
    
  4. Access the application:

Production Deployment

See Deployment Guide for production setup with Traefik and Authentik.

Tech Stack

Backend

  • FastAPI - Python web framework
  • SQLAlchemy - ORM with async PostgreSQL support
  • Pydantic - Data validation
  • Alembic - Database migrations
  • python-jose - JWT handling

Frontend

  • React - UI library
  • TypeScript - Type safety
  • Vite - Build tool
  • React Router - Client-side routing

Infrastructure

  • Docker - Containerization
  • PostgreSQL - Database
  • Traefik - Reverse proxy (production)
  • Authentik - Identity provider

Documentation

Project Structure

.
├── apps/
│   ├── api/              # FastAPI backend
│   │   ├── src/
│   │   │   ├── api/      # API routes
│   │   │   ├── auth/     # Authentication
│   │   │   ├── models/   # Database models
│   │   │   └── utils/    # Utilities
│   │   ├── tests/        # Test suite
│   │   └── Dockerfile
│   └── web/              # React frontend
│       ├── src/
│       │   ├── api/      # API clients
│       │   ├── components/# UI components
│       │   └── pages/    # Page components
│       └── Dockerfile
├── docs/                 # Documentation
├── docker-compose.yml    # Development setup
├── docker-compose.traefik.yml  # Production setup
└── Makefile             # Common commands

Development

Backend Development

cd apps/api
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
uvicorn src.main:app --reload

Frontend Development

cd apps/web
npm install
npm run dev

Running Tests

# Backend tests
make test

# Frontend tests
make test-web

# All quality gates
make lint
make typecheck

Configuration

Key environment variables:

Variable Description Default
API_DOMAIN API domain localhost
WEB_DOMAIN Web domain localhost
AUTHENTIK_DOMAIN Authentik domain -
AUTHENTIK_CLIENT_ID OAuth client ID -
AUTHENTIK_CLIENT_SECRET OAuth client secret -
DATABASE_URL PostgreSQL URL -
JWT_SECRET JWT signing secret -
REPO_BASE_PATH Repository storage path /data/repos

See Environment Variables for complete list.

License

[License information]

S
Description
No description provided
Readme 10 MiB
Languages
Python 53.8%
TypeScript 36.7%
CSS 5%
HTML 3.4%
Dockerfile 0.4%
Other 0.6%