Thank you for your interest in contributing to the Stellar Footprint Service! This document provides guidelines and information for contributors.
- Code of Conduct
- Getting Started
- Development Setup
- Project Structure
- Development Workflow
- Code Style and Standards
- Testing
- Dependency Management
- Pull Request Process
- Commit Guidelines
- Branch Naming
- Reporting Issues
- Documentation
This project follows a code of conduct to ensure a welcoming environment for all contributors. Please be respectful and constructive in all interactions.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/Stellar-Footprint-Service.git cd Stellar-Footprint-Service - Set up the development environment (see below)
- Create a feature branch for your changes
- Make your changes following the guidelines
- Test your changes thoroughly
- Submit a pull request
- Node.js 20.x
- npm (comes with Node.js)
- Git
- Install dependencies: <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours
=======
theirs ======= theirs =======
theirs =======
theirs =======
theirs =======
theirs
npm ci- Set up environment variables: <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours
=======
theirs ======= theirs =======
theirs =======
theirs =======
theirs =======
theirs
cp .env.example .env
# Edit .env with your configuration- Build the project: <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours
=======
theirs ======= theirs =======
theirs =======
theirs =======
theirs =======
theirs
npm run build- Start development server:
npm run dev
npm run dev- Start development server with hot reloadnpm run build- Build the TypeScript projectnpm run start- Start the production servernpm run lint- Run ESLintnpm run lint:fix- Run ESLint with auto-fixnpm run format- Format code with Prettiernpm run format:check- Check code formattingnpm run solhint- Lint Solidity files (if applicable)
βββ src/
β βββ index.ts # Application entry point
β βββ api/
β β βββ controllers.ts # API controllers
β β βββ routes.ts # API routes
β βββ config/
β β βββ stellar.ts # Stellar network configuration
β βββ middleware/
β β βββ metrics.ts # Prometheus metrics middleware
β β βββ timeout.ts # Request timeout middleware
β βββ services/
β βββ footprintParser.ts # Footprint parsing logic
β βββ optimizer.ts # Optimization algorithms
β βββ simulator.ts # Transaction simulation
βββ monitoring/
β βββ grafana/ # Grafana dashboards and configuration
β βββ prometheus.yml # Prometheus configuration
β βββ IMPLEMENTATION_SUMMARY.md
βββ .github/
β βββ workflows/
β βββ ci.yml # GitHub Actions CI pipeline
βββ docker-compose.prod.yml # Production Docker setup
βββ Dockerfile # Container definition
βββ healthcheck.js # Health check script
βββ package.json # Dependencies and scripts
- Choose an issue from the issue tracker
- Create a branch following the branch naming conventions
- Implement your changes with proper tests
- Run the test suite and ensure all tests pass
- Run linting and formatting checks
- Commit your changes following commit guidelines
- Push your branch and create a pull request
- Address review feedback if any
- Merge once approved
This project uses several tools to maintain code quality:
<<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours
=======
theirs ======= theirs =======
theirs =======
theirs =======
theirs =======
theirs
- Configured in
eslint.config.mjs - Run
npm run lintto check for issues - Run
npm run lint:fixto auto-fix issues - Only
console.warnandconsole.errorare allowed (notconsole.log)
<<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours
=======
theirs ======= theirs =======
theirs =======
theirs =======
theirs =======
theirs
- Configured in
prettier.config.cjs - Run
npm run formatto format code - Run
npm run format:checkto check formatting
<<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours
=======
theirs ======= theirs =======
theirs =======
theirs =======
theirs =======
theirs
- Strict type checking enabled
- Configuration in
tsconfig.json - All new code must be properly typed
<<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours
=======
theirs ======= theirs =======
theirs =======
theirs =======
theirs =======
theirs
- Husky is used to run pre-commit checks
- Commits will be rejected if linting fails
- Branch names are validated automatically
<<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours
=======
theirs ======= theirs =======
theirs =======
theirs =======
theirs =======
theirs
npm test<<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours
=======
theirs ======= theirs =======
theirs =======
theirs =======
theirs =======
theirs
- Aim for high test coverage
- Include unit tests for all new functions
- Include integration tests for API endpoints
- Test both success and error scenarios
<<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours
=======
theirs ======= theirs =======
theirs =======
theirs =======
theirs =======
theirs
- Write tests before implementing features (TDD when possible)
- Use descriptive test names
- Test edge cases and error conditions
- Mock external dependencies appropriately
This project uses exact versions for all dependencies to ensure reproducible builds.
- Check for updates: <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours
=======
theirs ======= theirs =======
theirs =======
theirs =======
theirs =======
theirs
npm outdated- Update package.json with new exact versions: <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours
=======
theirs ======= theirs =======
theirs =======
theirs =======
theirs =======
theirs
{
"dependency": "1.2.3"
}- Update lockfile: <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours
=======
theirs ======= theirs =======
theirs =======
theirs =======
theirs =======
theirs
npm install-
Test thoroughly that everything still works
-
Commit both
package.jsonandpackage-lock.json
- Install the package: <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours
=======
theirs ======= theirs =======
theirs =======
theirs =======
theirs =======
theirs
npm install --save exact-package@1.2.3-
Verify the exact version is in
package.json -
Test the integration
- Ensure your branch is up to date with
main - Run all checks locally: <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours
=======
theirs ======= theirs =======
theirs =======
theirs =======
theirs =======
theirs
npm run lint
npm run format:check
npm run build
npm test-
Create a pull request with:
- Clear title describing the change
- Detailed description of what was changed and why
- Reference to any related issues
- Screenshots/videos if UI changes
-
Address review comments promptly
-
Squash commits if requested before merging
- Code follows style guidelines
- Tests are included and passing
- Documentation is updated
- No linting errors
- Dependencies are properly managed
- Breaking changes are documented
This project follows conventional commit format:
type(scope): description
[optional body]
[optional footer]
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
feat(api): add batch simulation endpoint
fix(metrics): correct cache hit counter
docs(readme): update installation instructions
refactor(optimizer): simplify algorithm complexity
test(simulator): add edge case coverage
chore(deps): update TypeScript to 5.3.2
- Use present tense ("add" not "added")
- Keep the subject line under 50 characters
- Use the body for detailed explanations if needed
- Reference issues with
#123
Branch names must follow this pattern:
main,develop,live(protected branches)- Prefixed branches:
feature/,fix/,refactor/,hotfix/,release/,conflict/,chore/
Examples: <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours
=======
theirs ======= theirs =======
theirs =======
theirs =======
theirs =======
theirs
feature/add-batch-simulationfix/memory-leak-issuechore/update-dependenciesrefactor/simplify-optimizer
Branch names are validated by pre-commit hooks.
When reporting bugs, please include:
- Clear title describing the issue
- Steps to reproduce the problem
- Expected behavior vs actual behavior
- Environment details (Node version, OS, etc.)
- Error messages and stack traces
- Screenshots if applicable
For new features, please:
- Describe the problem you're trying to solve
- Explain your proposed solution
- Consider alternative approaches
- Discuss potential impacts
- Use JSDoc comments for functions and classes
- Keep comments up to date with code changes
- Explain complex algorithms and business logic
- Update README.md for significant changes
- Include examples for new features
- Keep installation and usage instructions current
- Document all API endpoints in README.md
- Include request/response examples
- Specify error codes and messages
<<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours <<<<<<< ours Thank you for contributing to Stellar Footprint Service! Your efforts help make this tool better for the entire Stellar community. π
Thank you for contributing to Stellar Footprint Service! Your efforts help make this tool better for the entire Stellar community. π
theirs ======= Thank you for contributing to Stellar Footprint Service! Your efforts help make this tool better for the entire Stellar community. π theirs ======= Thank you for contributing to Stellar Footprint Service! Your efforts help make this tool better for the entire Stellar community. π theirs ======= Thank you for contributing to Stellar Footprint Service! Your efforts help make this tool better for the entire Stellar community. π theirs ======= Thank you for contributing to Stellar Footprint Service! Your efforts help make this tool better for the entire Stellar community. π theirs ======= Thank you for contributing to Stellar Footprint Service! Your efforts help make this tool better for the entire Stellar community. π theirs