{"id":49281896,"url":"https://github.com/lavantien/distributed-booking-microservices","last_synced_at":"2026-04-25T19:01:58.496Z","repository":{"id":121275659,"uuid":"444975925","full_name":"lavantien/distributed-booking-microservices","owner":"lavantien","description":"Laptop Booking Application in Golang and gRPC, load-balancing with NGINX, and fully compatible with HTTPS OpenAPI v3","archived":false,"fork":false,"pushed_at":"2026-02-28T08:03:45.000Z","size":276,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-28T13:55:51.462Z","etag":null,"topics":["go","grpc","https","load-balancer","nginx","openapi","ssl","tls"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lavantien.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2022-01-05T23:08:34.000Z","updated_at":"2026-02-28T08:03:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"d611200a-ea31-447a-b5ba-d189fd08b025","html_url":"https://github.com/lavantien/distributed-booking-microservices","commit_stats":null,"previous_names":["lavantien/distributed-booking-microservices"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lavantien/distributed-booking-microservices","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavantien%2Fdistributed-booking-microservices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavantien%2Fdistributed-booking-microservices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavantien%2Fdistributed-booking-microservices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavantien%2Fdistributed-booking-microservices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lavantien","download_url":"https://codeload.github.com/lavantien/distributed-booking-microservices/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavantien%2Fdistributed-booking-microservices/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32273223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["go","grpc","https","load-balancer","nginx","openapi","ssl","tls"],"created_at":"2026-04-25T19:01:56.456Z","updated_at":"2026-04-25T19:01:58.487Z","avatar_url":"https://github.com/lavantien.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laptop Booking Application in Golang and gRPC\n\n![ci-test](https://github.com/lavantien/go-laptop-booking/actions/workflows/ci.yml/badge.svg?branch=master)\n \u003ca href='https://github.com/jpoles1/gopherbadger' target='_blank'\u003e![gopherbadger-tag-do-not-edit](https://img.shields.io/badge/Go%20Coverage-57%25-brightgreen.svg?longCache=true\u0026style=flat)\u003c/a\u003e\n\n## Goals\n\n- [X] GitHub CI \u0026 Coverage Badge\n- [X] Serialize protobuf messages\n- [X] Create laptop unary gRPC\n- [X] Search laptop Server-streaming gRPC\n- [X] Chunk uploading image with client-streaming gRPC\n- [X] Laptop rating bidirectional-streaming gRPC\n- [X] gRPC reflection and Evans CLI + grpcui\n- [X] Add user API\n- [X] gRPC interceptor \u0026 JWT authentication with refresh token\n- [X] Secure gRPC connection with Mutual SSL/TLS\n- [X] Load balancing gRPC Mutual SSL/TLS services with NGINX\n- [X] Generate RESTful service and OpenAPI documentation with gRPC gateway\n- [X] Using Microcks/Postman to test OpenAPI endpoints\n\n## Technology Stack\n\n- **[Go 1.17](https://go.dev/)**\n- **[gRPC](https://grpc.io/)**\n- **[zsh](https://github.com/ohmyzsh/ohmyzsh)**\n- **[panicparse on zsh](https://github.com/maruel/panicparse)**\n- **[Evans CLI](https://github.com/ktr0731/evans)**\n- **[grpcui](https://github.com/fullstorydev/grpcui)**\n- **[golang-jwt](https://github.com/golang-jwt/jwt)**\n- **[linuxbrew](https://docs.brew.sh/Homebrew-on-Linux)**\n- **[NGINX on linuxbrew](https://nginx.org/en/docs/)**\n- **[grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway)**\n- **[Swagger convert to OpenAPI 3](https://editor.swagger.io/)**\n- **[Microcks](https://microcks.io/documentation/getting-started/)**\n\n## Get Start\n\n- Clean the generated Go code: `make clean`\n- Generate Go code of gRPC proto files: `make gen`\n- Run the server: `make server`\n- Run the client: `make client`\n- Run the tests: `make test`\n- Run the coverage and update the badge: `make badge`\n- Run the Evans CLI: `make evans`\n- Run the grpcui Web Interface: `make grpcui`\n- Verify the SSL certs: `make verifyssl`\n- Remake SSL certs: `make cert`\n- Update NGINX configs and certs: `make nginxconf`\n- Start server 1 with TLS: `make server1tls`\n- Start server 2 with TLS: `make server2tls`\n- Start client with TLS: `make clienttls`\n- Start base server: `make server`\n- Start rest server: `make rest`\n- Start client to populate data: `make client`\n\n## Sample\n\n- NGINX config\n\n\u003cdetails\u003e\n\t\u003csummary\u003eSee details\u003c/summary\u003e\n\n```nginx\nworker_processes 1;\n\nerror_log /home/savaka/go/src/github.com/lavantien/go-laptop-booking/log/nginx/error.log;\n\nevents {\n\tworker_connections 10;\n}\n\nhttp {\n\taccess_log /home/savaka/go/src/github.com/lavantien/go-laptop-booking/log/nginx/access.log;\n\n\tupstream auth_services {\n\t\tserver 0.0.0.0:50051;\n\t}\n\n\tupstream laptop_services {\n\t\tserver 0.0.0.0:50052;\n\t}\n\n\tserver {\n\t\tlisten 8080 ssl http2;\n\n\t\t# Mutual TLS between gRPC client and NGINX\n\t\tssl_certificate cert/server-cert.pem;\n\t\tssl_certificate_key cert/server-key.pem;\n\n\t\tssl_client_certificate cert/ca-cert.pem;\n\t\tssl_verify_client on;\n\n\t\tlocation /pb.AuthService {\n\t\t\tgrpc_pass grpcs://auth_services;\n\n\t\t\t# Mutual TLS between NGINX and gRPC server\n\t\t\tgrpc_ssl_certificate cert/server-cert.pem;\n\t\t\tgrpc_ssl_certificate_key cert/server-key.pem;\n\t\t}\n\n\t\tlocation /pb.LaptopService {\n\t\t\tgrpc_pass grpcs://laptop_services;\n\n\t\t\t# Mutual TLS between NGINX and gRPC server\n\t\t\tgrpc_ssl_certificate cert/server-cert.pem;\n\t\t\tgrpc_ssl_certificate_key cert/server-key.pem;\n\t\t}\n\t}\n}\n\n```\n\n\u003c/details\u003e\n\n- Some REST endpoints:\n\n\u003cdetails\u003e\n\t\u003csummary\u003eSee details\u003c/summary\u003e\n\n```bash\nPOST http://localhost:8081/v1/auth/login\n{\n  \"username\": \"admin1\",\n  \"password\": \"secret\"\n}\n# Result\n{\n    \"accessToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NDE4MjkwNTAsInVzZXJuYW1lIjoiYWRtaW4xIiwicm9sZSI6ImFkbWluIn0.ZEXQ6XAiZsuTthepwUVxioYXJX-O0jXBIFaNtnWsicU\"\n}\n\nGET http://localhost:8081/v1/laptop/search?filter.max_price_usd=5000\u0026filter.min_cpu_cores=2\u0026filter.min_cpu_ghz=2.0\u0026filter.min_ram.value=3\u0026filter.min_ram.unit=GIGABYTE\n# Result (not a list because the nature of server-streaming)\n{\n    \"result\": {\n        \"laptop\": {\n            \"id\": \"59811686-1bad-4755-9e00-b6519f082479\",\n            \"brand\": \"Lenovo\",\n            \"name\": \"Thinkpad X1\",\n            \"cpu\": {\n                \"brand\": \"Intel\",\n                \"name\": \"Core i3-1005G1\",\n                \"numberCores\": 7,\n                \"numberThreads\": 11,\n                \"minGhz\": 3.25690128346152,\n                \"maxGhz\": 4.869019798140393\n            },\n            \"ram\": {\n                \"value\": \"13\",\n                \"unit\": \"GIGABYTE\"\n            },\n            \"gpus\": [\n                {\n                    \"brand\": \"NVIDIA\",\n                    \"name\": \"RTX 2060\",\n                    \"minGhz\": 1.4789741714465086,\n                    \"maxGhz\": 1.4922565481488161,\n                    \"memory\": {\n                        \"value\": \"6\",\n                        \"unit\": \"GIGABYTE\"\n                    }\n                }\n            ],\n            \"storages\": [\n                {\n                    \"driver\": \"SSD\",\n                    \"memory\": {\n                        \"value\": \"745\",\n                        \"unit\": \"GIGABYTE\"\n                    }\n                },\n                {\n                    \"driver\": \"HDD\",\n                    \"memory\": {\n                        \"value\": \"1\",\n                        \"unit\": \"TERABYTE\"\n                    }\n                }\n            ],\n            \"screen\": {\n                \"sizeInch\": 13.32892,\n                \"resolution\": {\n                    \"width\": 6499,\n                    \"height\": 3656\n                },\n                \"panel\": \"IPS\",\n                \"multitouch\": false\n            },\n            \"keyboard\": {\n                \"layout\": \"QWERTZ\",\n                \"backlit\": false\n            },\n            \"weightKg\": 1.7393324744695426,\n            \"priceUsd\": 1501.6397915075097,\n            \"releaseYear\": 2016,\n            \"updatedAt\": \"2022-01-10T15:36:56.420852677Z\"\n        }\n    }\n}\n{\n    \"result\": {\n        \"laptop\": {\n            \"id\": \"d05e0809-09d2-4f7e-8fed-b1089513885d\",\n            \"brand\": \"Apple\",\n            \"name\": \"Macbook Pro\",\n            \"cpu\": {\n                \"brand\": \"Intel\",\n                \"name\": \"Core i7-9750H\",\n                \"numberCores\": 6,\n                \"numberThreads\": 11,\n                \"minGhz\": 3.1830385478225462,\n                \"maxGhz\": 4.256661649154569\n            },\n            \"ram\": {\n                \"value\": \"18\",\n                \"unit\": \"GIGABYTE\"\n            },\n            \"gpus\": [\n                {\n                    \"brand\": \"NVIDIA\",\n                    \"name\": \"RTX 2070\",\n                    \"minGhz\": 1.4077473666779245,\n                    \"maxGhz\": 1.964320393328977,\n                    \"memory\": {\n                        \"value\": \"2\",\n                        \"unit\": \"GIGABYTE\"\n                    }\n                }\n            ],\n            \"storages\": [\n                {\n                    \"driver\": \"SSD\",\n                    \"memory\": {\n                        \"value\": \"303\",\n                        \"unit\": \"GIGABYTE\"\n                    }\n                },\n                {\n                    \"driver\": \"HDD\",\n                    \"memory\": {\n                        \"value\": \"2\",\n                        \"unit\": \"TERABYTE\"\n                    }\n                }\n            ],\n            \"screen\": {\n                \"sizeInch\": 16.230564,\n                \"resolution\": {\n                    \"width\": 3004,\n                    \"height\": 1690\n                },\n                \"panel\": \"OLED\",\n                \"multitouch\": false\n            },\n            \"keyboard\": {\n                \"layout\": \"QWERTY\",\n                \"backlit\": true\n            },\n            \"weightKg\": 1.344500870876185,\n            \"priceUsd\": 2369.4463119126813,\n            \"releaseYear\": 2017,\n            \"updatedAt\": \"2022-01-10T15:36:56.421404861Z\"\n        }\n    }\n}\n```\n\n\u003c/details\u003e\n\n- Laptop JSON\n\n\u003cdetails\u003e\n\t\u003csummary\u003eSee datails\u003c/summary\u003e\n\n```json\n{\n  \"id\": \"21d24c33-13fc-49cb-9e15-85969be270b5\",\n  \"brand\": \"Apple\",\n  \"name\": \"Macbook Pro\",\n  \"cpu\": {\n    \"brand\": \"AMD\",\n    \"name\": \"Ryzen 7 PRO 2700U\",\n    \"number_cores\": 4,\n    \"number_threads\": 11,\n    \"min_ghz\": 2.4010226599566113,\n    \"max_ghz\": 3.3472808181192493\n  },\n  \"ram\": {\n    \"value\": \"56\",\n    \"unit\": \"GIGABYTE\"\n  },\n  \"gpus\": [\n    {\n      \"brand\": \"AMD\",\n      \"name\": \"RX 580\",\n      \"min_ghz\": 1.438777166984461,\n      \"max_ghz\": 1.9419486357490028,\n      \"memory\": {\n        \"value\": \"6\",\n        \"unit\": \"GIGABYTE\"\n      }\n    }\n  ],\n  \"storages\": [\n    {\n      \"driver\": \"SSD\",\n      \"memory\": {\n        \"value\": \"712\",\n        \"unit\": \"GIGABYTE\"\n      }\n    },\n    {\n      \"driver\": \"HDD\",\n      \"memory\": {\n        \"value\": \"3\",\n        \"unit\": \"TERABYTE\"\n      }\n    }\n  ],\n  \"screen\": {\n    \"size_inch\": 15.036544,\n    \"resolution\": {\n      \"width\": 4325,\n      \"height\": 2433\n    },\n    \"panel\": \"OLED\",\n    \"multitouch\": false\n  },\n  \"keyboard\": {\n    \"layout\": \"AZERTY\",\n    \"backlit\": false\n  },\n  \"weight_kg\": 1.7960889307648087,\n  \"price_usd\": 1841.1951352165595,\n  \"release_year\": 2015,\n  \"updated_at\": \"2022-01-06T22:55:18.744484334Z\"\n}\n```\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flavantien%2Fdistributed-booking-microservices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flavantien%2Fdistributed-booking-microservices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flavantien%2Fdistributed-booking-microservices/lists"}