Thank you for your interest in contributing to Doses! This document outlines the guidelines and best practices to follow when contributing to the project.
To get started, you'll need to have Node.js (version 20 or higher) and npm installed on your machine.
-
Clone the repository:
git clone https://github.com/Mango2Juice/doseright.git cd doseright -
Install dependencies:
This project uses
npmfor package management. To install dependencies, run:npm install
-
Run the development server:
To start the Next.js development server, run:
npm run dev
The application will be available at
http://localhost:9002.
Create a new branch for each feature or bug fix you're working on. Use a descriptive name, such as feature/add-new-calculator or fix/dosage-calculation-error.
This project uses Biome for linting and formatting. Before committing your changes, please run the following commands:
-
Format code:
npm format
-
Lint code:
npm lint
-
Check for both formatting and linting errors:
npm check
Ensure your code is type-safe by running the TypeScript compiler:
npm typecheckWe use Vitest for unit and integration testing. All new features and bug fixes should include tests to ensure the application remains stable and reliable.
-
Run all tests:
npm test -
Run tests in watch mode:
npm test:watch
-
Generate a coverage report:
npm test:coverage
-
Preflight Check: Before submitting your changes, run the full preflight check to ensure all quality gates are met:
npm preflight
This command runs formatting, linting, building, and testing in one step.
-
Create a Pull Request: Push your branch to GitHub and create a pull request to the
masterbranch. Provide a clear title and description of the changes you've made.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project, you agree to abide by its terms. We are committed to fostering an open and welcoming environment.