Thank you for your interest in contributing to Flagent! We welcome contributions from the community.
There are many ways to contribute to Flagent:
- Report bugs - Help us improve by reporting issues
- Suggest features - Share your ideas for new features
- Improve documentation - Help others understand Flagent better
- Submit code - Fix bugs or implement new features
- Write tests - Improve test coverage
- Star the project - Show your support
- JDK 21+ for backend development
- Gradle 8.13 (wrapper) for building
- Docker for running services
- Git for version control
-
Fork the repository
git clone https://github.com/YOUR_USERNAME/Flagent.git cd flagent -
Add upstream remote
git remote add upstream https://github.com/MaxLuxs/Flagent.git
-
Install hooks (optional but recommended)
./scripts/install-hooks.sh
This installs a pre-commit hook that checks VERSION sync when releasing. See Versioning.
-
Build the project
./gradlew build
-
Run the application
./gradlew :backend:run
The server will start on
http://localhost:18000
Flagent follows Kotlin Coding Conventions. See .cursorrules for detailed guidelines.
- Use Clean Architecture principles
- Follow Domain-Driven Design (DDD) patterns
- Write type-safe code (avoid
Any,String?where possible) - Use suspend functions for all I/O operations
- Write comprehensive tests for new features
- Document public APIs with KDoc
We use Kotlin's standard formatting. Run:
./gradlew ktlintFormatTo check formatting:
./gradlew ktlintCheckflagent/
├── backend/ # Ktor backend server
│ ├── domain/ # Domain layer (entities, use cases, interfaces)
│ ├── service/ # Application layer (services, DTOs, mappers)
│ ├── repository/ # Infrastructure layer (database, cache)
│ ├── route/ # Presentation layer (HTTP handlers)
│ └── config/ # Configuration
├── frontend/ # Compose for Web frontend
├── ktor-flagent/ # Ktor plugin
└── sdk/ # Client SDKs
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Write clean, testable code
- Add tests for new features
- Update documentation if needed
-
Test your changes
./gradlew test -
Commit your changes
git commit -m "Add: description of your changes"Use conventional commit messages:
Add:for new featuresFix:for bug fixesUpdate:for updates to existing featuresRefactor:for code refactoringDocs:for documentation changes
-
Push to your fork
git push origin feature/your-feature-name
-
Create a Pull Request
- Open a PR on GitHub
- Describe your changes clearly
- Reference related issues if any
- Wait for review and feedback
# Run all tests
./gradlew test
# Run tests for specific module
./gradlew :backend:test
# Run tests with coverage
./gradlew test jacocoTestReport- Write unit tests for use cases, services, and repositories
- Write integration tests for routes and full scenarios
- Use MockK for mocking interfaces
- Use TestContainers for integration tests with databases
Aim for at least 80% code coverage for critical business logic.
- Document all public APIs with KDoc
- Include usage examples in KDoc where helpful
- Document exceptions that can be thrown
- Use
@paramand@returnfor complex functions
- Update docs/ for user-facing documentation
- Add examples for new features
- Update README if needed
- Include code examples
Flagent follows Clean Architecture with clear layer separation:
- Domain Layer - Business entities and use cases (no dependencies)
- Application Layer - Services and DTOs (depends on domain)
- Infrastructure Layer - Repositories and external services (depends on domain)
- Presentation Layer - Routes and HTTP handlers (depends on application)
Dependencies should point inward:
Presentation → Application → Domain ← Infrastructure
- Use entities for business objects
- Use value objects for immutable values
- Use repositories (interfaces) for data access
- Use use cases for business logic
- Ensure your code follows style guidelines
- All tests must pass
- Add tests for new features
- Update documentation if needed
- Request review from maintainers
- Code follows style guidelines
- Tests added/updated and passing
- Documentation updated
- Commit messages are clear
- No merge conflicts
When reporting bugs, please include:
- Description - Clear description of the issue
- Steps to reproduce - Detailed steps to reproduce the bug
- Expected behavior - What should happen
- Actual behavior - What actually happens
- Environment - OS, JDK version, Flagent version
- Logs - Relevant error logs or stack traces
Create an issue on GitHub with the label bug.
When requesting features, please include:
- Description - Clear description of the feature
- Use case - Why is this feature needed?
- Motivation - What problem does it solve?
- Proposed solution - How should it work?
- Alternatives - Other solutions considered
Create an issue on GitHub with the label enhancement.
Please read CODE_OF_CONDUCT.md for community standards.
- GitHub Issues - Ask questions, report bugs, or request features
- Documentation - Read the documentation
- Contact - max.developer.luxs@gmail.com
Contributors will be:
- Listed in CONTRIBUTORS.md
- Mentioned in release notes
- Credited in relevant documentation
Thank you for contributing to Flagent!