Welcome
Thank you for your interest in contributing to the Oyasai Server Platform! This guide will help you get started with contributing to our monorepo that manages plugins, infrastructure, and web applications for the Oyasai Minecraft server.Development Environment Setup
Installing Nix
- Install Nix from nixos.org. Multi-user installation is recommended, but single-user also works:
- After installation, restart your terminal.
- Enable experimental features by running:
- Verify the installation by running in the repository:
- Enter the development shell:
CONTRIBUTING.md:6-27.
Code Standards
Formatting
Unformatted code will not be accepted. To format your code, run:- Nix files (
.nix) - Kotlin files (
.kt) - Configuration files
- Other project files
Always run
nix fmt before committing your changes.CONTRIBUTING.md:29-37.
Pull Request Conventions
Pull request titles must follow Conventional Commits: Format:<type>(<scope>): <description>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesrefactor: Code refactoringtest: Adding or updating testschore: Maintenance tasksperf: Performance improvements
CONTRIBUTING.md:39-42.
Testing
Running Tests Locally
The CI builds all packages and runs tests (if they exist). To run the same checks locally:-L flag shows build logs for debugging.
See CONTRIBUTING.md:44-50.
Plugin Testing
For testing plugins during development, see the Testing guide.Local Development
Purpur Server Development
Oyasai Server uses Purpur. You can download and run your own local server, or use the platform’s existing infrastructure to create a Purpur server with any configuration.Creating a Test Server
- Reference the minimal example at
packages/oyasai-minecraft-minimal.nix:
-
Create your own configuration file or edit the existing
packages/oyasai-minecraft-minimal.nix(recommended for testing). - Stage the file:
-
Add your configuration to
nix/oyasai-scope.nixwhere other entries are located (search foroyasai-minecraft-minimalto find the right spot). - Run your server:
directory parameter.
See CONTRIBUTING.md:52-69.
Plugin Development
The devshell includes all necessary tools for plugin development.Build All Plugins
From the repository root:Build a Specific Plugin
Updating Dependencies
If you modify dependencies in anybuild.gradle.kts file, you must regenerate gradle.lock:
CONTRIBUTING.md:71-89.
Code Review Process
Reviewers are automatically assigned based on CODEOWNERS. Merge Requirements:- 1 approval required for merge
- All CI checks must pass
- Code must be formatted (
nix fmt) - Conventional Commits title format
CONTRIBUTING.md:91-94.
Contribution Workflow
1. Fork and Clone
2. Create a Branch
feat/*for featuresfix/*for bug fixesdocs/*for documentationrefactor/*for refactoring
3. Set Up Development Environment
4. Make Your Changes
Edit code, add features, fix bugs, etc.5. Format Your Code
6. Test Your Changes
7. Commit Your Changes
Use conventional commit messages:8. Push and Create PR
- Conventional Commits title
- Clear description of changes
- References to related issues
Common Contribution Types
Adding a New Plugin
-
Create plugin directory structure:
-
Create
build.gradle.kts: -
Create
plugin.ymland plugin code -
Build and test:
-
Update dependencies if needed:
Modifying Existing Plugin
- Make your changes to the plugin code
-
Build the plugin:
- Test locally with a server configuration
-
Format and check:
Updating Nix Configuration
-
Edit Nix files in
nix/orpackages/ -
Verify syntax:
-
Test builds:
-
Format:
Documentation Changes
-
Edit documentation files (
.mdor.mdx) -
Format:
- Preview if applicable
-
Commit with
docs:prefix:
Getting Help
If you need assistance:- Check existing documentation in the repository
- Review similar merged pull requests
- Ask in discussions or issues
- Contact the maintainers listed in CODEOWNERS
Project Structure Reference
Additional Resources
Plugin Development
Learn how to create and modify plugins
Gradle Workflow
Understanding the build system
Nix Packages
Creating server configurations
Testing
Testing your changes locally