Protos
Protocol Buffer definitions for Weebi gRPC services
Overview
This repository contains all .proto files used across Weebi services, including:
- Common types and utilities
- Service definitions (Fence, Article, Contact, Ticket, WeebiApp)
- Domain models (User, Firm, Boutique, Device, etc.)
Documentation
Using protoc-gen-doc (Recommended)
protoc-gen-doc is a Go-based tool that generates HTML, Markdown, or JSON documentation from .proto files.
Installation:
go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@latest
Generate HTML documentation:
protoc --doc_out=docs --doc_opt=html,index.html \
common/*.proto \
article/*.proto \
contact/*.proto \
ticket/*.proto \
*.proto
Open docs/index.html in a web browser to view the generated HTML documentation.
Quick start:
# Generate HTML documentation
bash scripts/generate_docs.sh html
# Or using PowerShell
.\scripts\generate_docs.ps1 html
.\scripts\generate_docs.ps1 markdown
.\scripts\generate_docs.ps1 json
View the generated documentation at docs/index.html.
Versioning
This repository uses semantic versioning. Check .protos-version files in dependent projects to see which version they use.
Current version: See VERSION file
Usage
Go Projects
import "github.com/weebi-com/protos/fence/service"
Dart Projects
import 'package:protos_weebi/protos_weebi.dart';
Generating Code
Go
This repo includes generated Go code. To regenerate:
# From this repo root (requires protoc, protoc-gen-go, protoc-gen-go-grpc)
bash scripts/generate_go.sh
Or run protoc manually – see scripts/generate_go.sh for the exact command.
Consumers (e.g. weebi_express) can use replace github.com/weebi-com/protos => ../protos for local development, or depend on the published module once pushed to GitHub.
Contributing
When adding or modifying proto files:
- Update the version in
VERSION
- Tag the release:
git tag v1.0.0 && git push origin v1.0.0
- Update dependent projects'
.protos-version files
- Regenerate documentation:
bash scripts/generate_docs.sh (done by the CI)
Roadmap
- Pre-commit hooks to verify proto syntax
- CI checks that both projects use the same proto version