Configuration

Configure Astrolabe's visualization, physics, and analysis settings.

Astrolabe can be configured through the UI settings panel or by modifying configuration files.

Physics Parameters

Control the force-directed layout simulation:

ParameterDefaultRangeDescription
repulsionStrength2000-1000Coulomb repulsion between nodes
springLength81-50Natural edge length
springStrength1.00-5Edge stiffness (Hooke's law)
centerStrength0.050-1Gravity toward center
damping0.80-1Velocity decay per frame
boundaryRadius5010-200Containment sphere radius
boundaryStrength2.00-10Force at boundary

Namespace Clustering

Group nodes by Lean namespace:

ParameterDefaultDescription
clusteringEnabledfalseEnable namespace clustering
clusteringStrength0.1Intra-cluster attraction
clusterSeparation0.3Inter-cluster repulsion
clusteringDepth1Namespace nesting depth

Adaptive Springs

Density-aware edge lengths:

ParameterDefaultDescription
adaptiveSpringEnabledtrueEnable adaptive lengths
adaptiveSpringModesqrtlinear, logarithmic, or sqrt
adaptiveSpringScale0.5Scaling factor

Community Layout

Layout based on detected communities:

ParameterDefaultDescription
communityAwareLayouttrueEnable community-aware forces
communitySameMultiplier0.2Tighten same-community edges
communityCrossMultiplier5.0Loosen cross-community edges
communityClusteringStrength2.0Community center attraction
communitySeparation3.0Distance between communities

Lens Settings

Default values for different visualization lenses:

SettingDefaultDescription
nHop2Ego network depth (1-5)
maxDepth10Dependency tree max depth
namespaceDepth2Namespace aggregation depth (1-4)
collapseThreshold1Minimum nodes to show namespace

Theme Configuration

Themes are defined in assets/themes/default.json:

Node Type Styles

{
  "nodeTypes": {
    "theorem": {
      "color": "#A855F7",
      "sizeMultiplier": 1.2,
      "shape": "sphere"
    },
    "lemma": {
      "color": "#6366F1",
      "sizeMultiplier": 0.7,
      "shape": "tetrahedron"
    }
  }
}

Available Shapes

  • sphere, box, tetrahedron, octahedron
  • dodecahedron, icosahedron, cone, cylinder
  • torus, torusKnot, ring, capsule

Edge Styles

{
  "edgeTypes": {
    "from_lean": {
      "color": "#2ecc71",
      "width": 1.0,
      "style": "solid"
    },
    "custom": {
      "color": "#888888",
      "width": 0.8,
      "style": "dashed"
    }
  }
}

Available styles: solid, dashed, dotted, wavy

Color Palette

Brand colors used throughout the UI:

NameValueUsage
Deep Red#7a0101Accents
Red#be1420Primary actions
Cream#fbf0d9Headings, highlights
Deep Blue#012f48Dark backgrounds
Steel Blue#669abaLinks, active states

Environment Variables

For development and deployment:

VariableDefaultDescription
PORT3456Frontend port
BACKEND_PORT8765Backend API port
NEXT_PUBLIC_DEV_MODEfalseEnable dev features

Performance Tuning

For large projects (1000+ nodes):

  1. Use Namespace Lens - Aggregates by namespace
  2. Reduce maxDepth - Limit dependency tree depth
  3. Enable adaptive springs - Prevents node crowding
  4. Lower repulsionStrength - Faster convergence

For small projects (< 100 nodes):

  1. Use Full Graph Lens - See everything at once
  2. Increase springLength - More spacing
  3. Disable adaptive springs - Uniform layout