Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,42 @@ The project follows Semantic Versioning.

---

## v1.3.0

### Added

#### Tactile artifact personalization and material stocks
- Added type-specific material stocks mapping artifact types to distinct paper stock tokens (`--stock-text`, `--stock-link`, `--stock-photo`, `--stock-issue`).
- Replaced deterministic ID-based color assignment with semantic material identities.
- Added distinct typographic voices: `--font-serif` (`EB Garamond`) for TEXT thoughts, `--font-mono` for metadata/indices, and Caveat handwriting for polaroid captions.
- Added tactile drop settle animation (`@keyframes nook-artifact-settle`) with shadow dampening on card landing.
- Added user-customizable paper tint palette (`cream`, `rose`, `sky`, `sage`, `lavender`, `butter`).
- Added accessible square swatch `TintPicker` component (`role="radiogroup"`, `role="radio"`, `aria-checked`, focus rings).
- Added `tint String?` column to the `Artifact` database model with migration `20261102120000_add_artifact_tint`.
- Added backend tint whitelist validation, update persistence, and unit test suites.

#### OAuth 2.0 authentication
- Added Google and GitHub OAuth 2.0 sign-in flows with automatic identity linking and reconciliation.
- Added `OAuthAccount` database model linking external identity providers to user accounts.
- Added `GET /auth/google`, `GET /auth/google/callback`, `GET /auth/github`, and `GET /auth/github/callback`.
- Added frontend OAuth buttons and auth callback route.
- Made user `passwordHash` optional to support pure OAuth users.

#### GitHub issue integration
- Added `GITHUB_ISSUE` artifacts as a first-class spatial artifact type.
- Added webhook ingress at `POST /webhooks/github` with HMAC-SHA256 signature verification.
- Added asynchronous RabbitMQ pipeline with publisher confirms, prefetch control, and reconnection handling.
- Added background worker runtime (`github-worker.ts`) consuming issues and syncing state transitions (`opened`, `edited`, `closed`, `reopened`).
- Added dead-letter queue (DLQ) routing after bounded retries for transient failures.
- Added transactional persistence and webhook delivery idempotency tracking.

#### Polaroid captions
- Added optional caption support (`caption?`) on `POLAROID` artifacts stored in artifact JSON.
- Added caption input in polaroid draft creation and inline double-click caption editing on the wall.
- Added single-line enforcement and a 48-character limit.

---

## v1.2.0

### Added
Expand Down
33 changes: 24 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Instead of forcing ideas into folders, documents, or rigid workflows, Nook lets
### Authentication

- User registration and login
- Google and GitHub OAuth 2.0 authentication with account linking
- JWT-based authentication
- Protected application routes
- Private user workspaces
Expand All @@ -25,11 +26,15 @@ Instead of forcing ideas into folders, documents, or rigid workflows, Nook lets
### Spatial workspace

- Workspace-based artifact model
- Text, link, and Polaroid artifacts
- Text, link, Polaroid (with captions), and GitHub Issue artifacts
- Type-specific paper stocks (`--stock-text`, `--stock-link`, `--stock-photo`, `--stock-issue`)
- User-selectable paper tint customization palette with accessible swatches
- Physical micro-interactions: lift on hover, hold on drag, and tactile settle on drop
- Distinct typographic voices (serif for thoughts, mono for metadata, handwriting for polaroid captions)
- Free positioning with persisted `x` / `y` coordinates
- Draft artifact creation
- Drag and reposition artifacts
- Inline text editing
- Inline text and caption editing
- Artifact deletion
- Multi-artifact selection and selection toolbar
- Foundation for future insight-oriented interactions
Expand Down Expand Up @@ -127,19 +132,21 @@ See [GitHub Integration](docs/integrations/github.md) for the implementation det

## Artifact model

Nook currently represents three artifact types:
Nook currently represents four artifact types:

| Type | Meaning | Stored content |
| ---------- | -------------------------- | -------------- |
| `TEXT` | “I thought this” | `{ text }` |
| `LINK` | “I found this” | `{ url }` |
| `POLAROID` | “I saw / experienced this” | `{ imageKey }` |
| Type | Meaning | Stored content |
| -------------- | -------------------------- | -------------------------------------------------------------- |
| `TEXT` | “I thought this” | `{ text }` |
| `LINK` | “I found this” | `{ url }` |
| `POLAROID` | “I saw / experienced this” | `{ imageKey, caption? }` |
| `GITHUB_ISSUE` | “I am tracking this” | `{ repository, issueNumber, title, body, state, url, author }` |

