Skip to content

Conversation

jayjay19630
Copy link

Adds microservice folder structure and implements basic CRUD API as follows:

  • /cmd
    • /command
  • /internal
    • /handlers
    • /models
    • /repositories
    • /routers

Feel free to comment on this structure (since we will likely reuse it for other microservices as well).

@jayjay19630 jayjay19630 added Enhancement New feature or request L 200-500 Lines changed labels Sep 19, 2025
hjungwoo01
hjungwoo01 previously approved these changes Sep 19, 2025
Copy link

@hjungwoo01 hjungwoo01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hjungwoo01 hjungwoo01 requested a review from Copilot September 19, 2025 12:59
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR establishes a clean microservice architecture for the user service by implementing basic CRUD operations following a layered design pattern. The implementation provides a foundation that can be reused across other microservices in the system.

  • Implements complete CRUD API endpoints for user management (create, read, update, delete)
  • Establishes a clean separation of concerns with handlers, repositories, models, and routers
  • Replaces stub authentication endpoints with proper database-backed user operations

Reviewed Changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
services/user/internal/routers/user_routes.go Defines REST API routes for user CRUD operations
services/user/internal/repositories/user_repository.go Implements database operations using GORM with proper error handling
services/user/internal/models/user.go Defines User model with GORM annotations for database mapping
services/user/internal/handlers/user_crud_handler.go Implements HTTP handlers for CRUD operations with JSON serialization
services/user/go.mod Adds GORM and PostgreSQL driver dependencies
services/user/cmd/server/main.go Updates main server to use new CRUD handlers and database connection

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

@josejhkim josejhkim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request L 200-500 Lines changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants