Development Guide
This guide will help you set up your development environment and understand our development practices.
Setting Up Development Environment
-
Prerequisites
- Node.js (v18 or higher)
- Bun (latest version)
- Git
-
Clone and Setup
git clone https://github.com/kexa-io/Kexa.git
cd Kexa
bun install -
Environment Setup
- Create a
.envfile and add your necessary environment variables
- Create a
Coding Standards
TypeScript Guidelines
- Use TypeScript for all new code
- Enable strict mode
- Document public APIs with JSDoc comments
- Follow the existing code style
Code Style
- Use 2 spaces for indentation
- Use meaningful variable and function names
- Keep functions small and focused
- Write self-documenting code
- Add comments for complex logic
Best Practices
- Follow SOLID principles
- Write testable code
- Handle errors appropriately
- Use async/await for asynchronous operations
- Keep dependencies minimal
Git Workflow
-
Branch Naming
- Feature:
feature/description - Bug fix:
fix/description - Documentation:
docs/description - Performance:
perf/description
- Feature:
-
Commit Messages
- Use conventional commits format
- Start with type: feat, fix, docs, style, refactor, test, chore
- Keep messages clear and concise
-
Pull Requests
- Create PR against main branch
- Fill out PR template completely
- Ensure CI passes
- Request review from maintainers
Building and Running
Development Mode
bun run dev
Production Build
bun run build
bun run start
Running Tests
bun run test
Debugging
-
VS Code Configuration
- Use the provided launch configurations
- Enable source maps
- Use the debugger for Node.js
-
Logging
- Use the logging system
- Add appropriate log levels
- Include relevant context
Documentation
- Update documentation for new features
- Include code examples
- Document breaking changes
- Keep README.md up to date
Need Help?
- Check existing issues and discussions
- Join our community chat
- Contact maintainers
- Read our FAQ