PixelDance

Development

Local development workflow, project structure, and package conventions.

Running Individual Apps

# Run all apps together
bun run dev

# Run a single app with Turbo filter
bun run dev --filter=app
bun run dev --filter=api
bun run dev --filter=docs

App Overview

AppPortTech
apps/web3000Next.js 16 + shadcn/ui
apps/api3002Hono + Bun
apps/docs3004FumaDocs (this site)
apps/emailReact Email preview
apps/storybookStorybook

Package Conventions

Environment Variables

Every package exports a keys() function with Zod validation:

// packages/auth/keys.ts
export const keys = () =>
  createEnv({
    server: { BETTER_AUTH_SECRET: z.string().min(16) },
    runtimeEnv: { BETTER_AUTH_SECRET: process.env.BETTER_AUTH_SECRET },
  });

Apps compose these in their env.ts:

// apps/web/env.ts
export const env = createEnv({
  extends: [auth(), database(), payments()],
});

Internal Package Imports

All internal packages use the @repo/* namespace with workspace protocol:

{
  "dependencies": {
    "@repo/database": "workspace:*",
    "@repo/auth": "workspace:*"
  }
}

Background Jobs (Trigger.dev)

Tasks live in packages/trigger/tasks/:

import { task } from '@trigger.dev/sdk/v3';

export const myTask = task({
  id: 'my-task',
  run: async (payload: { userId: string }) => {
    // task logic
  },
});

Troubleshooting

On this page