This monorepo contains our IaC, frontend applications and shared packages. It uses Turborepo for build orchestration and pnpm for package management.
- Package Management: pnpm workspaces
- Build System: Turborepo
- UI Framework: Next.js 15 with App Router
- UI Components: shadcn/ui with custom theme
- Type Safety: TypeScript
- API Type Safety: Declarative Routing
- Infrastructure: SST (Serverless Stack)
- Project Management: Linear
- CI/CD: GitHub Actions
apps/
├── next-15-template/ # Next.js 15 application template
packages/
├── ui/ # Shared UI components
├── eslint-config/ # Shared ESLint configuration
└── typescript-config/ # Shared TypeScript configuration
- Install dependencies:
pnpm install- Start development server:
pnpm devWe use SST (Serverless Stack) for infrastructure as code. The configuration can be found in sst.config.ts. Our infrastructure supports three stages:
<your-name>: Individual's dev stagedev: Development environment (shared dev)staging: Staging environmentproduction: Production environment
AWS profiles are automatically mapped to each stage:
- Production:
prod1(us-west-2) - Staging:
non-prod1(us-west-2) - Dev:
dev(us-west-2)
More info on the workflow and SST here.
We use shadcn/ui for our component library. Components are stored in packages/ui/src/components and can be imported into any app:
import { Button } from "@workspace/ui/components/button";To add new shadcn/ui components, run:
pnpm ui:add <component-name>We use Declarative Routes for type-safe routing in Next.js applications. This ensures:
- Type-safe route parameters
- Type-safe search parameters
- Type-safe API inputs and outputs
- Auto-generated fetch functions
See apps/next-15-template/routes/README.md for detailed documentation on the routing system.
We use Linear for project management and issue tracking. All commits should include the Linear ticket number in the format:
[ABC-123] feat: add new feature
The repository includes several quality checks that run automatically:
- ESLint for code quality
- Prettier for code formatting
- TypeScript for type checking
- Husky for pre-commit hooks
These checks run both locally and in CI/CD pipelines.
We use a custom theme built on top of shadcn/ui. The theme colors are defined in packages/ui/src/styles/globals.css and include:
- Light and dark mode support
- Custom color palette based on VB brand colors
- CSS variables for runtime theme switching
- Tailwind CSS for styling
To modify the theme, edit the CSS variables in packages/ui/src/styles/globals.css.
-
Branch naming:
- Feature:
feat/ABC-123-description - Bug Fix:
fix/ABC-123-description - Chore:
chore/ABC-123-description
- Feature:
-
Commit messages must follow the format:
[ABC-123] type: descriptionWhere type is one of: feat, fix, docs, style, refactor, test, chore
-
All PRs must:
- Include Linear ticket number
- Pass all CI checks
- Have at least one approval
- Be up to date with main
-
Prerequisites:
- Node.js >= 20
- pnpm >= 10.4.1
- AWS CLI configured with SSO
-
First-time setup:
pnpm sso # Login to AWS SSO pnpm install # Install dependencies pnpm ui:add button # Add initial UI components
-
Development workflow:
pnpm dev # Start all applications pnpm lint # Run linting pnpm format # Run formatting
-
Environment Variables:
- Copy
.env.exampleto.env.localin each app - See
env/server.tsandenv/client.tsfor required variables
- Copy
Environment variables are managed using @t3-oss/env-nextjs for type-safe environment variables. Define your environment variables in:
env/server.tsfor server-only variablesenv/client.tsfor client-safe variables
Each application in the monorepo has its own README with detailed information about:
- Application architecture
- Component structure
- Data flow
- API endpoints
- Specific configuration requirements
- Local development instructions
Testing infrastructure is currently being set up. This section will be updated with:
- Unit testing setup and conventions
- Integration testing strategy
- E2E testing with Playwright
- Test coverage requirements
- CI integration details
Additional infrastructure documentation is in progress. This section will be updated with:
- Detailed AWS resource configurations
- Infrastructure diagram
- Environment promotion workflow
- Monitoring and logging setup
- Performance optimization guidelines
- Security best practices
For questions or issues:
- Check the relevant package's README
- Consult the team documentation in Linear
- Reach out to the team on Slack