Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e0f774c
setup: npm workspaces: client, server, shared; vitest, docker
arthurpankiewicz Dec 23, 2025
408a875
project setup, devcontainer/docker configs, e2e
arthurpankiewicz Dec 24, 2025
545a650
Added packages for e2e, fixed storybook and added spec kit
avinavdixit25 Dec 24, 2025
bccf72b
use loader for ts-node
arthurpankiewicz Dec 24, 2025
11d3ac4
Updated usage of react-query through spec kit and updated trpc mockin…
avinavdixit25 Dec 24, 2025
ea13823
package lock
arthurpankiewicz Dec 24, 2025
a1bf65a
merge latest changes
arthurpankiewicz Dec 24, 2025
1b6242f
nvm configs, packagelock
arthurpankiewicz Dec 24, 2025
870114a
go back to tsx due to weird node issues; fix exports in shared, env f…
arthurpankiewicz Dec 24, 2025
3a4dfae
fix devcontainer startup scripts & package-lock issues; playwright pkgs
arthurpankiewicz Dec 25, 2025
c7d6e0b
Fixed devcontainer not working in mac intel and fixed test cases
avinavdixit25 Dec 29, 2025
3f50430
Added header and nav bar
avinavdixit25 Dec 29, 2025
540b6fd
implement case details
arthurpankiewicz Dec 29, 2025
1e7e837
merge setup/project & resolve conflicts
arthurpankiewicz Dec 29, 2025
dc8a646
Merge pull request #4 from bitovi/002-header-menu-components
arthurpankiewicz Dec 29, 2025
6e699b7
more components & styles for base app
arthurpankiewicz Dec 30, 2025
daf43c6
routing
arthurpankiewicz Dec 30, 2025
3c90b48
Updated constitution file and added stories for latest changes
avinavdixit25 Dec 30, 2025
e440439
Added e2e and unit tests
avinavdixit25 Dec 30, 2025
5ce2961
fix types, build issues
arthurpankiewicz Dec 30, 2025
3a0826c
Move the ui folder and added types.ts file to follow the modlet pattern
avinavdixit25 Dec 30, 2025
d34ca9a
Added collapsible/expandable functionality to the menu bar
avinavdixit25 Dec 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
FROM node:24-bookworm

# Install system dependencies and Playwright dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
python3 \
make \
g++ \
pkg-config \
# Playwright dependencies for Chromium
libnss3 \
libnspr4 \
libdbus-1-3 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libdrm2 \
libxkbcommon0 \
libxcomposite1 \
libxdamage1 \
libxfixes3 \
libxrandr2 \
libgbm1 \
libpango-1.0-0 \
libcairo2 \
libasound2 \
libatspi2.0-0 \
# Additional Playwright system dependencies
fonts-ipafont-gothic \
fonts-freefont-ttf \
fonts-liberation \
fonts-noto-color-emoji \
fonts-tlwg-loma-otf \
fonts-unifont \
fonts-wqy-zenhei \
libelf1 \
libfontenc1 \
libgl1 \
libgl1-mesa-dri \
libglapi-mesa \
libglvnd0 \
libglx-mesa0 \
libglx0 \
libice6 \
libllvm15 \
libpciaccess0 \
libsensors-config \
libsensors5 \
libsm6 \
libunwind8 \
libx11-xcb1 \
libxaw7 \
libxcb-dri2-0 \
libxcb-dri3-0 \
libxcb-glx0 \
libxcb-present0 \
libxcb-randr0 \
libxcb-sync1 \
libxcb-xfixes0 \
libxfont2 \
libxkbfile1 \
libxmu6 \
libxshmfence1 \
libxt6 \
libxxf86vm1 \
libz3-4 \
x11-xkb-utils \
xfonts-encodings \
xfonts-scalable \
xfonts-utils \
xserver-common \
xvfb \
# Additional GTK/X11 dependencies for Playwright
libxcursor1 \
libgtk-3-0 \
libpangocairo-1.0-0 \
libcairo-gobject2 \
libgdk-pixbuf2.0-0 \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /workspaces/carton-case-management
39 changes: 39 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "Carton Case Management",
"dockerComposeFile": "../docker-compose.dev.yaml",
"service": "app",
"workspaceFolder": "/workspaces/carton-case-management",
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
},
"postCreateCommand": "cp -n packages/server/.env.example packages/server/.env || true && npm install && npm run setup",
"postStartCommand": "npm run dev",
"forwardPorts": [5173, 3001, 6006, 9323],
"portsAttributes": {
"5173": {
"label": "Client",
"onAutoForward": "openPreview"
},
"3001": {
"label": "Server",
"onAutoForward": "ignore"
},
"6006": {
"label": "Storybook",
"onAutoForward": "ignore"
},
"9323": {
"label": "Playwright Report",
"onAutoForward": "openPreview"
}
},
"containerEnv": {
"NODE_ENV": "development",
"DATABASE_URL": "file:./prisma/dev.db"
},
"customizations": {
"vscode": {
"extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "Prisma.prisma"]
}
}
}
20 changes: 20 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
node_modules
.git
.env
.env.*
!.env.example
*.db
*.db-journal
*.sqlite
dist
build
.next
coverage
test-results
.playwright
.storybook-static
*.log
.DS_Store
.vscode
.devcontainer
README.md
9 changes: 9 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Database (SQLite local file path)
DATABASE_URL="file:./prisma/dev.db"

