Thank you for your interest in contributing to Drivly AI! This document provides guidelines and instructions to help you contribute effectively to this project.
By participating in this project, you agree to abide by our Code of Conduct. Please be respectful and considerate of others when contributing.
- Fork the repository on GitHub
- Clone your fork locally
git clone https://github.com/YOUR-USERNAME/ai.git cd ai
- Install dependencies
pnpm install
- Create a new branch for your feature or bugfix
git checkout -b feature/your-feature-name
This is a monorepo managed with pnpm workspaces. The main directories include:
api/
: API implementationsdash/
: Dashboard applicationdata/
: Data processing utilitiesdocs/
: Documentationpkgs/
: Shared packagessdks/
: Software Development Kitsweb/
: Web applicationsworkflows/
: Workflow definitions
We use Prettier to maintain consistent code formatting. The configuration is defined in package.json
.
Key formatting rules:
- Single quotes
- No semicolons
- Trailing commas
- 180 character line width
- JSX uses single quotes
- JSX brackets on the same line
To format your code:
pnpm format
Consistent naming helps make our codebase more readable and maintainable:
- Use kebab-case for file names:
user-profile.tsx
,api-client.ts
- Use descriptive names that reflect the file's purpose
- For component files, use PascalCase if they export a single React component:
Button.tsx
- Test files should match the name of the file they test with
.test
or.spec
suffix:user-profile.test.tsx
- Use camelCase for variables and function names:
userData
,fetchUserProfile()
- Use descriptive names that indicate purpose
- Boolean variables should use prefixes like
is
,has
, orshould
:isLoading
,hasPermission
- Use UPPER_SNAKE_CASE for constants:
API_URL
,MAX_RETRY_COUNT
- Place shared constants in dedicated files/modules
- Use PascalCase for React components and their filenames:
UserProfile
- Use camelCase for component instances:
<UserProfile userName="John" />
- Use PascalCase for interfaces, types, and classes:
UserData
,ApiResponse
- Prefix interfaces with
I
only when necessary to distinguish from a class:IUserService
vsUserService
- Use descriptive names that reflect the data structure
Before submitting a pull request, make sure to test your changes thoroughly.
- Update your fork with the latest changes from the main repository
- Run tests to ensure your changes don't break existing functionality
- Format your code using
pnpm format
- Push your changes to your fork
- Create a pull request with a clear title and description
- Describe what your changes do
- Reference any related issues
- Include screenshots if applicable
We follow the Conventional Commits specification for commit messages. This leads to more readable messages that are easy to follow when looking through the project history and helps with automated versioning and changelog generation.
Each commit message should be structured as follows:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
feat
: A new featurefix
: A bug fixdocs
: Documentation only changesstyle
: Changes that do not affect the meaning of the code (white-space, formatting, etc)refactor
: A code change that neither fixes a bug nor adds a featureperf
: A code change that improves performancetest
: Adding missing tests or correcting existing testsbuild
: Changes that affect the build system or external dependenciesci
: Changes to our CI configuration files and scriptschore
: Other changes that don't modify src or test filesrevert
: Reverts a previous commit
feat(auth): implement JWT authentication
- Add token generation and validation
- Create login and registration endpoints
- Set up middleware for protected routes
Closes #123
fix(api): prevent race condition in user data fetch
Resolves an issue where concurrent requests could lead to data corruption.
Fixes #456
docs(readme): update installation instructions
For breaking changes, add BREAKING CHANGE:
in the footer followed by a description:
feat(api): change authentication API endpoints
BREAKING CHANGE: Authentication endpoints now use /auth prefix instead of /user
If you have any questions or need help, please open an issue or reach out to the maintainers.
Thank you for contributing to Drivly AI!