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:
| Parameter | Default | Range | Description |
|---|---|---|---|
repulsionStrength | 200 | 0-1000 | Coulomb repulsion between nodes |
springLength | 8 | 1-50 | Natural edge length |
springStrength | 1.0 | 0-5 | Edge stiffness (Hooke's law) |
centerStrength | 0.05 | 0-1 | Gravity toward center |
damping | 0.8 | 0-1 | Velocity decay per frame |
boundaryRadius | 50 | 10-200 | Containment sphere radius |
boundaryStrength | 2.0 | 0-10 | Force at boundary |
Namespace Clustering
Group nodes by Lean namespace:
| Parameter | Default | Description |
|---|---|---|
clusteringEnabled | false | Enable namespace clustering |
clusteringStrength | 0.1 | Intra-cluster attraction |
clusterSeparation | 0.3 | Inter-cluster repulsion |
clusteringDepth | 1 | Namespace nesting depth |
Adaptive Springs
Density-aware edge lengths:
| Parameter | Default | Description |
|---|---|---|
adaptiveSpringEnabled | true | Enable adaptive lengths |
adaptiveSpringMode | sqrt | linear, logarithmic, or sqrt |
adaptiveSpringScale | 0.5 | Scaling factor |
Community Layout
Layout based on detected communities:
| Parameter | Default | Description |
|---|---|---|
communityAwareLayout | true | Enable community-aware forces |
communitySameMultiplier | 0.2 | Tighten same-community edges |
communityCrossMultiplier | 5.0 | Loosen cross-community edges |
communityClusteringStrength | 2.0 | Community center attraction |
communitySeparation | 3.0 | Distance between communities |
Lens Settings
Default values for different visualization lenses:
| Setting | Default | Description |
|---|---|---|
nHop | 2 | Ego network depth (1-5) |
maxDepth | 10 | Dependency tree max depth |
namespaceDepth | 2 | Namespace aggregation depth (1-4) |
collapseThreshold | 1 | Minimum 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,octahedrondodecahedron,icosahedron,cone,cylindertorus,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:
| Name | Value | Usage |
|---|---|---|
| Deep Red | #7a0101 | Accents |
| Red | #be1420 | Primary actions |
| Cream | #fbf0d9 | Headings, highlights |
| Deep Blue | #012f48 | Dark backgrounds |
| Steel Blue | #669aba | Links, active states |
Environment Variables
For development and deployment:
| Variable | Default | Description |
|---|---|---|
PORT | 3456 | Frontend port |
BACKEND_PORT | 8765 | Backend API port |
NEXT_PUBLIC_DEV_MODE | false | Enable dev features |
Performance Tuning
For large projects (1000+ nodes):
- Use Namespace Lens - Aggregates by namespace
- Reduce
maxDepth- Limit dependency tree depth - Enable adaptive springs - Prevents node crowding
- Lower
repulsionStrength- Faster convergence
For small projects (< 100 nodes):
- Use Full Graph Lens - See everything at once
- Increase
springLength- More spacing - Disable adaptive springs - Uniform layout