How adityacodes-root/taskprism works
1. Project shape
- This repository is a very small, single-app Streamlit project centered on one runtime entrypoint: app.py.
- There is no separate backend, database, or service layer in the repo; the application is mostly an interactive, in-memory analytics tool.
2. Primary user interface
- The UI is built in Streamlit and runs as a web app.
- User interaction happens through sidebar controls for task count, graph density, resource count, and per-task fields like duration, deadline, description, and priority.
3. Core domain model
- The app models the problem as tasks connected by dependencies.
- Tasks also carry scheduling metadata: duration, deadline, priority, and description.
- Resources are abstract execution lanes assigned to tasks through graph coloring.
4. Main algorithmic subsystem
- The central computation is a graph coloring–based allocation engine.
- It uses a dependency graph to assign resources while avoiding conflicts, and it incorporates task priority and timing constraints into the schedule interpretation.
- This is the architectural heart of the app: “generate graph → color graph → derive allocation/schedule.”
5. Data flow through the app
- The user configures task/resource parameters in the UI.
- The app generates a dependency graph with configurable density.
- That graph is processed into a resource allocation plan.
- The resulting allocation is then rendered as visualizations and tables, and can be exported for downstream use.
6. Graph and matrix representation
- The task network is represented with networkx, which is the graph computation layer.
- An adjacency matrix view is also produced for inspection, giving a second structural representation of the same task graph.
- These views are derived from the same underlying task/dependency model, not separate sources of truth.
7. Visualization subsystem
- Visual output is split across two plotting stacks:
- matplotlib for graph-style/static visualizations
- plotly for the interactive Gantt chart and timeline-oriented views
- Visuals are color-coded by assigned resource, so the allocation result is directly readable from the charts.
8. Scheduling and analysis outputs
- The app generates an execution timeline that reflects task duration and dependency ordering.
- It also performs basic analysis such as overdue-task detection and resource allocation overview.
- These are presentation-layer outputs derived from the same computed schedule, not independent workflows.
9. Export boundary
- The app can export task execution data as CSV.
- This is the main persistence/interop boundary in the system: the computed schedule is emitted for external analysis rather than stored in-app.
10. Technology stack and runtime
- The repo is Python-based and depends on streamlit, numpy, pandas, networkx, matplotlib, and plotly.
- pandas likely serves as the tabular data layer for task and schedule data, while numpy supports numerical generation/processing.
- The live deployment referenced in the README is Streamlit-hosted, but the repo itself remains self-contained.
11. Development environment
- The .devcontainer folder indicates support for containerized development, which helps standardize the Python environment for contributors.
- This affects developer setup, not the runtime architecture of the app.
12. Architectural summary
- The repo is best drawn as a single-page interactive application with one compute pipeline:
- Streamlit UI inputs feed an in-memory task graph generator
- which feeds a graph-coloring allocation/scheduling step
- which feeds visualizations, analysis, and CSV export
- There are no major distributed-system boundaries; the app is a self-contained analytical frontend with local algorithmic processing.
Main entry points: app.py Execution Plan · devcontainer.json Dev Container
Components 16
Runtime
Single Streamlit application and its in-memory compute pipeline.
- Streamlit UI · Interactive sidebar and page controls for task and resource parameters.
app.py - Task Inputs · Duration, deadline, description, and priority fields captured per task.
app.py - Scenario Params · Task count, graph density, and resource count settings.
app.py - Graph Generator · Creates the in-memory dependency graph from user-selected parameters.
app.py - NetworkX Graph · Graph computation layer used to represent tasks and dependencies.
app.py - Adjacency Matrix · Tabular matrix view derived from the same task/dependency graph.
app.py - Coloring Engine · Assigns resources by graph coloring while avoiding dependency conflicts.
app.py - Priority Logic · Factors task priority into allocation interpretation.
app.py - Timing Logic · Interprets duration and deadline constraints for schedule ordering.
app.py - Execution Plan · Derived task sequence and resource assignment for execution.
app.py - Gantt Timeline · Interactive timeline view of task execution across resources.
app.py - Graph View · Static graph-style visualization of tasks, dependencies, and colors.
app.py - Analysis View · Overdue-task detection and resource allocation overview.
app.py - Task Table · Pandas-backed view of task and schedule records.
app.py - CSV Export · Exports computed execution data for external analysis.
app.py
Dev Setup
Containerized contributor environment.
- Dev Container · Containerized Python development setup for contributors.
.devcontainer/devcontainer.json
Connections 18
- Streamlit UI → Scenario Params: configures · Users set scenario-wide task and resource counts.
- Streamlit UI → Task Inputs: enters · Users provide per-task metadata in the sidebar.
- Scenario Params → Graph Generator: drives · Scenario settings shape the generated dependency graph.
- Task Inputs → Graph Generator: populate · Per-task fields become nodes and attributes in the generated graph.
- Graph Generator → NetworkX Graph: builds · The dependency structure is materialized as a NetworkX graph.
- NetworkX Graph → Adjacency Matrix: derives · The same graph is rendered as an adjacency matrix.
- NetworkX Graph → Coloring Engine: feeds · Graph structure is the input to resource allocation.
- Coloring Engine → Priority Logic: applies · Priority affects how conflicts and assignments are interpreted.
- Coloring Engine → Timing Logic: applies · Duration and deadline rules shape the schedule result.
- Priority Logic → Execution Plan: influences · Priority-adjusted allocation contributes to the final plan.
- Timing Logic → Execution Plan: constrains · Timing metadata constrains ordering and execution windows.
- Coloring Engine → Execution Plan: produces · Allocation decisions are turned into an execution plan.
- Execution Plan → Gantt Timeline: renders · The plan is shown as a Gantt-style timeline.
- Execution Plan → Graph View: renders · The plan is also shown in a graph visualization.
- Execution Plan → Analysis View: summarizes · The schedule is checked for overdue tasks and resource usage.
- Execution Plan → Task Table: tabulates · Schedule records are formatted for inspection.
- Execution Plan → CSV Export: exports · Execution data can be emitted as CSV.
- Dev Container → Streamlit UI: supports · Development environment supports working on the Streamlit app.