# Server
PORT=3001
NODE_ENV=development

# Client
VITE_API_URL=http://localhost:3001
44 changes: 44 additions & 0 deletions .github/agents/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# carton-case-management Development Guidelines

Auto-generated from all feature plans. Last updated: 2025-12-24

## Active Technologies
- TypeScript 5.7.2 + React 18.3, Vite 4.x, Tailwind CSS, Radix UI (Shadcn), React Router 7.1, Lucide React (icons) (004-collapsible-menu)
- Browser localStorage for menu state persistence (no backend storage required) (004-collapsible-menu)

- TypeScript 5.x (via Node.js runtime in devcontainer) + React 18, Vite, tRPC, React Query, Shadcn UI, Tailwind CSS (002-header-menu-components)
- N/A (UI components only, no data persistence required) (002-header-menu-components)

- TypeScript 5.x / Node.js 22+ + React 18, tRPC 11, @tanstack/react-query 5, Vite 6, Prisma (ORM) (001-trpc-react-query)

## Project Structure

```text
src/
tests/
```

## Commands

npm test && npm run lint

## Code Style

TypeScript 5.x / Node.js 22+: Follow standard conventions

## Coding Standards

- When creating new React files ensure to follow the details specified in .github/prompts/modlet.prompt.md.
- No tsx or ts files should have inline comments.
- All styling should be done using Tailwind CSS classes in an external CSS file.
- Responsive designing should be implemented using Tailwind CSS utilities.

## Recent Changes
- 004-collapsible-menu: Added TypeScript 5.7.2 + React 18.3, Vite 4.x, Tailwind CSS, Radix UI (Shadcn), React Router 7.1, Lucide React (icons)

- 002-header-menu-components: Added TypeScript 5.x (via Node.js runtime in devcontainer) + React 18, Vite, tRPC, React Query, Shadcn UI, Tailwind CSS

- 001-trpc-react-query: Added TypeScript 5.x / Node.js 22+ + React 18, tRPC 11, @tanstack/react-query 5, Vite 6, Prisma (ORM)

<!-- MANUAL ADDITIONS START -->
<!-- MANUAL ADDITIONS END -->
184 changes: 184 additions & 0 deletions .github/agents/speckit.analyze.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
---
description: Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
---

## User Input

```text
$ARGUMENTS
```

You **MUST** consider the user input before proceeding (if not empty).

## Goal

Identify inconsistencies, duplications, ambiguities, and underspecified items across the three core artifacts (`spec.md`, `plan.md`, `tasks.md`) before implementation. This command MUST run only after `/speckit.tasks` has successfully produced a complete `tasks.md`.

## Operating Constraints

**STRICTLY READ-ONLY**: Do **not** modify any files. Output a structured analysis report. Offer an optional remediation plan (user must explicitly approve before any follow-up editing commands would be invoked manually).

**Constitution Authority**: The project constitution (`.specify/memory/constitution.md`) is **non-negotiable** within this analysis scope. Constitution conflicts are automatically CRITICAL and require adjustment of the spec, plan, or tasks—not dilution, reinterpretation, or silent ignoring of the principle. If a principle itself needs to change, that must occur in a separate, explicit constitution update outside `/speckit.analyze`.

## Execution Steps

### 1. Initialize Analysis Context

Run `.specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks` once from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS. Derive absolute paths:

- SPEC = FEATURE_DIR/spec.md
- PLAN = FEATURE_DIR/plan.md
- TASKS = FEATURE_DIR/tasks.md

Abort with an error message if any required file is missing (instruct the user to run missing prerequisite command).
For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").

### 2. Load Artifacts (Progressive Disclosure)

Load only the minimal necessary context from each artifact:

**From spec.md:**

- Overview/Context
- Functional Requirements
- Non-Functional Requirements
- User Stories
- Edge Cases (if present)

**From plan.md:**

- Architecture/stack choices
- Data Model references
- Phases
- Technical constraints

**From tasks.md:**

