Thank you for your interest in contributing to FluxMedia! This document provides guidelines and instructions for contributing.
- Node.js >= 18.0.0
- pnpm >= 8.0.0
- Fork and clone the repository:
git clone https://github.com/your-username/fluxmedia.git
cd fluxmedia- Install dependencies:
pnpm install- Build all packages:
pnpm build- Run tests:
pnpm testfluxmedia/
├── packages/ # Core packages
│ ├── core/ # Core types and abstractions
│ ├── cloudinary/ # Cloudinary provider
│ ├── s3/ # AWS S3 provider
│ ├── r2/ # Cloudflare R2 provider
│ └── react/ # React integration
├── examples/ # Example applications
└── docs/ # Documentation
- Create a new branch:
git checkout -b feature/my-new-feature-
Make your changes
-
Run tests:
pnpm test- Run linting:
pnpm lint- Build packages:
pnpm build- Create a changeset (for package changes):
pnpm changesetFollow the prompts to describe your changes.
- We use ESLint and Prettier for code formatting
- Run
pnpm formatto automatically format code - All public APIs must have JSDoc comments
- Use TypeScript strict mode - no
anytypes
- Write tests for all new features
- Maintain >80% code coverage
- Run
pnpm test:coverageto check coverage
- Unit tests - Mock dependencies, test individual functions
- Integration tests - Test with real provider APIs (optional, requires credentials)
- Contract tests - Ensure all providers implement the interface correctly
- Update documentation if needed
- Add tests for new features
- Ensure all tests pass
- Create a changeset for package changes
- Submit PR with clear description
PR Checklist:
- Tests pass
- Linting passes
- Documentation updated
- Changeset created (if applicable)
- Code reviewed
- Create a new package in
packages/:
mkdir -p packages/my-provider/src- Implement the
MediaProviderinterface:
import type { MediaProvider } from '@fluxmedia/core';
export class MyProvider implements MediaProvider {
readonly name = 'my-provider';
readonly features = MyProviderFeatures;
async upload(file, options) {
// Implementation
}
// ... other required methods
}-
Add tests
-
Update documentation
-
Submit PR
We follow conventional commits:
feat:- New featurefix:- Bug fixdocs:- Documentation changestest:- Test changeschore:- Build/tooling changes
Examples:
feat(cloudinary): add video upload support
fix(core): handle upload progress correctly
docs(readme): update installation instructions
- Open an issue for bugs or feature requests
- Start a discussion for questions or ideas
- Check existing issues before creating new ones
FluxMedia is designed to make media providers more accessible, not to compete with them. We're building infrastructure that:
- Makes it easier to adopt any provider
- Enables strategic multi-provider architectures
- Reduces API fragmentation in the ecosystem
- Improves TypeScript developer experience
When contributing, please keep this philosophy in mind. We position ourselves as a helpful abstraction layer, not as a replacement for providers.
Be respectful and inclusive. We're all here to build something great together.
By contributing, you agree that your contributions will be licensed under the MIT License.