Spatial state is stored independently from artifact content:
Spatial state and customization are stored independently from artifact content:

- `x`
- `y`
- `zIndex`
- `tint` (custom paper tint override)
- `createdAt`
- `updatedAt`

Expand All @@ -153,6 +160,10 @@ The database schema lives in `backend/prisma/schema.prisma`.

- `POST /auth/register`
- `POST /auth/login`
- `GET /auth/google`
- `GET /auth/google/callback`
- `GET /auth/github`
- `GET /auth/github/callback`

### Workspaces

Expand All @@ -171,6 +182,10 @@ The database schema lives in `backend/prisma/schema.prisma`.

The image endpoint returns JSON containing a signed URL rather than redirecting the browser to Google Cloud Storage.

### Webhooks

- `POST /webhooks/github`

### Health

- `GET /health`
Expand Down
11 changes: 7 additions & 4 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ The current artifact vocabulary is:
- `TEXT`
- `LINK`
- `POLAROID`
- `GITHUB_ISSUE`

Components receive artifact data and interaction callbacks rather than directly owning persistence.

Expand Down Expand Up @@ -194,17 +195,19 @@ An artifact also belongs to a user.
The current artifact schema stores flexible type-specific content in PostgreSQL JSON:

```text
TEXT → { text }
LINK → { url }
POLAROID → { imageKey }
TEXT → { text }
LINK → { url }
POLAROID → { imageKey, caption? }
GITHUB_ISSUE → { repository, issueNumber, title, body, state, url, author }
```

Spatial properties remain first-class columns:
Spatial and customization properties remain first-class columns:

```text
x
y
zIndex
tint
```

This keeps positioning queryable without coupling the database schema to every artifact content shape.
Expand Down
6 changes: 6 additions & 0 deletions docs/design-system/interaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ The artifact is actively being repositioned.

Dragging updates the visual position immediately and persists the final position optimistically.

### Settling

The artifact has just been released from a drag and is landing on the desk surface.

A short keyframed settle animation (`--motion-settle` for notes, `--motion-pop` for photos) plays with shadow dampening to simulate physical landing. Grabbing the card again immediately interrupts the settle animation.

### Editing

The artifact is being edited.
Expand Down
15 changes: 14 additions & 1 deletion docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,17 @@ GCS_BUCKET_NAME=your-gcs-bucket
RABBITMQ_URL=amqp://guest:guest@localhost:5672

GITHUB_WEBHOOK_SECRET=your-local-webhook-secret

BACKEND_URL=http://localhost:3003

