Digitaltableteur is a hybrid monorepo portfolio website featuring both Next.js 16 (production) and Vite (legacy) applications. Built with React 19 and TypeScript 6.x, it showcases a comprehensive design system, multi-language support (EN/FI/SV), AI-powered chat interface, and enterprise-grade tooling including Sentry observability, Linear issue management, and MCP (Model Context Protocol) integrations.
Design system contracts, docs search, and usage validation for @digitaltableteur components.
2026-10-23
Sterne
—
Tools
12
Uptime
—
🚀 Features
Core Architecture
Hybrid Monorepo: Next.js 16 App Router (production) + Vite 6.4 (legacy) in parallel migration
AI Documentation System: Hierarchical CLAUDE.md/AGENTS.md structure optimized for AI assistants
Design System: 50+ components with CSS Modules, design tokens, Storybook, and visual regression testing
Type Safety: TypeScript 6.x strict mode with comprehensive interfaces and JSDoc documentation
User Experience
Multi-language Support: Complete i18n with English, Finnish, and Swedish (100% translation coverage)
AI Chat Interface: OpenAI-powered chat with guided email workflow, dynamic component injection, markdown rendering
Responsive Design: Mobile-first with progressive enhancement (backdrop-filter, gap, :has() selector)
Progressive Web App: Service worker caching, offline support, native share API integration
Accessibility: WCAG AA compliant with axe-core testing, semantic HTML, ARIA attributes, keyboard navigation
Content & Media
Blog Platform: Sanity CMS integration with MDX, syntax highlighting, reading time estimates
Secure CV Download: Password-protected with API validation and rate limiting
If you need the raw design data, you can download the Figma file as JSON. Set the
FIGMA_TOKEN environment variable with your personal access token, then run:
npm run fetch-figma
Synchronizes design tokens and assets from Figma using the API.
The file is saved as figma.json in the project root.
SEO & Content Generation
npm run generate:sitemap # Generate XML sitemap
npm run generate:llms # Create LLM-friendly content index
npm run generate:alt-text # Generate accessibility descriptions (requires OPENAI_API_KEY)
generate:alt-text streams local image bytes to the OpenAI Vision API so it can describe the actual artwork; add OPENAI_API_KEY (and optionally OPENAI_ALT_MODEL) to .env.local before running, or append --force to regenerate every <img> alt attribute.
Sanity Blog Publishing
Quick Publish Workflow:
# Publish single article from Sanity
npm run sanity:publish-single <article-slug>
# Publish all articles
npm run sanity:publish
See docs/SANITY_MIGRATION.md for the full migration workflow (React → Sanity via sanity:parse-posts / sanity:convert / sanity:upload, Sanity → MDX via sanity:sync-from-remote, redirects generation, cleanup helpers)
Sentry REST API: Observability queries and dashboards
Claude Code: Custom commands and hooks for AI pair programming
📱 Component Features
Native Share Integration
The SocialShare component implements progressive enhancement with the Web Share API:
Native Share Support
Detects Web Share API availability on mobile devices
Provides seamless sharing via device native share sheet
Falls back gracefully to clipboard copying when unavailable
Responsive Design
Icon-only mode on mobile devices for compact display
Full button text on desktop environments
Proper alignment with other social media icons
Progressive Enhancement
Feature detection for navigator.share availability
Automatic fallback to clipboard copy functionality
Error handling for share failures with retry mechanism
Accessibility
ARIA labels for both native share and copy actions
Keyboard navigation support
Screen reader friendly with appropriate role attributes
Browser Support
Modern mobile browsers: Native share functionality
Desktop browsers: Clipboard copy fallback
Legacy browsers: Standard clipboard copy behavior
The implementation follows Web Share API best practices with proper error handling and provides a consistent user experience across all device types.
⚙️ Testing & Quality
Testing Stack
npm test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # Generate coverage reports
npm run test:a11y # Accessibility testing
npm run test:visual # Visual regression tests
npm run test:visual:update # Update visual baselines
Test Suite Coverage:
Unit Tests: Component behavior, props, state management (>80% coverage requirement)
Prettier: 2-space indentation, single quotes, trailing commas
TypeScript: No implicit any, strict null checks, unused variables blocked
Observability
Sentry Integration:
npm run sentry:issues # Query unresolved issues
npm run sentry:releases # List recent releases
npm run generate:sentry-summary # Generate JSON summary
MCP Testing:
npm run github:mcp:test # Test GitHub MCP connectivity
npm run figma:mcp:test # Test Figma MCP connectivity
npm run ts:mcp:status # Validate TypeScript LSP
Component Development
Storybook:
npm run storybook # Launch Storybook dev server
npm run build-storybook # Build static Storybook
npm run storybook:deploy # Deploy to GitHub Pages
WIP Badge System:
All stories display a localized "Work in Progress" badge by default
Badge removed via parameters: { wip: { disabled: true } } after passing:
✅ Accessibility tests (axe-core violations = 0)
✅ Visual regression (no unexpected diffs)
✅ Translation coverage (all keys in EN/FI/SV)
🌐 Internationalization
The site supports three languages with complete translation coverage:
Always wrap user-facing text with useTranslation() hook
Use nested object notation like "navigation.home" for organization
Update all three locale files simultaneously before merging
🔐 Security & Performance
Security Measures:
Password-protected content delivery
Environment-based configuration with .env.local (gitignored)
CORS-enabled API endpoints with strict origin validation
Sanitized user inputs and XSS protection
No secrets in version control (see .gitignore)
Performance Optimizations:
Code splitting with dynamic imports and React.lazy()
Image optimization and lazy loading
Service worker caching strategy (Vite app)
Bundle analysis and tree shaking
Compressed asset delivery with Brotli/Gzip
Aggressive filename hashing for cache busting
🚀 Build & Deployment
Production Builds
Next.js App:
npm run build # Build Next.js app (production)
npm run start # Start Next.js production server
Vite App (legacy):
npm run build # Vite production build
npm run preview # Preview Vite production build
npm run cache-bust # Manual cache busting
Deployment Strategy
Hybrid Deployment:
Vercel: Hosts Next.js app + serverless API functions
Automatic deployments from main branch
Environment variables managed in Vercel dashboard
Edge functions for auth, API routes, webhooks
GitHub Pages: Hosts legacy Vite app + Storybook
Manual deployment via npm run deploy
Custom domain: digitaltableteur.com
Aggressive cache busting with hashed filenames
Deployment Commands:
npm run deploy # Deploy Vite app to GitHub Pages
npm run deploy-with-storybook # Deploy with visual diff report
npm run storybook:deploy # Deploy Storybook standalone
npm run generate:sitemap # Generate sitemap.xml
The Chat interface includes a guided, multi-step email composition workflow triggered by natural phrasing. Two trigger paths exist:
General intent (e.g. “Send email”, “Help me send an email” / FI / SV variants) → assistant injects localized chatEmailSendPhrase and invites composition.
Simple keyword (standalone "email" / "sähköposti" / "epost") → assistant injects localized chatEmailSimplePhrase, reveals [email protected], then asks if you want to start composing.
Both converge to the same reducer-driven flow; only initial phrasing differs. The simple path uses an anchored regex so incidental mentions ("I like email workflows") are ignored.
Trigger & Detection
messageProcessor.ts sets one of two pending flags (pendingEmailWorkflowGeneral or pendingEmailWorkflowSimple) based on multilingual regex matches. ChatWidget consumes exactly one flag on the next assistant turn, injects the phrase key (chatEmailSendPhrase or chatEmailSimplePhrase), mounts workflow UI inline, then resets the flag.
review – User reviews aggregated draft, can edit any field
sending – Async submission in progress (aria-busy applied)
success – Confirmation + summary displayed
error – Error state with retry and edit options
Transitions are deterministic and validated; editing returns to fields with preserved data. Cancellation cleanly resets to idle.
Components
ComposePrompt – Captures initial intent/subject
FieldPrompt – Renders current required field input with validation hints
ReviewSummary – Summarizes all collected fields before send
SendStatus – Displays sending, success, or error feedback
All components are in src/components/ChatWidget/emailWorkflow/ and follow the standard pattern with .stories.tsx and .test.tsx coverage. Styling leverages existing design tokens and CSS Modules; accessible labels and descriptions use i18n keys.
Validation & Service Abstractions
contactValidation.ts – Shared field validators (name, email format, message length, optional phone)
These are used by the workflow and by the traditional contact form. Missing variables gracefully prevent send actions (error state surfaced to user).
Internationalization
All user-visible workflow text uses the emailWorkflow.* key prefix (e.g. emailWorkflow.compose.heading, emailWorkflow.fields.name.label, emailWorkflow.status.success.title). Ensure additions update all three locale files (en, fi, sv) before merging—translation coverage tests will fail otherwise.
Accessibility
Each prompt uses semantic form controls and associates labels via htmlFor
Sending state applies role="status" + aria-busy="true" with localized progress text
Error state exposes retry action with clear focus order and no keyboard traps
Review list uses structured markup (definition list or grouped paragraphs) for screen reader clarity
Testing Expectations
Reducer unit tests: all major transitions (compose -> fields -> review -> sending -> success/error) including edit & cancel
Integration tests: general path (emailWorkflow.integration.test.tsx) and simple keyword path (emailWorkflow.simpleTrigger.test.tsx)
i18n coverage: all emailWorkflow.* keys present across locales
Visual regression: Storybook snapshots for each state (update intentionally when layout changes)
Accessibility tests: no axe violations in workflow stories and pages
Extension Guidelines
To extend with additional fields or optional attachments:
Add new field to EmailDraft type and validators
Insert field step logic into reducer (order matters for progression)
Localize new strings under emailWorkflow.fields.<fieldName>.*
Update ReviewSummary rendering & tests
Refresh visual baselines and translation coverage
Prefer additive changes over altering existing field semantics to avoid breaking previously localized content.
Maintenance
Any architectural or trigger behavior changes MUST update this README, .github/copilot-instructions.md, CLAUDE.md, and docs/donny-chat.md together.
🛡️ Observability Automation
Automated scripts produce lightweight JSON artifacts consumed by UI components (e.g., summary cards) and Storybook dashboards without live API calls at render time:
Sentry Summary: public/observability/sentry-summary.json (generated via scripts/generate-sentry-summary.mjs or scripts/sentry-mcp.js commands)
TypeScript MCP Status: public/observability/ts-mcp-status.json (generated via scripts/ts-mcp-automation.mjs)
Commands
npm run ts:mcp:status # Perform LSP handshake and write status JSON
npm run ts:mcp:status:stub # Force stub status JSON (no handshake)
The Sentry summary script runs with project + filter options (unresolved production issues). A stub mode is available when credentials are absent; UI distinguishes stub data via a badge.
Integration Notes
SentrySummaryCard reads and renders Sentry JSON with localized loading/error/empty states
Future observability components should follow the same decoupled pattern: build-time or on-demand JSON generation + pure rendering
Keep translation keys (observability.sentry.*, future observability.ts.*) synchronized across locales
Maintenance Requirement
Whenever observability schemas evolve (new fields, renamed properties) update README, .github/copilot-instructions.md, and CLAUDE.md concurrently. Tests must be added or adjusted to cover new states (e.g., stub detection, additional metadata rendering).
🤖 MCP Tooling
Donny’s serverless chat handler automatically loads every MCP server declared in mcp.json. In addition to the local TypeScript language server and Sentry helper, the repository now includes the hosted Context7 MCP server so assistant prompts can pull the latest framework/library docs without leaving the conversation.
mcp.json → "context7" entry points at https://mcp.context7.com/mcp and sends the Context7-API-Key header (value resolved from CONTEXT7_API_KEY). Leave the env unset for anonymous/low-rate usage.
A convenience runner is available for local debugging: npm run context7:mcp -- [optional flags]
Append --remote-check to ping the hosted Context7 MCP endpoint. The helper automatically injects the Context7-API-Key header using CONTEXT7_API_KEY.
Set CONTEXT7_API_KEY in .env.local or your shell profile (the secret lives in Vercel’s project envs) to benefit from higher rate limits and private library access. The script automatically injects the key unless you pass --api-key manually.
The REST API that powers Context7 lives at https://context7.com/api/v1; use that base URL whenever you need to inspect account status or manage keys outside the dashboard.
api/donny-tools.ts names each tool as <server>.<toolName>, so Context7 capabilities appear under the context7.* namespace when connected. This keeps downstream prompts explicit and makes it easy to disable the server by removing the config block if needed.
Design system documentation and consistency checking
Design-to-code generation and implementation guidance
Collaborative design workflow integration
Figma capabilities appear under the figma.* namespace when connected, enabling AI assistants to interact with your design files and generate implementation code directly from Figma designs.
Search the @dt design-system docs registry by name, keyword or UI intent. Returns budgeted briefs (import line, key props, related components) with a hint for the follow-up get call.
Check proposed @dt JSX against the component contracts: prop relationships, forbidden prop combinations, deprecated props and raw-UI replacements. Pass a TSX snippet or a component name with props.
Kopieren Sie auf dieser Seite die http-Konfiguration für Cursor, Claude Desktop, Claude Code oder VS Code. Sie nutzt die Installation des Herausgebers, keinen PlugMCP-Proxy.
Benötigt Digitaltableteur einen API-Schlüssel?
In diesem Eintrag ist keine erforderliche Umgebungsvariable aufgeführt.
Welchen Transport verwendet Digitaltableteur?
Digitaltableteur wird über HTTP erreicht.
Wann wurde Digitaltableteur zuletzt geprüft?
Zuletzt geprüft: 2026-10-23. Design system contracts, docs search, and usage validation for @digitaltableteur components.