- Task IDs
- Descriptions
- Phase grouping
- Parallel markers [P]
- Referenced file paths

**From constitution:**

- Load `.specify/memory/constitution.md` for principle validation

### 3. Build Semantic Models

Create internal representations (do not include raw artifacts in output):

- **Requirements inventory**: Each functional + non-functional requirement with a stable key (derive slug based on imperative phrase; e.g., "User can upload file" → `user-can-upload-file`)
- **User story/action inventory**: Discrete user actions with acceptance criteria
- **Task coverage mapping**: Map each task to one or more requirements or stories (inference by keyword / explicit reference patterns like IDs or key phrases)
- **Constitution rule set**: Extract principle names and MUST/SHOULD normative statements

### 4. Detection Passes (Token-Efficient Analysis)

Focus on high-signal findings. Limit to 50 findings total; aggregate remainder in overflow summary.

#### A. Duplication Detection

- Identify near-duplicate requirements
- Mark lower-quality phrasing for consolidation

#### B. Ambiguity Detection

- Flag vague adjectives (fast, scalable, secure, intuitive, robust) lacking measurable criteria
- Flag unresolved placeholders (TODO, TKTK, ???, `<placeholder>`, etc.)

#### C. Underspecification

- Requirements with verbs but missing object or measurable outcome
- User stories missing acceptance criteria alignment
- Tasks referencing files or components not defined in spec/plan

#### D. Constitution Alignment

- Any requirement or plan element conflicting with a MUST principle
- Missing mandated sections or quality gates from constitution

#### E. Coverage Gaps

- Requirements with zero associated tasks
- Tasks with no mapped requirement/story
- Non-functional requirements not reflected in tasks (e.g., performance, security)

#### F. Inconsistency

- Terminology drift (same concept named differently across files)
- Data entities referenced in plan but absent in spec (or vice versa)
- Task ordering contradictions (e.g., integration tasks before foundational setup tasks without dependency note)
- Conflicting requirements (e.g., one requires Next.js while other specifies Vue)

### 5. Severity Assignment

Use this heuristic to prioritize findings:

- **CRITICAL**: Violates constitution MUST, missing core spec artifact, or requirement with zero coverage that blocks baseline functionality
- **HIGH**: Duplicate or conflicting requirement, ambiguous security/performance attribute, untestable acceptance criterion
- **MEDIUM**: Terminology drift, missing non-functional task coverage, underspecified edge case
- **LOW**: Style/wording improvements, minor redundancy not affecting execution order

### 6. Produce Compact Analysis Report

Output a Markdown report (no file writes) with the following structure:

## Specification Analysis Report

| ID | Category | Severity | Location(s) | Summary | Recommendation |
|----|----------|----------|-------------|---------|----------------|
| A1 | Duplication | HIGH | spec.md:L120-134 | Two similar requirements ... | Merge phrasing; keep clearer version |

(Add one row per finding; generate stable IDs prefixed by category initial.)

**Coverage Summary Table:**

| Requirement Key | Has Task? | Task IDs | Notes |
|-----------------|-----------|----------|-------|

**Constitution Alignment Issues:** (if any)

**Unmapped Tasks:** (if any)

**Metrics:**

- Total Requirements
- Total Tasks
- Coverage % (requirements with >=1 task)
- Ambiguity Count
- Duplication Count
- Critical Issues Count

### 7. Provide Next Actions

At end of report, output a concise Next Actions block:

- If CRITICAL issues exist: Recommend resolving before `/speckit.implement`
- If only LOW/MEDIUM: User may proceed, but provide improvement suggestions
- Provide explicit command suggestions: e.g., "Run /speckit.specify with refinement", "Run /speckit.plan to adjust architecture", "Manually edit tasks.md to add coverage for 'performance-metrics'"

### 8. Offer Remediation

Ask the user: "Would you like me to suggest concrete remediation edits for the top N issues?" (Do NOT apply them automatically.)

## Operating Principles

### Context Efficiency

- **Minimal high-signal tokens**: Focus on actionable findings, not exhaustive documentation
- **Progressive disclosure**: Load artifacts incrementally; don't dump all content into analysis
- **Token-efficient output**: Limit findings table to 50 rows; summarize overflow
- **Deterministic results**: Rerunning without changes should produce consistent IDs and counts

### Analysis Guidelines

- **NEVER modify files** (this is read-only analysis)
- **NEVER hallucinate missing sections** (if absent, report them accurately)
- **Prioritize constitution violations** (these are always CRITICAL)
- **Use examples over exhaustive rules** (cite specific instances, not generic patterns)
- **Report zero issues gracefully** (emit success report with coverage statistics)

## Context

$ARGUMENTS
Loading