Prerequisites
Before starting, ensure you have the following installed:- Node.js (v18 or later)
- pnpm (v8 or later) - Kaizen uses pnpm as its package manager
- Git for version control
Installation
Install dependencies
Install all project dependencies using pnpm:This will install:
- Angular 21 framework and CLI
- Convex client and Angular integration
- Clerk authentication library
- PrimeNG component library
- TailwindCSS for styling
Configure environment variables
Create environment configuration files in src/environments/environment.ts
src/environments/:src/environments/environment.development.tsThe development environment file is automatically used when running
ng serve due to the file replacement configuration in angular.json.Set up Convex backend
Initialize and deploy the Convex backend:This command:
- Creates a new Convex project (first time only)
- Generates type definitions in
convex/_generated/ - Starts the Convex development server
- Watches for changes to your Convex functions
Keep this terminal window open - it needs to run alongside your Angular dev server.
Configure Clerk authentication
Set up Clerk for authentication:
- Create a Clerk application at clerk.com
- Create a JWT template named “convex” in your Clerk dashboard
- Copy the Issuer URL and set it as
CLERK_JWT_ISSUER_DOMAINin your Convex dashboard - Copy your Clerk publishable key to your environment files
convex/auth.config.ts to use the environment variable:Available scripts
Kaizen provides several npm scripts for development:| Script | Command | Description |
|---|---|---|
start | ng serve | Start development server |
build | ng build | Build for production |
watch | ng build --watch --configuration development | Build in watch mode |
test | ng test | Run unit tests with Karma |
Development tools
VS Code configuration
The project includes recommended VS Code settings in.vscode/:
- extensions.json - Recommended extensions for Angular development
- launch.json - Debug configurations for Chrome
- tasks.json - Build and serve tasks
Angular configuration
Key Angular CLI configurations inangular.json:
TypeScript configuration
The project uses strict TypeScript settings (tsconfig.json):
strict: true- All strict type checking options enablednoImplicitOverride: true- Require explicit override keywordsnoImplicitReturns: true- Ensure all code paths return valuesexperimentalDecorators: true- Required for Angular decorators
Troubleshooting
Convex connection errors
Convex connection errors
If you see connection errors to Convex:
- Ensure
npx convex devis running - Verify
convexPublicUrlin your environment file matches your Convex dashboard - Check that your network allows WebSocket connections
Clerk authentication not working
Clerk authentication not working
Common Clerk issues:
- Verify
clerkPublicKeyis correct in your environment file - Ensure the JWT template “convex” is configured in Clerk
- Check that
CLERK_JWT_ISSUER_DOMAINis set in Convex dashboard - Clear browser cookies and try again
Build errors after installing dependencies
Build errors after installing dependencies
If you encounter build errors:
- Delete
node_modulesandpnpm-lock.yaml - Run
pnpm installagain - Clear Angular cache:
rm -rf .angular - Restart your development server
Next steps
Project structure
Learn about the file and folder organization
State management
Understand how Angular signals manage state