stcapp

Structural Tension Chart (STC) Application

A Next.js web application for creating and managing Structural Tension Charts - a powerful methodology for bridging the gap between your current reality and desired goals through strategic action planning.

Built with Next.js TypeScript Tailwind CSS

What is a Structural Tension Chart?

A Structural Tension Chart visualizes the creative tension between:

This framework, popularized by Robert Fritz in β€œThe Path of Least Resistance,” helps transform structural conflicts into creative tension that naturally moves you toward your desired outcomes.

Key Features

🎯 Three-Section Visual Architecture

πŸ”­ Infinite Telescopic Navigation

πŸ“… Due Date Management

🎨 Structural Design Language

Architecture

Frontend Stack

Data Layer

Key Components

``` β”œβ”€β”€ master-chart-form.tsx # Chart creation/editing β”œβ”€β”€ date-picker.tsx # Enhanced DatePicker component β”œβ”€β”€ action-telescope-view.tsx # Telescopic action navigation └── master-charts/[id]/ # Main chart detail view ```

Getting Started

Prerequisites

Installation

```bash

Clone and install

git clone cd stcapp pnpm install

Initialize database

pnpm run setup-db

Configure your Postgres connection

export DATABASE_URL=postgres://user:pass@localhost:5432/stcapp

Start development server

pnpm dev ```

Usage Flow

  1. Create a Chart: Define your goal and current reality
  2. Add Actions: Break down the path from reality to goal
  3. Set Due Dates: Add temporal structure to your actions
  4. Telescope Actions: Drill into any action for detailed sub-planning
  5. Navigate Hierarchy: Use breadcrumbs to move between chart levels

Database Schema

```sql – Master Charts (Parent level) CREATE TABLE master_charts ( id INTEGER PRIMARY KEY AUTOINCREMENT, title TEXT NOT NULL, goal TEXT NOT NULL, current_reality TEXT, created_at DATETIME DEFAULT CURRENT_TIMESTAMP );

– Actions (Can reference parent chart or parent action) CREATE TABLE actions ( id INTEGER PRIMARY KEY AUTOINCREMENT, master_chart_id INTEGER NOT NULL, parent_action_id INTEGER, title TEXT NOT NULL, description TEXT, due_date DATETIME, completed BOOLEAN DEFAULT 0, created_at DATETIME DEFAULT CURRENT_TIMESTAMP ); ```

Development

Project Structure

``` src/stcapp/ β”œβ”€β”€ app/ β”‚ β”œβ”€β”€ master-charts/ # Chart CRUD pages β”‚ β”œβ”€β”€ api/ # Backend API routes β”‚ └── globals.css # Global styles β”œβ”€β”€ components/ # Reusable UI components └── lib/ # Utilities and database ```

Key Patterns

Contributing

This application embodies the Structural Tension Chart methodology - any contributions should preserve the three-section architecture and telescopic navigation capabilities that make this framework effective.

License

MIT License - Build your own tension-resolving applications!

Running Tests

The repository includes a bash-based suite that validates all API endpoints. For a quick demo:

pnpm install
./scripts/run-tests-with-server.sh

This starts the dev server, waits for it to be ready, runs every test, and shuts the server down. See tests/README.md for details.