{"id":22170074,"url":"https://github.com/pieceowater-dev/lotof.sample.gtw","last_synced_at":"2025-08-02T05:39:17.863Z","repository":{"id":263670222,"uuid":"891082665","full_name":"pieceowater-dev/lotof.sample.gtw","owner":"pieceowater-dev","description":"Template structure to generate, build, and run a GraphQL server using gqlgen","archived":false,"fork":false,"pushed_at":"2025-04-09T18:31:27.000Z","size":134,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T19:38:26.149Z","etag":null,"topics":["gateway","golang","graphql","grpc","grpc-client","grpc-go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pieceowater-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-19T17:38:14.000Z","updated_at":"2025-04-09T18:31:31.000Z","dependencies_parsed_at":"2024-11-19T20:24:59.931Z","dependency_job_id":"b2cd72ae-efda-4264-926f-0432f1478c38","html_url":"https://github.com/pieceowater-dev/lotof.sample.gtw","commit_stats":null,"previous_names":["pieceowater-dev/lotof.sample.gtw"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/pieceowater-dev/lotof.sample.gtw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pieceowater-dev%2Flotof.sample.gtw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pieceowater-dev%2Flotof.sample.gtw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pieceowater-dev%2Flotof.sample.gtw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pieceowater-dev%2Flotof.sample.gtw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pieceowater-dev","download_url":"https://codeload.github.com/pieceowater-dev/lotof.sample.gtw/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pieceowater-dev%2Flotof.sample.gtw/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268339415,"owners_count":24234545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gateway","golang","graphql","grpc","grpc-client","grpc-go"],"created_at":"2024-12-02T06:38:34.835Z","updated_at":"2025-08-02T05:39:17.812Z","avatar_url":"https://github.com/pieceowater-dev.png","language":"Go","readme":"# lotof.sample.gateway\n\nWelcome to the **Lotof Sample Gateway** project! This project provides a structure to generate, build, and run a [GraphQL](https://graphql.org/) server using [gqlgen](https://github.com/99designs/gqlgen) and [Docker](https://www.docker.com/) for containerization. Below you'll find a comprehensive guide to get started with this project.\n\n## Prerequisites\n\nBefore you begin, ensure you have the following installed on your machine:\n\n- [Go](https://golang.org/doc/install) (version 1.23 or later)\n- [Docker](https://docs.docker.com/get-docker/)\n- [Docker Compose](https://docs.docker.com/compose/install/)\n\n## Makefile Targets\n\nThe project uses a Makefile to automate common tasks. Below are the available make targets and their functionalities:\n\n### `make all`\n\n- **Description**: Generates the necessary Go files for gqlgen, gRPC, and runs the server.\n- **Commands**:\n    - Executes the `gqlgen` and `grpcgen` targets.\n    - Starts the server using `make run`.\n\n### `make gql-gen`\n\n- **Description**: Generates the Go code required for your GraphQL server.\n- **Commands**:\n    - Executes `$(GQLGEN) generate` to generate GraphQL server code.\n    - Cleans up dependencies with `go mod tidy`.\n\n### `make grpc-gen`\n\n- **Description**: Generates Go stubs for gRPC services.\n- **Commands**:\n    - Uses `$(PROTOC)` with plugins `protoc-gen-go` and `protoc-gen-go-grpc`.\n    - Places the generated files in `./internal/core/grpc/generated`.\n\n### `make run`\n\n- **Description**: Runs the GraphQL server.\n- **Commands**:\n    - Executes `go run ./cmd/server/main.go` to start the server.\n\n### `make build-dev`\n\n- **Description**: Builds a Docker image for the development environment.\n- **Commands**:\n    - Builds Docker image using `dev.dockerfile` and names it `gateway-dev`.\n\n### `make build-main`\n\n- **Description**: Builds a Docker image for the production environment.\n- **Commands**:\n    - Builds Docker image using `main.dockerfile` and names it `gateway-prod`.\n\n### `make compose-up`\n\n- **Description**: Starts the services defined in `docker-compose.yml`.\n- **Commands**:\n    - Runs `$(DOCKER_COMPOSE) up -d` to start services in detached mode.\n\n### `make compose-down`\n\n- **Description**: Stops and removes the services defined in `docker-compose.yml`.\n- **Commands**:\n    - Runs `$(DOCKER_COMPOSE) down` to stop the services.\n\n### `make clean`\n\n- **Description**: Cleans up generated files.\n- **Commands**:\n    - Removes the files in `internal/core/grpc/generated` and GraphQL-related generated files.\n\n## Getting Started\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/pieceowater-dev/lotof.sample.gtw.git\n   cd lotof.sample.gtw\n   ```\n\n2.\tInstall dependencies:\n\n   ```bash\n   go mod tidy\n   ```\n\n3. **Generate GraphQL files** and start the server:\n\n   ```bash\n   make all\n   ```\n\n4. (Optional) To build Docker images for development or production:\n\n   ```bash\n   make build\n   ```\n\n5.\t(Optional) To manage Docker services:\n\n      ```bash\n      make compose-up   # Start services\n      make compose-down # Stop services\n      ```\n\n## Notes\n\n- Customize `Dockerfile` as needed for your project's specific requirements.\n- The server entry point is at `./cmd/server/main.go`.\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Author\n![PCWT Dev Logo](https://avatars.githubusercontent.com/u/168465239?s=50)\n### [PCWT Dev](https://github.com/pieceowater-dev)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpieceowater-dev%2Flotof.sample.gtw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpieceowater-dev%2Flotof.sample.gtw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpieceowater-dev%2Flotof.sample.gtw/lists"}