Skip to content

Latest commit

 

History

History
107 lines (72 loc) · 2.76 KB

File metadata and controls

107 lines (72 loc) · 2.76 KB

Contributing to FyneWire

First, thanks for your interest! 🫱‍🫲 FyneWire welcomes new features, plugins, and bugfixes from everyone—especially if you care about networking, UI, or applied AI.


How to contribute

  1. Fork this repository and create a new branch for your changes.

  2. Write clear, modular Go code—prefer interfaces and clean package structure.

  3. If touching C, keep the glue code as minimal and portable as possible.

  4. Add or update tests for your code (go test ./...).

  5. Before you submit, run:

    make vet
    go test ./...
  6. Open a Pull Request with a clear description. If you add a feature, demo it in screenshots/gifs if possible!


Coding style

  • Go:

    • Use gofmt and idiomatic error handling.
    • Favor interfaces and the Strategy / Decorator patterns for pluggable features.
    • Avoid global state unless absolutely necessary (the UI uses app-wide singletons only for windows/theming).
  • C (libpcap glue):

    • Make changes only if you’re fixing bugs or adding core protocol support.
    • Don’t bake filtering or decoding logic into C—leave that to Go.
  • UI:

    • Use Fyne idioms.
    • Keep the UI reactive; refresh widgets on data/model changes.

Adding features

  • New filters: Implement as Go strategies or decorators—see internal/ai and internal/model.

  • Gemini/AI:

    • Use the Google generative-ai-go SDK.
    • Handle all errors and show clear UI feedback.
    • Be mindful of API quotas—use your own key for dev/testing.
  • Plugins:

    • Place protocol/enricher plugins in the internal/plugins/ folder (or propose a new subpackage).

Building and running

  • Install Go 1.21+

  • Get system deps (libpcap-dev, X11/OpenGL dev packages for Linux, Homebrew/Xcode for macOS)

  • Build with:

    make
  • Run with:

    make run
  • AI: Set your Gemini API key in the GUI (top bar), or via environment:

    export GEMINI_API_KEY=...

Tests & CI

  • Unit tests:

    go test ./...
  • Fyne GUI tests: Headless testing via Fyne’s testdriver.

  • CI: PRs are built & tested by GitHub Actions.


Questions? Ideas? Bugs?

  • Open an Issue with steps to reproduce or your proposal.
  • For general Go, Fyne, or pcap issues, please link to docs or reference code where possible.

License

By contributing, you agree your code will be MIT-licensed as per LICENSE.


Happy hacking! 🚦🧠🖥️