First off, thank you for considering contributing to FileAI! It's people like you that make FileAI such a great tool.
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
Before creating bug reports, please check existing issues as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible:
Bug Report Template:
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Environment:**
- OS: [e.g. Ubuntu 22.04]
- Node.js version: [e.g. 22.0.0]
- Browser: [e.g. Chrome 120]
- FileAI version: [e.g. 1.0.0]
**Additional context**
Add any other context about the problem here.Enhancement suggestions are tracked as GitHub issues. Create an issue and provide the following information:
- Use a clear and descriptive title
- Provide a detailed description of the suggested enhancement
- Explain why this enhancement would be useful
- List any alternative solutions you've considered
- Fork the repo and create your branch from
main - If you've added code that should be tested, add tests
- If you've changed APIs, update the documentation
- Ensure the test suite passes
- Make sure your code lints
- Issue that pull request!
- Node.js >= 22.0.0
- npm >= 10.0.0
- Docker and Docker Compose
- Git
# Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/fileai.git
cd fileai
# Install dependencies
npm install
# Start development services
npm run services:start
# Run the development server
npm run devfileai/
├── apps/
│ ├── web/ # Next.js frontend
│ └── server/ # Node.js backend
├── packages/
│ ├── shared/ # Shared types and schemas
│ └── config/ # Shared configurations
└── docs/ # Documentation
- Use TypeScript for all new code
- Enable strict mode
- Avoid
anytypes when possible - Use interfaces for object shapes
- Use enums for fixed sets of values
- Use 2 spaces for indentation
- Use semicolons
- Use single quotes for strings
- Maximum line length: 100 characters
- Files: kebab-case (
user-service.ts) - Classes: PascalCase (
UserService) - Functions/Variables: camelCase (
getUserById) - Constants: SCREAMING_SNAKE_CASE (
MAX_FILE_SIZE) - Types/Interfaces: PascalCase (
UserProfile)
We follow Conventional Commits:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: A new featurefix: A bug fixdocs: Documentation only changesstyle: Code style changes (formatting, semicolons, etc.)refactor: Code change that neither fixes a bug nor adds a featureperf: Performance improvementtest: Adding missing testschore: Changes to build process or auxiliary tools
Examples:
feat(search): add semantic search functionality
Implement vector-based semantic search using Qdrant.
This allows users to search by meaning rather than keywords.
Closes #123
fix(upload): handle large file uploads correctly
- Increase timeout for large files
- Add progress indicator
- Fix memory leak in chunking
Fixes #456
feature/- New featuresfix/- Bug fixesdocs/- Documentation changesrefactor/- Code refactoringtest/- Test additions or changes
Examples:
feature/add-ocr-supportfix/upload-timeout-issuedocs/update-api-reference
# Run all tests
npm run test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverage- Place tests next to the code they test (
*.test.ts) - Use descriptive test names
- Follow the Arrange-Act-Assert pattern
- Mock external dependencies
describe('UserService', () => {
describe('getUserById', () => {
it('should return user when valid id is provided', async () => {
// Arrange
const userId = '123';
const expectedUser = { id: '123', name: 'John' };
// Act
const result = await userService.getUserById(userId);
// Assert
expect(result).toEqual(expectedUser);
});
});
});- Update README.md if you change functionality
- Add JSDoc comments to public APIs
- Update CHANGELOG.md for notable changes
- Include code examples where helpful
- All submissions require review
- We use GitHub pull requests for this purpose
- Reviewers may ask for changes before merging
- Once approved, maintainers will merge your PR
- GitHub Discussions - Ask questions
- Discord - Real-time chat
Contributors will be recognized in:
- The project README
- Release notes
- Our website (coming soon)
Thank you for contributing to FileAI!