This is a Next.js project bootstrapped with
create-next-app.
- Typecraft Web
- Framework: Next.js 16 (App Router)
- Language: TypeScript 5
- UI Library: Ark UI 5 - Headless UI components
- Styling: Panda CSS 1.8 - CSS-in-JS with zero runtime
- Icons: Lucide React
- Testing: Vitest 4 + Testing Library
- Code Quality: Biome 2.2 - Fast linter & formatter
- Git Hooks: Husky 9 + lint-staged
- Commit Standards: Commitlint (Conventional Commits)
- Package Manager: pnpm
-
Clone the repository:
git clone <your-repo-url> cd typecraft-web
-
Install dependencies:
pnpm install
This will also:
- Set up Husky git hooks automatically
- Generate Panda CSS types
-
Run the development server:
pnpm dev
-
Open your browser:
Navigate to http://localhost:3000 to see the app.
This project uses Dependabot to keep dependencies up-to-date automatically.
- Schedule: Dependabot runs weekly (Mondays at 6:00 AM UTC)
- Updates: Checks for updates to all
pnpmdependencies - Grouping: Related dependencies are grouped to reduce PR noise
- Auto-merge: Minor and patch updates merge automatically after CI passes
- Manual review: Major version updates require manual approval
Dependencies are organized into logical groups:
| Group | Packages | Auto-merge |
|---|---|---|
| React & Next.js | react, react-dom, next |
β Minor/Patch |
| Ark UI | @ark-ui/* |
β Minor/Patch |
| Panda CSS | @pandacss/* |
β Minor/Patch |
| Testing | vitest, @vitest/*, @testing-library/*, jsdom, etc. |
β Minor/Patch |
| Biome | @biomejs/* |
β Minor/Patch |
| Commitlint | @commitlint/* |
β Minor/Patch |
| Husky | husky, lint-staged |
β Minor/Patch |
| Type Definitions | @types/* |
β Minor/Patch |
To manually trigger Dependabot:
- Go to GitHub β Repository β Insights β Dependency Graph β Dependabot
- Click "Check for updates"
- Dependabot config:
.github/dependabot.yml - Auto-merge workflow:
.github/workflows/dependabot-auto-merge.yml
This project uses Panda CSS for styling with Ark UI for accessible, headless components.
- Panda CSS: Zero-runtime CSS-in-JS with type-safe styles
- Theme Configuration:
panda.config.ts - Design Tokens: Located in
src/theme/ - Recipes: Reusable component styles in
src/theme/recipes/
After changing Panda configuration, regenerate types:
pnpm prepare:pandaTypecraft uses a contract-driven Design System built on top of Panda CSS.
The Design System defines:
- Semantic token taxonomy (bg, fg, border, accent, status, typing)
- Named theme architecture (
data-theme) - Accent roles (primary / secondary / tertiary)
- Neutral pairing strategy (Park UI pairing approach)
- Motion principles (premium SaaS, restrained)
- Components consume semantic roles, not raw color palettes.
- Themes map roles at the root level.
- v1 is intentionally minimal (3 accent roles + neutral pairing).
- Accessibility and reduced motion are first-class concerns.
Detailed documentation: src/theme/docs/
This project uses Vitest for fast, modern testing with a comprehensive setup for React components.
# Run tests in watch mode (development)
pnpm test
# Run tests once (CI/pre-push)
pnpm test:run
# Run with visual UI
pnpm test:ui
# Generate coverage report
pnpm test:coverage- Framework: Vitest with jsdom environment
- React Testing: Testing Library (React, User Event, Jest DOM)
- Accessibility Testing: vitest-axe for a11y checks
- Browser API Mocks: ResizeObserver, IntersectionObserver, and more (see
src/tests/vitest.setup.ts)
Tests are co-located with components:
src/components/core/Button/
βββ Button.tsx
βββ Button.test.ts β Tests here
This project uses GitHub Actions for continuous integration and deployment checks.
The CI pipeline runs automatically on:
- Every push to
developormainbranches - Every pull request targeting
developormain
The pipeline consists of 4 parallel jobs that ensure code quality:
| Job | What It Does | Duration |
|---|---|---|
| Lint | Checks code style with Biome | ~10s |
| Type Check | Validates TypeScript types | ~30s |
| Test | Runs full test suite with Vitest | ~40s |
| Build | Verifies production build succeeds | ~45s |
Execution Strategy:
Lint,Type Check, andTestrun in parallel for speedBuildruns only after all three pass- Total CI time: ~85 seconds (instead of 125s if sequential)
- Workflow:
.github/workflows/ci.yml - Setup Action:
.github/actions/setup-environment/action.yml - Node.js: 22.x
- pnpm: 10.x
- Lockfile: Frozen (ensures consistent dependencies)
Before merging a PR:
- β All CI checks must pass
- β Code must be reviewed and approved
- β Branch must be up-to-date with target branch
Branch protection rules enforce:
- Required status checks: Lint, Type Check, Test, Build
- No bypassing for administrators (recommended)
Your pre-push hook runs the same checks as CI, so you'll catch issues locally before pushing:
pnpm exec tsc --noEmit # Type check pnpm lint # Lint pnpm test:run # Tests pnpm build # Build
This project enforces strict code quality using Biome and automated git hooks.
| Command | Description |
|---|---|
pnpm lint |
Check for code issues |
pnpm format |
Format code using Biome |
pnpm fix |
Auto-fix all fixable linting issues |
pnpm test |
Run tests in watch mode |
pnpm test:run |
Run tests once |
pnpm build |
Build for production |
Git hooks run automatically to ensure code quality:
Runs on: git commit
- Formats and lints staged files only using
lint-staged - Runs type checking with TypeScript
- β‘ Fast (~5 seconds)
Runs on: git commit
- Validates commit messages follow Conventional Commits
- Enforces format:
type(scope): subject - β‘β‘β‘ Instant
Runs on: git push
- Type checks entire codebase
- Lints all files
- Runs full test suite
- Builds the project
- π’ Slower (~30s-2min) - catches issues before they reach remote
Skip hooks in emergencies:
git commit --no-verify # Skip pre-commit & commit-msg
git push --no-verify # Skip pre-pushThis project follows Conventional Commits:
<type>(<scope>): <subject>
[optional body]
[optional footer]
Examples:
git commit -m "feat: add dark mode toggle"
git commit -m "fix: resolve button hover state"
git commit -m "docs: update README with testing guide"
git commit -m "refactor(auth): simplify token validation"
git commit -m "test: add Button component tests"Allowed types:
feat- New featurefix- Bug fixdocs- Documentation changesstyle- Code style changes (formatting, etc.)refactor- Code refactoringperf- Performance improvementstest- Adding or updating testschore- Maintenance tasksci- CI/CD changesbuild- Build system changes
VS Code (Cursor):
Install the Biome extension:
The project includes .vscode/settings.json with:
- Auto-format on save
- Biome as default formatter
-
Create a feature branch:
git checkout -b feature/your-feature-name
-
Make your changes and commit:
git add . git commit -m "feat: add your feature"
The pre-commit hook will automatically format and lint your staged files.
-
Push your branch:
git push -u origin feature/your-feature-name
The pre-push hook will run full checks before pushing.
-
Open a pull request