{"id":30738722,"url":"https://github.com/ayush2102/grpc-stock-trading-platform","last_synced_at":"2026-04-30T11:32:02.008Z","repository":{"id":312608950,"uuid":"1047631363","full_name":"Ayush2102/grpc-stock-trading-platform","owner":"Ayush2102","description":"Stock trading platform with Spring Boot, gRPC \u0026 GraphQL · Dockerized microservices · Real-time updates · Prometheus + Grafana monitoring","archived":false,"fork":false,"pushed_at":"2025-09-11T18:16:04.000Z","size":40,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-11T21:19:26.039Z","etag":null,"topics":["distributed-systems","docker","grafana","graphql","grpc","java","microservices","prometheus","realtime-data","spring-boot","stock-trading"],"latest_commit_sha":null,"homepage":"","language":"Java","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/Ayush2102.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-30T21:17:10.000Z","updated_at":"2025-09-11T18:25:40.000Z","dependencies_parsed_at":"2025-08-31T22:15:13.825Z","dependency_job_id":"e83714cd-6ea8-4822-b7de-78206b8f76e2","html_url":"https://github.com/Ayush2102/grpc-stock-trading-platform","commit_stats":null,"previous_names":["ayush2102/grpc-stock-trading-platform"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ayush2102/grpc-stock-trading-platform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush2102%2Fgrpc-stock-trading-platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush2102%2Fgrpc-stock-trading-platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush2102%2Fgrpc-stock-trading-platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush2102%2Fgrpc-stock-trading-platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ayush2102","download_url":"https://codeload.github.com/Ayush2102/grpc-stock-trading-platform/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayush2102%2Fgrpc-stock-trading-platform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017949,"owners_count":26086213,"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-10-14T02:00:06.444Z","response_time":60,"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":["distributed-systems","docker","grafana","graphql","grpc","java","microservices","prometheus","realtime-data","spring-boot","stock-trading"],"created_at":"2025-09-03T22:02:48.564Z","updated_at":"2025-10-14T04:22:36.166Z","avatar_url":"https://github.com/Ayush2102.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gRPC + GraphQL Stock Trading Platform\n\nA multi-module Java project using **Spring Boot**, **gRPC** and **GraphQL** to simulate a stock trading platform.  \nIt demonstrates clean module separation, shared protobuf contracts, and containerized deployment.\n\nThe system provides:\n- **gRPC APIs** for efficient service-to-service communication\n- **GraphQL API** layer on the client side for flexible, developer-friendly queries\n## Modules\n\n1. **common-protos** – Contains the shared `.proto` files for server and client communication.\n2. **grpc-stock-trading-server** – Backend microservice that handles stock trading operations (gRPC server, MongoDB persistence).\n3. **grpc-stock-trading-client** – Client app that interacts with the server using gRPC and runs a demo gRPC call at startup\n\n## Features\n\n- gRPC-based communication between server and client\n- GraphQL API layer (client-side) for querying stock data\n- Spring Boot framework with modular design\n- MongoDB integration (server-side)\n- Protobuf for data serialization\n- Multi-module Maven project structure\n- Dockerized setup with docker-compose\n- Environment-based configuration for secrets\n- Monitoring with Prometheus and Grafana\n    - Prometheus collects server and client metrics\n    - Grafana visualizes metrics with dashboards\n\n## Tech Stack\n- Java 17 · Spring Boot 3 · gRPC · GraphQL · Protobuf\n- MongoDB · Maven (multi-module) · Docker \u0026 Docker Compose\n- Prometheus · Grafana · Micrometer (metrics collection)\n\n## GraphQL API\n\nThe client module exposes a GraphQL endpoint for querying stock data.\n\n### Endpoint\n```POST http://localhost:8085/graphql```\n### Example Query\n```graphql\nquery {\n  getStock(symbol: \"AAPL\") {\n    symbol\n    price\n    timestamp\n  }\n}\n```\n### Example Response\n```graphql\n{\n  \"data\": {\n    \"getStock\": {\n      \"symbol\": \"AAPL\",\n      \"price\": 182.36,\n      \"timestamp\": \"2025-09-11T18:45:00Z\"\n    }\n  }\n}\n```\n\n## Run Locally\n1. Create env file:\n    - `.env.local` → `MONGO_USER`, `MONGO_PASS`\n2. In IntelliJ, add these envs to **Run Configurations**.\n3. Run:\n   ```bash\n   ./mvnw -pl grpc-stock-trading-server spring-boot:run\n   ./mvnw -pl grpc-stock-trading-client spring-boot:run\n    ```\n## Run with Docker\n1. Create env file:\n    - `.env.docker` → `MONGO_USER`, `MONGO_PASS`\n2. Run:\n   ```bash\n   docker compose up --build\n    ```\n\n- Server exposed at localhost:9091 (gRPC)\n- Client exposed at localhost:8085\n- Prometheus dashboard at localhost:9095\n- Grafana dashboard at localhost:3000 (default user: admin / password: admin)\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayush2102%2Fgrpc-stock-trading-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayush2102%2Fgrpc-stock-trading-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayush2102%2Fgrpc-stock-trading-platform/lists"}