Setting up your development environment
Prerequisites
Before you begin, make sure you have the following installed:
- Git
- Node.js (v22 or later)
- PHP (v8.2 or later)
- Composer
- Docker and Docker Compose
- DDev (recommended for local development)
Getting started
1. Fork and clone the repositories
Fork and clone the following repositories:
# API
git clone https://github.com/YOUR_USERNAME/passbolt_api.git
cd passbolt_api
# Browser Extension
git clone https://github.com/YOUR_USERNAME/passbolt_browser_extension.git
cd passbolt_browser_extension
# Styleguide
git clone https://github.com/YOUR_USERNAME/passbolt_styleguide.git
cd passbolt_styleguide
2. Set up the API
Using DDev (Recommended)
- Navigate to the API directory:
cd passbolt_api
- Start DDev:
ddev start
- Install dependencies:
ddev composer install
- Set up the database:
ddev exec bin/cake passbolt install
Manual Setup
- Navigate to the API directory:
cd passbolt_api
- Install dependencies:
composer install
-
Configure your database in
config/app.php
-
Set up the database:
bin/cake passbolt install
3. Set up the Browser Extension
- Navigate to the browser extension directory:
cd passbolt_browser_extension
- Install dependencies:
npm install
- Build the extension:
npm run build
4. Set up the Styleguide
- Navigate to the styleguide directory:
cd passbolt_styleguide
- Install dependencies:
npm install
- Start the development server:
npm run start
Development workflow
- Create a new branch for your changes:
git checkout -b feature/your-feature-name
-
Make your changes
-
Run tests:
# API
ddev exec vendor/bin/phpunit
# Browser Extension
npm run test
# Styleguide
npm run test
- Commit your changes:
git add .
git commit -m "Description of your changes"
- Push to your fork:
git push origin feature/your-feature-name
- Create a pull request