Thank you for your interest in contributing to the Time-Machines-Builders ecosystem! This document provides guidelines for contributing to this project and its integrations.
- Code of Conduct
- Getting Started
- Development Workflow
- Integration Development
- Submitting Changes
- Testing
By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors.
- Git
- GitHub account
- Familiarity with GitHub Actions (for workflow development)
- Understanding of the connected repositories:
- AI-Time-Machines
- Web3AI
- gatsby-starter-blog
- Transparency-Logic-Time-Machine-Bots-
-
Fork the repository
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/Time-Machines-Builders-.git cd Time-Machines-Builders- -
Add the upstream remote:
git remote add upstream https://github.com/lippytm/Time-Machines-Builders-.git
-
Create a new branch for your changes:
git checkout -b feature/your-feature-name
main- Production-ready codedevelop- Development branchfeature/*- New featuresbugfix/*- Bug fixesintegration/*- Integration updates
Follow conventional commit format:
type(scope): subject
body
footer
Types:
feat: New featurefix: Bug fixdocs: Documentation changesworkflow: Workflow/CI changesintegration: Integration updatesrefactor: Code refactoringtest: Test updates
Example:
feat(integration): add Huggingface API connection
- Implement Huggingface model integration
- Add authentication flow
- Update documentation
Closes #123
- Create workflow file in
.github/workflows/ - Update
INTEGRATION.mdwith integration details - Add necessary secrets documentation
- Create issue template if needed
- Test integration thoroughly
- Use descriptive job names
- Include error handling
- Add appropriate permissions
- Document secret requirements
- Test with
workflow_dispatchfirst
Example workflow structure:
name: Your Integration
on:
workflow_dispatch:
# Add other triggers as needed
jobs:
integration-job:
name: Integration Job Name
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Your integration step
run: |
echo "Integration logic here"When adding cross-repository features:
- Coordinate with maintainers of target repositories
- Use
repository_dispatchfor triggering - Document the integration flow
- Add integration tests
- Update related repositories as needed
-
Update your branch with the latest upstream changes:
git fetch upstream git rebase upstream/main
-
Push your changes:
git push origin feature/your-feature-name
-
Create a Pull Request:
- Use the PR template
- Fill out all relevant sections
- Link related issues
- Mark integration impacts
-
Address review comments:
- Make requested changes
- Push updates to your branch
- Request re-review
Before submitting a PR, ensure:
- Code follows project style and conventions
- Documentation is updated (README, inline comments, etc.)
- All workflows pass successfully (lint-test, CodeQL, dependency-review)
- Integration tests completed (if applicable)
- No secrets or sensitive data exposed in code
- PR template filled out completely
- Related issues linked (use "Closes #123" or "Fixes #456")
- Code has been tested locally
- TypeScript compilation succeeds without errors
- No new linter warnings introduced
- Tests pass (frontend and backend)
- Branch is up-to-date with target branch (main or develop)
- Commit messages follow conventional commit format
- Changes are minimal and focused on the issue being addressed
Before submitting changes, test your code locally:
cd frontend
npm install
npm test # Run tests
npm run build # Ensure build succeeds
npx tsc --noEmit # Type checkcd backend
npm install
npm test # Run tests (when available)
npm run build # Ensure build succeeds
npx tsc --noEmit # Type checkTest workflows before submitting:
# Using act (local workflow runner)
act -j job-name
# Or use workflow_dispatch in your fork
gh workflow run workflow-name.ymlFor cross-repository integrations:
- Test in your fork first
- Verify webhook endpoints in staging
- Test with minimal payloads
- Monitor workflow runs
- Check logs for errors
- Unit Tests: Write tests for new functions and components
- Integration Tests: Test interactions between components
- End-to-End Tests: Test complete user workflows (when applicable)
- Security Tests: Verify no secrets are exposed, inputs are validated
- Performance Tests: Ensure changes don't degrade performance (for large changes)
- Aim for at least 80% code coverage for new code
- Critical paths should have 100% coverage
- Tests should be meaningful, not just for coverage numbers
All PRs must pass the following CI checks:
-
Lint and Test (
lint-test.yml):- Linting (when lint script exists)
- Type checking (TypeScript)
- Unit tests
- Build verification
-
CodeQL Analysis (
codeql.yml):- Security vulnerability scanning
- Code quality analysis
-
Dependency Review (
dependency-review.yml):- Dependency vulnerability scanning
- License compatibility checking
- Never commit secrets or tokens
- Use repository secrets for sensitive data
- Test with minimal permissions first
- Verify secret handling in workflows
- Run CodeQL analysis before submitting
- Check for common vulnerabilities (XSS, SQL injection, etc.)
For UI changes:
- Test in Chrome, Firefox, and Safari
- Test responsive design (mobile, tablet, desktop)
- Test accessibility (keyboard navigation, screen readers)
- Verify no console errors
For API changes:
- Test all endpoints with various inputs
- Test error handling
- Verify rate limiting works
- Check authentication/authorization
- Test with invalid/malicious inputs
When contributing, update:
README.md- If adding major featuresINTEGRATION.md- For integration changesCONTRIBUTING.md- For process changes- Inline comments - For complex logic
- Issue templates - For new issue types
- Use clear, concise language
- Include code examples
- Add diagrams for complex flows
- Keep formatting consistent
- Update table of contents
- Automated Checks: Workflows must pass
- Security Review: CodeQL and Trivy scans clear
- Code Review: Maintainer review required
- Integration Test: Cross-repo impacts verified
- Documentation: All docs updated
- Questions: Open a discussion
- Bugs: Use bug report template
- Features: Use feature request template
- Integrations: Use integration issue template
Contributors will be recognized in:
- GitHub contributors list
- Release notes
- Project documentation
By contributing, you agree that your contributions will be licensed under the same license as the project.
Thank you for contributing to Time-Machines-Builders! 🚀