Contributing to Forge

Thank you for your interest in contributing! This guide will help you get started with contributing to Forge.

Ways to Contribute

Code Contributions

Add features, fix bugs, improve performance, or refactor code.

Documentation

Improve docs, write tutorials, translate content, or create guides.

Bug Reports

Report bugs with detailed reproduction steps and logs.

Feature Requests

Suggest new features or improvements to existing functionality.

Design

Create UI mockups, improve UX, or design new themes.

Testing

Write tests, perform manual testing, or help with QA.

Getting Started

1. Fork the Repository

# On GitHub, click the "Fork" button
# Then clone your fork
git clone https://github.com/YOUR_USERNAME/Dyplom.git
cd Dyplom

2. Set Up Development Environment

# Install Flutter (if not already installed)
# Follow: https://flutter.dev/docs/get-started/install

# Install dependencies
flutter pub get

# Run the app
flutter run

3. Configure Firebase (Optional)

For testing Firebase features:

  1. Create a Firebase project at console.firebase.google.com
  2. Add Android/iOS apps and download google-services.json / GoogleService-Info.plist
  3. Place configuration files in appropriate directories
  4. Run flutterfire configure if available

4. Create a Branch

# Create a feature branch
git checkout -b feature/your-feature-name

# Or for bug fixes
git checkout -b fix/bug-description

Code Standards

Dart Style Guide

We follow the official Dart Style Guide. Key points:

Code Formatting

# Format your code before committing
flutter format .

# Or format specific file
flutter format lib/screens/your_screen.dart

Linting

# Run the linter
flutter analyze

# Fix lint issues when possible
dart fix --apply

Example: Good Code Style

// ✅ Good
class WorkoutService extends ChangeNotifier {
  final List _workouts = [];

  List get workouts => List.unmodifiable(_workouts);

  Future addWorkout(Workout workout) async {
    _workouts.add(workout);
    await _saveToStorage();
    notifyListeners();
  }
}

// ❌ Bad
class workout_service extends ChangeNotifier {
  var workouts = [];

  addWorkout(workout) {
    workouts.add(workout);
    notifyListeners();
  }
}

Commit Guidelines

Commit Message Format

Use conventional commits format:

type(scope): subject

body (optional)

footer (optional)

Types

Examples

feat(analytics): add body weight tracking to progress charts

fix(calendar): remove duplicate workout dialog on date click

docs(formulas): add detailed explanation of strength coefficient

refactor(services): extract data persistence logic to separate class

test(analytics): add unit tests for volume calculations

Best Practices

Pull Request Process

Before Submitting

  1. Ensure your code follows the style guide
  2. Run flutter format . and flutter analyze
  3. Test your changes thoroughly
  4. Update documentation if needed
  5. Add or update tests for new functionality

Submitting a Pull Request

# Commit your changes
git add .
git commit -m "feat(scope): your change description"

# Push to your fork
git push origin feature/your-feature-name

# Open a pull request on GitHub

Pull Request Template

## Description
Brief description of changes

## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update

## Testing
How to test these changes

## Screenshots (if applicable)
Add screenshots for UI changes

## Checklist
- [ ] Code follows style guide
- [ ] Self-review completed
- [ ] Comments added for complex code
- [ ] Documentation updated
- [ ] Tests added/updated
- [ ] No new warnings generated

Review Process

Testing Guidelines

Running Tests

# Run all tests
flutter test

# Run specific test file
flutter test test/services/progress_analytics_service_test.dart

# Run with coverage
flutter test --coverage

Writing Tests

Unit Tests (Services)

import 'package:flutter_test/flutter_test.dart';

void main() {
  group('ProgressAnalyticsService', () {
    late ProgressAnalyticsService service;

    setUp(() {
      service = ProgressAnalyticsService();
    });

    test('calculates strength coefficient correctly', () {
      // Arrange
      final histories = createTestHistories();

      // Act
      final result = service.analyzeOverallStrength(histories);

      // Assert
      expect(result.currentTotalStrength, 150.0);
    });
  });
}

Widget Tests (UI)

testWidgets('displays workout calendar', (tester) async {
  // Build widget
  await tester.pumpWidget(
    MaterialApp(home: FullCalendarScreen()),
  );

  // Verify
  expect(find.text('Workout Calendar'), findsOneWidget);
  expect(find.byType(TableCalendar), findsOneWidget);
});

Test Coverage

Aim for:

Issue Guidelines

Bug Reports

Include the following information:

**Describe the bug**
A clear description of the bug

**To Reproduce**
Steps to reproduce:
1. Go to '...'
2. Click on '...'
3. See error

**Expected behavior**
What should happen

**Screenshots**
If applicable

**Environment:**
- Device: [e.g. Pixel 6]
- OS: [e.g. Android 13]
- App Version: [e.g. 1.0.0]

**Additional context**
Any other relevant information

Feature Requests

**Feature Description**
Clear description of the feature

**Problem It Solves**
What problem does this solve?

**Proposed Solution**
How would you implement this?

**Alternatives Considered**
Other ways to solve this

**Additional Context**
Mockups, examples, etc.

Community Guidelines

Code of Conduct

Communication Channels

Getting Help

If you're stuck:

  1. Check the technical documentation
  2. Search existing GitHub issues
  3. Ask in GitHub Discussions
  4. Reach out to maintainers

Recognition

All contributors will be recognized in:

Types of Contributors

Resources

Learning Resources

Project-Specific

License

By contributing to Forge, you agree that your contributions will be licensed under the same license as the project.

All contributions must be your own work or properly attributed.

Thank You!

Thank you for taking the time to contribute to Forge! Your efforts help make this project better for everyone in the strength training community.

Start Contributing