How jlnetosci/astra works
Project type and purpose
• ASTRAviewer is a Streamlit-based web application for visualizing family trees (GEDCOM files) as 2D or 3D network “star maps.”
• It loads GEDCOM files (either uploaded by users or from the sample gedcom_files/ folder), parses them into a graph, and renders interactive visualizations in the browser.
File structure
• Top-level files
• app.py – main Streamlit app entry point
• Dockerfile, .streamlit/config.toml, requirements.txt – containerization and config
• README.md, CHANGELOG.md, LICENSE – documentation and metadata
• Directories
• pages/ – Streamlit multipage modules (contact-form, faq, instructions)
• gedcom_files/ – sample GEDCOM datasets, organized into subfolders
• img/ – static assets (logo, palette previews, example screenshots)
• There is no external database—all parsing and visualization are in-memory on the Python backend.
README for additional insights
• Visualization engines:
• 2D uses a physics simulation (likely networkx + vis.js)
• 3D uses a static layout + WebGL rotation/zoom
Main components & interactions
a. User (Browser)
• Interacts via HTTP to the Streamlit server, uploads files, clicks buttons, and views canvases.
b. Streamlit App Server
• app.py + pages/ – renders UI, handles routing between pages.
• File Upload Handler – accepts GEDCOM files from users.
• GEDCOM Parser Module – reads .ged files into an internal graph representation (e.g., via a GEDCOM-parsing library).
• Graph Processing / Layout Engine – builds nodes/edges, computes 2D physics layout or 3D coordinates.
• Visualization Renderer – outputs interactive network visuals (e.g., via vis.js embed or Plotly).
c. Static Assets
• img/ provides logos and example images used in the UI.
• gedcom_files/ supplies built-in sample files that can be loaded without upload.
d. Container & Deployment
• Docker container (via Dockerfile) hosting a Python runtime with dependencies from requirements.txt.
• .streamlit/config.toml configures server port, credentials, and UI theming.
Architectural patterns & design principles
• Client-Server (Browser ↔ Streamlit): all UI and business logic run on the server; the browser is a thin client.
• Modular multipage design: Streamlit’s pages/ directory partitions UI concerns (FAQ, Contact, Instructions, main viewer).
• Event-driven UI: user actions (file upload, button click, dropdown changes) trigger re-runs of Streamlit scripts.
• In-memory processing: no persistence layer—graphs exist only during session.