GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — TapIn/CONTRIBUTING.md at main · sakialabs/TapIn

Expand file tree

/

CONTRIBUTING.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
269 lines (211 loc) · 6.63 KB
/

CONTRIBUTING.md

Copy path

File metadata and controls

269 lines (211 loc) · 6.63 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

Contributing to TapIn

Thank you for your interest in contributing to TapIn! We're building an open-source keyless living platform, and we welcome contributions from developers, designers, testers, and documentation writers.

Table of Contents

  • Code of Conduct
  • Getting Started
  • Development Workflow
  • Coding Standards
  • Testing Guidelines
  • Submitting Changes
  • Reporting Issues
  • Community

Code of Conduct

We are committed to providing a welcoming and inclusive environment. Please be respectful, constructive, and professional in all interactions.

Getting Started

  1. Fork the repository on GitHub
  2. Clone your fork locally:
    git clone https://github.com/your-username/tapin.git
    cd tapin
  3. Set up your development environment:
    scripts\verify.bat
    scripts\setup-docker.bat
  4. Create a new branch for your feature or fix:
    git checkout -b feature/your-feature-name

Development Workflow

Backend Development

The backend is built with Django REST Framework and PostgreSQL.

# Run backend tests
scripts\test-backend.bat

# Run specific test file
docker-compose exec backend pytest backend/tests/unit/test_auth.py

# Access Django shell
docker-compose exec backend python manage.py shell

# Create migrations
docker-compose exec backend python manage.py makemigrations

# Apply migrations
docker-compose exec backend python manage.py migrate

Frontend Development

The frontend is built with Next.js, React, and TypeScript.

# Run frontend tests
scripts\test-frontend.bat

# Run frontend in development mode
cd frontend
npm run dev

# Build for production
npm run build

# Run linter
npm run lint

Coding Standards

Backend (Python)

  • Follow PEP 8 style guide
  • Use type hints where appropriate
  • Write docstrings for all public functions and classes
  • Keep functions focused and under 50 lines when possible
  • Use meaningful variable and function names

Example:

def create_wallet_pass(user: User, unit: Unit) -> WalletPass:
    """
    Create a new wallet pass for a tenant.
    
    Args:
        user: The tenant user
        unit: The unit to grant access to
        
    Returns:
        WalletPass: The created wallet pass
        
    Raises:
        ValidationError: If user or unit is invalid
    """
    # Implementation

Frontend (TypeScript/React)

  • Use TypeScript for all new code
  • Follow React best practices and hooks patterns
  • Use functional components over class components
  • Keep components small and focused
  • Use proper TypeScript types (avoid any)
  • Follow the existing file structure

Example:

interface ButtonProps {
  variant: 'primary' | 'secondary';
  onClick: () => void;
  children: React.ReactNode;
  disabled?: boolean;
}

export function Button({ variant, onClick, children, disabled }: ButtonProps) {
  return (
    <button
      onClick={onClick}
      disabled={disabled}
      className={`btn btn-${variant}`}
    >
      {children}
    </button>
  );
}

Styling

  • Use TailwindCSS utility classes
  • Follow the design system in docs/styles.md
  • Support both light and dark modes
  • Ensure responsive design (mobile-first)
  • Use the slate color palette for consistency

Testing Guidelines

Backend Tests

  • Write unit tests for all new features
  • Use pytest fixtures for test data
  • Test both success and error cases
  • Use property-based testing (Hypothesis) for complex logic
  • Aim for 80%+ code coverage
def test_create_guest_pass_success(tenant_user, unit):
    """Test successful guest pass creation."""
    pass_data = {
        'unit': unit.id,
        'guest_name': 'John Doe',
        'valid_from': timezone.now(),
        'valid_until': timezone.now() + timedelta(days=1)
    }
    guest_pass = create_guest_pass(tenant_user, pass_data)
    assert guest_pass.guest_name == 'John Doe'
    assert guest_pass.is_active()

Frontend Tests

  • Write tests for components and utilities
  • Use Jest and React Testing Library
  • Test user interactions and edge cases
  • Mock API calls appropriately
describe('Button', () => {
  it('calls onClick when clicked', () => {
    const handleClick = jest.fn();
    render(<Button onClick={handleClick}>Click me</Button>);
    
    fireEvent.click(screen.getByText('Click me'));
    expect(handleClick).toHaveBeenCalledTimes(1);
  });
});

Submitting Changes

  1. Ensure all tests pass:

    scripts\test-backend.bat
    scripts\test-frontend.bat
  2. Ensure the build succeeds:

    cd frontend
    npm run build
  3. Commit your changes with a clear message:

    git add .
    git commit -m "feat: add guest pass expiration notifications"

    Use conventional commit format:

    • feat: for new features
    • fix: for bug fixes
    • docs: for documentation changes
    • style: for formatting changes
    • refactor: for code refactoring
    • test: for adding tests
    • chore: for maintenance tasks
  4. Push to your fork:

    git push origin feature/your-feature-name
  5. Create a Pull Request on GitHub:

    • Provide a clear title and description
    • Reference any related issues
    • Include screenshots for UI changes
    • Ensure CI checks pass

Reporting Issues

When reporting bugs or requesting features:

  1. Search existing issues to avoid duplicates
  2. Use issue templates when available
  3. Provide clear reproduction steps for bugs
  4. Include relevant details:
    • Operating system
    • Browser version (for frontend issues)
    • Python/Node.js version
    • Error messages and stack traces
    • Screenshots or videos

Community

  • Discussions: Use GitHub Discussions for questions and ideas
  • Issues: Use GitHub Issues for bugs and feature requests
  • Pull Requests: Submit PRs for code contributions
  • Documentation: Help improve docs in the docs/ folder

Areas We Need Help

  • 🐛 Bug fixes and testing
  • 📱 Mobile wallet integration improvements
  • 🎨 UI/UX design and accessibility
  • 📝 Documentation and tutorials
  • 🔐 Security audits and improvements
  • 🌐 Internationalization (i18n)
  • 🧪 Test coverage expansion
  • 🚀 Performance optimizations

Questions?

If you have questions about contributing, feel free to:

  • Open a discussion on GitHub
  • Comment on relevant issues
  • Reach out to the maintainers

Thank you for contributing to TapIn! Together, we're building a more accessible and secure future for keyless living.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.