Thank you for your interest in contributing to Course Builder! This document provides guidelines and instructions for contributing to the project.
- Clone the repository:
git clone https://github.com/joelhooks/course-builder.git
- Install dependencies:
pnpm install
- Start the development server:
pnpm dev
Course Builder is a monorepo using Turborepo and pnpm workspaces.
- Apps are in the
/apps
directory - Shared packages are in the
/packages
directory
Common commands:
pnpm build:all
- Build all packages and appspnpm build
- Build all packages (not apps)pnpm build --filter="ai-hero"
- Build ai-hero apppnpm dev:all
- Run dev environment for all packages/appspnpm dev
- Run dev environment for packages only
Our monorepo includes shared utility packages under /packages
:
@coursebuilder/utils-ai
: AI-related utilities@coursebuilder/utils-auth
: Authentication and authorization utilities@coursebuilder/utils-aws
: AWS service utilities@coursebuilder/utils-browser
: Browser-specific utilities (cookies, etc.)@coursebuilder/utils-core
: Core utilities likeguid
@coursebuilder/utils-email
: Email-related utilities@coursebuilder/utils-file
: File handling utilities@coursebuilder/utils-media
: Media processing utilities@coursebuilder/utils-resource
: Resource filtering and processing utilities@coursebuilder/utils-search
: Search functionality utilities@coursebuilder/utils-seo
: SEO utilities@coursebuilder/utils-string
: String manipulation utilities@coursebuilder/utils-ui
: UI utilities likecn
Import utilities as follows:
// Import from a specific utility file
import { guid } from '@coursebuilder/utils-core/guid'
import { cn } from '@coursebuilder/utils-ui/cn'
import cookieUtil from '@coursebuilder/utils-browser/cookies'
To contribute a new utility:
- Identify the appropriate package for your utility
- If you're unsure where a utility belongs, discuss with the team
- Use the Plop template to create a new utility:
# Create a new utility package using the template
pnpm plop package-utils <domain> <utilityName> <functionName> "<utilityDescription>"
# Example:
pnpm plop package-utils browser cookies getCookies "Browser cookie utility"
- Implement your utility with comprehensive TSDoc comments
- Add thorough test coverage
- Update apps to use the new shared utility
- Formatting: We use Prettier with our shared configuration.
- TypeScript: Strict typing is enforced.
- File naming: Use kebab-case for file names.
- Function naming: Use camelCase for function names.
pnpm test
- Run all testspnpm test:watch
- Run tests in watch mode- When adding new functionality, include tests that cover all significant logic.
- Create a feature branch:
git checkout -b feature/my-feature
- Make your changes and commit them
- Push your branch:
git push origin feature/my-feature
- Open a PR with a clear description of the changes
- Ensure all tests pass before requesting review