# Optional OAuth 2.0 configuration
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secret
```

Required backend variables:
Required and optional backend variables:

| Variable | Purpose |
| ----------------------- | ------------------------------------------------- |
Expand All @@ -73,6 +81,11 @@ Required backend variables:
| `GCS_BUCKET_NAME` | Google Cloud Storage bucket used for media |
| `RABBITMQ_URL` | RabbitMQ connection string |
| `GITHUB_WEBHOOK_SECRET` | Secret used to verify GitHub webhook signatures |
| `BACKEND_URL` | Optional; public backend URL for OAuth callbacks |
| `GOOGLE_CLIENT_ID` | Optional; Google OAuth 2.0 client ID |
| `GOOGLE_CLIENT_SECRET` | Optional; Google OAuth 2.0 client secret |
| `GITHUB_CLIENT_ID` | Optional; GitHub OAuth App client ID |
| `GITHUB_CLIENT_SECRET` | Optional; GitHub OAuth App client secret |

For local development involving Polaroid uploads, Google Cloud credentials must also be available to the Google Cloud Storage client through Application Default Credentials.

Expand Down
9 changes: 8 additions & 1 deletion frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ npm run dev

## Styling

The application relies on a structural design system using design tokens from `src/assets/nook-tokens.json`. All styling adheres strictly to the brand guidelines (sentence-case logo, structured block elements with 2px charcoal borders, and 24px rounded corners).
The application relies on plain CSS and semantic design tokens defined in `src/assets/styles/tokens/tokens.css` (no Tailwind, no external UI library). Component CSS uses CSS custom properties exclusively for color, typography, shape, and motion.

Key design principles (v2):
- **Tokens only**: No raw hex, raw radius, raw shadow, or raw font families in component CSS.
- **Square shape**: Cards, buttons, inputs, and controls use `--radius-0`. Only Polaroid frames use `--radius-paper`.
- **Typographic voices**: Serif (`EB Garamond`) for thoughts and display, sans (`Plus Jakarta Sans`) for UI, mono (`IBM Plex Mono`) for metadata, and handwriting (`Caveat`) for polaroid captions.
- **Tactile depth**: UI cards carry an ink border, lifting with offset shadows on hover and drag, and playing a subtle physical settle on drop.
- **Color has a job**: Paper stocks identify artifact type (`--stock-text`, `--stock-link`, `--stock-photo`, `--stock-issue`) or user-chosen tint overrides (`--tint-*`). Color is never picked from an ID.

## Architecture

Expand Down
69 changes: 3 additions & 66 deletions frontend/src/assets/styles/artifacts/artifact.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
transition:
transform var(--motion-lift),
box-shadow var(--motion-lift),
border-color var(--motion-lift);
border-color var(--motion-lift),
background-color var(--motion-settle);
}

/*
Expand Down Expand Up @@ -264,70 +265,6 @@
color: var(--accent-action);
}

/* ---------------------------------------------------------------
Tint picker — paper color palette
--------------------------------------------------------------- */

.nook-tint-picker {
display: flex;
align-items: center;
gap: 3px;
margin-right: 2px;
}

.nook-tint-picker__dot {
width: 14px;
height: 14px;

padding: 0;

border: 1px solid color-mix(
in srgb,
var(--border-strong) 24%,
transparent
);

border-radius: var(--radius-0);

background: var(--dot-color, var(--stock-note));

cursor: pointer;

box-shadow: none;

transition:
border-color var(--motion-lift),
transform var(--motion-lift);
}

.nook-tint-picker__dot--default {
background: linear-gradient(
135deg,
var(--stock-note) 50%,
var(--stock-link) 50%
);
}

.nook-tint-picker__dot:hover {
border-color: color-mix(
in srgb,
var(--border-strong) 52%,
transparent
);

transform: translateY(-1px);
}

.nook-tint-picker__dot--active {
border-color: var(--border-strong);

box-shadow: 0 0 0 1px var(--border-strong);
}

.nook-tint-picker__dot:focus-visible {
box-shadow: var(--focus-ring);
}

/* ---------------------------------------------------------------
Content
--------------------------------------------------------------- */
Expand Down Expand Up @@ -709,7 +646,7 @@
box-sizing: border-box;
padding: 5.7% 5.7% 0;

background: var(--stock-photo);
background: var(--artifact-color, var(--stock-photo));
border-radius: var(--radius-paper);
box-shadow: var(--shadow-paper-rest);

Expand Down
36 changes: 22 additions & 14 deletions frontend/src/assets/styles/auth.css
Original file line number Diff line number Diff line change
Expand Up @@ -958,51 +958,59 @@
}

.auth-oauth-group {
display: flex;
flex-direction: column;
gap: var(--space-2);
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--space-3);
}

.auth-oauth-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--space-3);
width: 100%;
min-height: 44px;
padding: var(--space-2) var(--space-4);
padding: var(--space-2) var(--space-3);
background: var(--color-artifact);
color: var(--text-primary);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-0);
font-family: var(--font-ui);
font-size: var(--type-label-size);
font-weight: var(--weight-medium);
cursor: pointer;
text-decoration: none;
box-shadow: none;
transition:
border-color var(--interaction-duration) var(--interaction-easing),
background var(--interaction-duration) var(--interaction-easing);
background var(--interaction-duration) var(--interaction-easing),
transform var(--motion-lift),
box-shadow var(--motion-lift);
}

.auth-oauth-btn:hover:not(:disabled) {
border-color: var(--text-primary);
border-color: var(--border-strong);
background: var(--color-canvas);
transform: translateY(-1px);
box-shadow: 2px 2px 0 var(--palette-ink);
}

.auth-oauth-btn:active:not(:disabled) {
transform: translateY(0);
box-shadow: none;
}

.auth-oauth-btn:focus-visible {
outline: 2px solid var(--accent-primary);
outline-offset: 2px;
box-shadow: var(--focus-ring);
outline: none;
}

.auth-oauth-btn:disabled {
cursor: not-allowed;
opacity: 0.6;
transform: none;
box-shadow: none;
}

.auth-oauth-icon {
width: 18px;
height: 18px;
width: 20px;
height: 20px;
flex-shrink: 0;
}

Expand Down
Loading
Loading