Time Capsule Postcards

A playful SPA where users write “postcards to future me” with a mood, a short message, and optional doodle stamp, then schedule them to be revealed on a chosen date. The app includes a postcard composer, a timeline inbox with countdowns, and a reveal view that unlocks messages only when their date arrives (all stored in localStorage). Extra polish: random postcard themes, gentle animations, and a “surprise me” prompt generator to spark ideas.

To Do30
Scaffold project

Run: npm create vite@latest . -- --template react-ts && npm i && npm i -D tailwindcss postcss autoprefixer && npx tailwindcss init -p && npm i class-variance-authority clsx tailwind-merge lucide-react && npx shadcn@latest init.

by system

Add Tailwind styles

Configure tailwind.config.ts and src/index.css with Tailwind directives and a basic CSS reset.

by system

Set up shadcn components

Add core shadcn/ui primitives (button, card, input, textarea, select, dialog, tabs, badge, tooltip) via CLI.

by system

Create app layout

Implement src/components/AppShell.tsx with header/nav and a centered content container.

by system

Add client routing

Wire react-router in src/main.tsx and define routes for Compose, Inbox, and Reveal pages.

by system

Define postcard types

Create src/types/postcard.ts defining Postcard, Mood, Theme, and Stamp types.

by system

LocalStorage helpers

Implement src/lib/storage.ts for loading/saving postcards with schema-safe defaults.

by system

Postcard store hook

Create src/hooks/usePostcards.ts to add/update/delete postcards and persist to localStorage.

by system

Theme catalog data

Create src/data/themes.ts exporting a small array of postcard themes (colors/pattern tokens).

by system

Random theme helper

Add src/lib/randomTheme.ts to pick a random theme id with deterministic fallback.

by system

Prompt generator data

Create src/data/prompts.ts with a list of “surprise me” writing prompts.

by system

Prompt generator helper

Add src/lib/randomPrompt.ts to return a random prompt and avoid immediate repeats.

by system

Mood select component

Implement src/components/MoodSelect.tsx using shadcn Select to choose a mood.

by system

Date picker field

Implement src/components/RevealDateField.tsx using a native date input with validation messaging.

by system

Stamp picker component

Create src/components/StampPicker.tsx to choose an optional doodle stamp icon.

by system

Postcard preview card

Build src/components/PostcardPreview.tsx to render theme, mood, message snippet, and stamp.

by system

Composer form UI

Implement src/pages/ComposePage.tsx with fields for mood, message, stamp, theme, and reveal date.

by system

Composer submit logic

Add save/validation behavior in ComposePage to create a Postcard via usePostcards.

by system

Surprise me button

Add a “Surprise me” prompt button to ComposePage that inserts a generated prompt into the message.

by system

Randomize theme button

Add a “Random theme” control to ComposePage that applies a random theme to the preview.

by system

Inbox list page

Create src/pages/InboxPage.tsx to list scheduled postcards sorted by reveal date.

by system

Countdown utility

Implement src/lib/countdown.ts to compute human-readable time remaining until a target date.

by system

Inbox item row

Create src/components/InboxItem.tsx showing preview, reveal date, and countdown badge.

by system

Locked vs unlocked badge

Implement src/components/UnlockStatusBadge.tsx to display whether a postcard is revealable yet.

by system

Reveal routing page

Implement src/pages/RevealPage.tsx to load a postcard by id from the route and display state.

by system

Locked reveal view

Create src/components/LockedReveal.tsx showing a lock message and countdown until unlock.

by system

Unlocked reveal view

Create src/components/UnlockedReveal.tsx to show the full postcard message, mood, theme, and stamp.

by system

Delete postcard dialog

Add src/components/DeletePostcardDialog.tsx and wire it from Inbox/Reveal for deletion confirmation.

by system

Gentle animations

Add subtle Tailwind-based transitions (hover/enter) in PostcardPreview and page containers.

by system

Empty states

Add empty-state UI components for Inbox and Reveal when there are no postcards or id not found.

by system

In Progress0
In Review0
Done0