Local Development Setup
Get your development environment ready for contributing to Wellpipe.
Prerequisites
- Node.js 18+ - Download here
- Git - For version control
- WHOOP Developer Account - For testing (optional)
Clone the Repositories
Wellpipe uses multiple repositories. Clone the ones you need:
# Core interfaces and types
git clone https://github.com/wellpipe/core.git
# WHOOP provider
git clone https://github.com/wellpipe/provider-whoop.git
# CLI
git clone https://github.com/wellpipe/cli.git
# Documentation
git clone https://github.com/wellpipe/docs.git
Install Dependencies
Each package has its own dependencies:
# In each repository
npm install
Link Local Packages
For development, link packages together:
# In core/
npm link
# In provider-whoop/
npm link @wellpipe/core
npm link
# In cli/
npm link @wellpipe/core @wellpipe/whoop
Build Packages
# Build each package
npm run build
Development Mode
Most packages support watch mode:
# Watch for changes and rebuild
npm run dev
Environment Setup
For WHOOP Testing
Create a .env file with your WHOOP credentials:
WHOOP_CLIENT_ID=your_client_id
WHOOP_CLIENT_SECRET=your_client_secret
WHOOP_ACCESS_TOKEN=your_access_token
WHOOP_REFRESH_TOKEN=your_refresh_token
Get credentials from the WHOOP Developer Portal.
For Cloud Development
See the cloud repository README for additional setup.
IDE Setup
VS Code
Recommended extensions:
- ESLint
- Prettier
- TypeScript and JavaScript Language Features
Settings:
{
"editor.formatOnSave": true,
"typescript.tsdk": "node_modules/typescript/lib"
}
WebStorm/IntelliJ
Enable:
- ESLint integration
- Prettier integration
- TypeScript language service
Verify Setup
Run Tests
npm test
Type Check
npm run typecheck
# or
npx tsc --noEmit
Lint
npm run lint
Common Issues
"Cannot find module @wellpipe/core"
Make sure you've linked the local packages:
cd ../core && npm link
cd ../provider-whoop && npm link @wellpipe/core
Type Errors After Changes
Rebuild the dependent package:
cd ../core && npm run build
ESLint/Prettier Conflicts
Our config should handle this, but if you see issues:
npm run lint:fix