An account-free Streamlit learning app for practicing SWOT classification and TOWS strategy pairing across ten fictional business cases.
Requires Python 3.10+ and Streamlit 1.56+.
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
streamlit run app.pyEach activity follows Brief → Practice → Review:
- Brief: read the case, the strategic decision, the decision horizon, and the practice target. Figures and regulations are fictional case assumptions, not current market or legal guidance.
- Classify factors: work through readable factors using category buttons. Use the two-by-two SWOT board to compare your choices, jump to another factor, or undo a choice. “Not relevant to this decision” sits outside the four quadrants.
- Build strategies: connect one internal factor to one external condition. Optional strategy reflections are saved with the pairing but are not automatically graded. The collection groups strategies into SO, ST, WO, and WT.
- Review: start with responses that need attention, inspect full factor text and explanations, and revise without losing your answers. A worked solution is available through an explicit assisted-study action.
Use All scenarios to choose or resume any case and either activity. Classification and pairing maintain separate drafts and results. You can continue without passing or revealing answers. The first case is a shorter starting point; cases otherwise follow a stable order rather than a randomized session.
These are transparent practice checkpoints, not validated measures of mastery:
| Activity | Practice target |
|---|---|
| Classification | Decide on every factor and match at least 75% of decisions to the rubric, rounded up. Correct relevance decisions count. |
| Strategy pairing | Find the case’s authored-match target (5 for cases 1–9, 6 for case 10), with at least 75% of submitted pairings supported by the rubric. Authored matches and defensible alternatives both count as supported. |
The pairing quality requirement prevents submitting every possible combination from satisfying the target. Authored matches and acceptable alternatives retain their explanations. An unlisted strategy is described as unsupported by this exercise’s rubric, rather than inherently impossible.
Progress distinguishes:
- Not started and In progress.
- Passed independently: the target was reached on the first submission without viewing the worked solution.
- Practice target reached: the target was reached through revision after feedback.
- Studied with answers: the worked solution was viewed. Subsequent practice does not turn this into an independent pass.
An earlier independent pass is retained if a learner later studies the solution. First and latest submission results remain separate. Classification scores use all factors as their denominator, including unanswered factors; pairing results show authored-match coverage and supported-selection rate separately. Try a fresh case to check transfer of learning.
Relevance exercises use clearly unrelated details with specific explanations. Plausible business capabilities are not treated as irrelevant simply because they lack an authored pairing. Cases include explicit decisions and a 12–24 month decision horizon.
Work is stored in Streamlit session state while the app runs and checkpointed to localStorage in the current browser. Reloading or restarting the server restores the last successfully applied checkpoint. Text inputs apply when you leave the field or use the widget’s submit shortcut; an uncommitted keystroke is not a saved checkpoint.
The app only shows a browser-save acknowledgement after storage succeeds. If browser storage is unavailable, the learning activity still works and the save status points to the backup option.
Open Your work in the main header to:
- Download a portable JSON backup.
- Validate and restore a backup, replacing the current draft only after validation succeeds.
- Clear the saved drafts and results from this browser.
There are no accounts, backend database, or automatic cross-device sync. Clearing browser storage removes the local checkpoint. Tabs on the same origin share the same checkpoint; use one active tab to avoid overwriting another tab’s work. On a shared device, download a backup and clear saved work before leaving. Browser storage is scoped to the deployment’s origin, so local development and Community Cloud have separate checkpoints.
Backups are bounded, versioned JSON. They contain drafts, reflections, and exercise progress; they are not credentials or certified assessment records. Existing pre-redesign sessions are not migrated.
pip install -r requirements-dev.txt
pytestThe regression suite covers scenario integrity, scoring, activity separation, revision history, assisted study, and backup validation. Browser checks should cover native widget interaction, refresh recovery, backup/restore, touch-size layouts, keyboard interaction, and zoom/reflow. Playwright is optional development tooling, not an app dependency.
The active application uses native Streamlit widgets and a small v2 component solely for browser recovery. Shared styling and escaped, read-only SWOT boards live in ui/theme.py. No external fonts, icon packages, drag library, or LLM are required.
app.py Navigation and Brief → Practice → Review orchestration
ui/scenario_panel.py Decision brief and contextual framework reference
ui/workspace.py Guided classification, undo, and board editor
ui/matrix_panel.py Pair builder and strategy collection
ui/feedback_panel.py Filtered review and worked solutions
ui/theme.py Shared styles, labels, step indicator, SWOT board
ui/persistence.py Browser checkpoint and recovery component
utils/progress.py Drafts, submissions, status, validated JSON backups
engine/ Deterministic rubrics and feedback
data/scenarios.py Ten business cases and authored pair explanations
data/learning.py Decision framing and relevance rationales
Older UI modules (ui/components.py, root-level ui_*.py, data.py, and utils/state.py) are retained as legacy reference and are not imported by the active application. New work should use the modules above.
MIT — see LICENSE.