Skip to content

feat: im#4

Merged
pingxin403 merged 41 commits into
mainfrom
feature-im
Jan 27, 2026
Merged

feat: im#4
pingxin403 merged 41 commits into
mainfrom
feature-im

Conversation

@pingxin403

Copy link
Copy Markdown
Owner

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test coverage improvement

Related Issues

Fixes #
Related to #

Changes Made

Services Affected

  • Hello Service (Java)
  • TODO Service (Go)
  • Web Application (React)
  • API Contract (Protobuf)
  • Infrastructure/Tools
  • Documentation

Testing

Unit Tests

  • Added/updated unit tests
  • All unit tests pass

Integration Tests

  • Added/updated integration tests
  • All integration tests pass

Manual Testing

Checklist

  • My code follows the project's code style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Protobuf Changes (if applicable)

  • I have updated the Protobuf definitions in api/v1/
  • I have run make proto to generate code for all languages
  • I have committed the generated code
  • I have verified that make verify-proto passes

Documentation (if applicable)

  • I have updated the README.md
  • I have updated API documentation
  • I have updated architecture diagrams (if needed)

Screenshots (if applicable)

Additional Notes

Reviewer Notes


For Reviewers:

  • Code quality and style
  • Test coverage
  • Documentation completeness
  • Breaking changes identified
  • Performance implications considered

- Reorganize api/gen directory structure by language
- Create api/gen/go/, api/gen/java/, api/gen/typescript/ directories
- Add Go module configuration in api/gen/go/go.mod
- Add TypeScript package configuration in api/gen/typescript/
- Create new proto-generator-new.sh script for centralized generation
- Update Makefile to use new script and directory structure
- Generate all proto code to centralized locations
- Add comprehensive README.md documentation

This change simplifies the build process by:
- Eliminating per-service proto generation
- Reducing Docker image sizes (no protoc needed)
- Improving build times (no proto compilation in Docker)
- Centralizing all generated code in one location
- Install protoc-gen-grpc-java plugin
- Generate all Java protobuf code to api/gen/java/
- Code organized by package: com.pingxin403.cuckoo and com.myorg.api
- All proto files successfully compiled to Java classes
- Ready for Java services to use centralized generated code
- Updated all Go services to use api/gen/go/* imports
- Updated go.mod files to reference api/gen/go module
- Simplified Dockerfiles by removing protoc installation
- Removed local gen/ directories from all Go services
- All tests passing

Services migrated:
- auth-service
- user-service
- im-service
- im-gateway-service

This completes Phase 2 of the centralized proto generation migration.
- Updated all proto files to use consistent java_package naming
- Changed hello.proto and todo.proto from com.myorg.api.v1 to com.pingxin403.cuckoo.{service}.v1
- Changed shortener_service.proto from com.pingxin403.api.v1 to com.pingxin403.cuckoo.shortener.v1
- Updated all proto files to use centralized go_package paths (api/gen/go/*)
- Regenerated all proto code for Go, Java, and TypeScript
- Removed old com/myorg and com/pingxin403/api directories
- Updated hello-service Java imports (service and test files) to use new package names
- All Java code now under com/pingxin403/cuckoo/* for consistency
- All tests passing (Java, Go, TypeScript)
- Renamed im_gateway_service.proto -> gateway.proto
- Renamed shortener_service.proto -> shortener.proto
- Updated go_package to use shorter names (gatewaypb, shortenerpb)
- Migrated shortener-service to centralized proto generation
- Updated all import paths in shortener-service
- Simplified Dockerfile (removed protoc installation)
- All tests passing
… naming

- Renamed api/v1/gateway.proto to api/v1/im-gateway.proto for clarity
- Updated go_package to use im-gatewaypb instead of gatewaypb
- Updated proto generation script to map im-gateway -> im-gatewaypb
- Updated proto generation script to map shortener -> shortenerpb
- Regenerated all proto code with new directory structure
- Cleaned up old generated files

Directory structure now:
- api/gen/go/im-gatewaypb/ (was gatewaypb/)
- api/gen/go/shortenerpb/ (was shortener_servicepb/)
- api/gen/typescript/im-gatewaypb/ (was gatewaypb/)
- api/gen/typescript/shortenerpb/ (was shortener_servicepb/)
@pingxin403 pingxin403 merged commit 73bcc02 into main Jan 27, 2026
14 checks passed
@pingxin403 pingxin403 deleted the feature-im branch January 27, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant