First off, thanks for taking the time to contribute! 🎉
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Pull Request Process
- Style Guidelines
- Community
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the maintainers.
- 🐛 Bug fixes: Found a bug? Fix it!
- ✨ Features: Have an idea? Implement it!
- 📚 Documentation: Improve docs, add examples
- 🧪 Tests: Add test coverage
- 🌐 Translations: Help translate prompts/messages
- 🎨 UI/UX: Improve Mini App interface
# Clone the repository
git clone https://github.com/bobberdolle1/PersonaForge.git
cd PersonaForge
# Copy environment config
cp .env.example .env
# Edit .env with your settings
# At minimum: TELOXIDE_TOKEN, OWNER_ID
# Install Ollama and pull a model
ollama pull llama3.2
ollama pull nomic-embed-text
# Run in development mode
cargo run
# Run with logging
RUST_LOG=debug cargo runsrc/
├── main.rs # Entry point
├── config.rs # Configuration
├── state.rs # Shared state
├── bot/handlers/ # Telegram handlers
├── db/ # Database queries
├── llm/ # Ollama client
├── security/ # Security features
├── voice/ # Whisper integration
├── web/ # Web search
└── webapp/ # Mini App
feature/description- New featuresfix/description- Bug fixesdocs/description- Documentationrefactor/description- Code refactoring
Follow Conventional Commits:
type(scope): description
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentationstyle: Formattingrefactor: Code restructuringtest: Adding testschore: Maintenance
Examples:
feat(personas): add trigger keywords support
fix(rag): correct time-decay calculation
docs(readme): add Mini App setup guide
# Format code
cargo fmt
# Run linter
cargo clippy -- -D warnings
# Run tests
cargo test
# Check for security issues
cargo audit- Fork the repository
- Create a feature branch from
main - Make your changes
- Test thoroughly
- Update documentation if needed
- Submit a pull request
- Code follows project style
- Self-reviewed the code
- Added comments where needed
- Updated documentation
- No new warnings
- Tests pass locally
- Commit messages follow convention
- Maintainers will review your PR
- Address any requested changes
- Once approved, PR will be merged
- Your contribution will be in the next release! 🎉
- Follow Rust API Guidelines
- Use
rustfmtfor formatting - Address all
clippywarnings - Document public APIs with
///comments
/// Creates a new persona with the given name and prompt.
///
/// # Arguments
/// * `name` - The persona's display name
/// * `prompt` - The system prompt defining personality
///
/// # Returns
/// The created persona's ID
pub async fn create_persona(name: &str, prompt: &str) -> Result<i64> {
// Implementation
}- Use
anyhow::Resultfor application errors - Provide context with
.context("description") - Log errors appropriately
let result = some_operation()
.await
.context("Failed to perform operation")?;- Use
tracingmacros - Include relevant context
- Choose appropriate levels:
error!- Failures requiring attentionwarn!- Potential issuesinfo!- Important eventsdebug!- Development detailstrace!- Verbose debugging
Contributors are recognized in:
- GitHub contributors page
- Release notes
- Special thanks in README (for significant contributions)
- Discussions: Use GitHub Discussions for questions
- Issues: Report bugs and request features
- Pull Requests: Submit your contributions
Thank you for contributing to PersonaForge! 🤖❤️