{"id":20694708,"url":"https://github.com/arttet/reddit-feed-api","last_synced_at":"2025-06-22T19:36:07.852Z","repository":{"id":38271711,"uuid":"406459403","full_name":"arttet/reddit-feed-api","owner":"arttet","description":":pick: Backend Challenge: Reddit Feed API","archived":false,"fork":false,"pushed_at":"2024-12-23T05:03:29.000Z","size":408,"stargazers_count":11,"open_issues_count":17,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T20:03:42.469Z","etag":null,"topics":["docker","docker-compose","go","golang","grafana","grafana-dashboard","grpc","jaeger","jaegertracing","kafka","kafka-ui","opentelemetry","opentelemetry-go","postgresql","prometheus","prometheus-metrics","reddit","sql","swagger","swagger-ui"],"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/arttet.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}},"created_at":"2021-09-14T17:18:46.000Z","updated_at":"2025-01-29T18:59:44.000Z","dependencies_parsed_at":"2025-04-22T19:59:43.330Z","dependency_job_id":"879a16b1-c74f-4797-b924-40ef22c29b32","html_url":"https://github.com/arttet/reddit-feed-api","commit_stats":{"total_commits":46,"total_committers":2,"mean_commits":23.0,"dds":"0.28260869565217395","last_synced_commit":"d0a8e378e945f50b5f6ff49c7e21e3777a2262c9"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/arttet/reddit-feed-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arttet%2Freddit-feed-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arttet%2Freddit-feed-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arttet%2Freddit-feed-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arttet%2Freddit-feed-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arttet","download_url":"https://codeload.github.com/arttet/reddit-feed-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arttet%2Freddit-feed-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261353179,"owners_count":23146200,"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","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":["docker","docker-compose","go","golang","grafana","grafana-dashboard","grpc","jaeger","jaegertracing","kafka","kafka-ui","opentelemetry","opentelemetry-go","postgresql","prometheus","prometheus-metrics","reddit","sql","swagger","swagger-ui"],"created_at":"2024-11-17T00:06:07.634Z","updated_at":"2025-06-22T19:36:02.817Z","avatar_url":"https://github.com/arttet.png","language":"Go","readme":"# Reddit Feed API\n\n[![Go](https://img.shields.io/badge/Go-1.20-blue.svg)](https://golang.org)\n[![build](https://github.com/arttet/reddit-feed-api/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/arttet/reddit-feed-api/actions/workflows/build.yml)\n[![tests](https://github.com/arttet/reddit-feed-api/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/arttet/reddit-feed-api/actions/workflows/tests.yml)\n[![codecov](https://codecov.io/gh/arttet/reddit-feed-api/branch/main/graph/badge.svg?token=S5a5aZsotj)](https://codecov.io/gh/arttet/reddit-feed-api)\n[![Go Report Card](https://goreportcard.com/badge/github.com/arttet/reddit-feed-api)](https://goreportcard.com/report/github.com/arttet/reddit-feed-api)\n[![Swagger Validator](https://img.shields.io/swagger/valid/3.0?specUrl=https%3A%2F%2Fraw.githubusercontent.com%2Farttet%2Freddit-feed-api%2Fmain%2Fapi%2Fopenapi-spec%2Fapi.swagger.json)](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/arttet/reddit-feed-api/main/api/openapi-spec/api.swagger.json)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/arttet/reddit-feed-api/blob/main/LICENSE)\n\n## Environment Setup\n\n1. Install the latest Go from https://go.dev/\n1. Install `make` and `curl` tools.\n1. Install PostgreSQL 13 or later from https://www.postgresql.org/download/\n1. Install the latest Jaeger from https://www.jaegertracing.io/\n1. Install the latest Prometheus from https://prometheus.io/\n1. Install OpenJDK 17 from https://openjdk.java.net/projects/jdk/17/\n1. Install Kafka 3.1.0 or later from https://kafka.apache.org/\n1. Install the latest Docker from https://www.docker.com/\n\n## Usage\n\n```sh\n$ make help\n  Local commands\nhelp:    Show this help\nall:     Run the all build commands\nreqs:    Install requirements\ndeps:    Build and install Go dependencies\ngen:     Generate Go code\nbuild:   Compile the current package and all of its dependencies\ntest:    Execute the unit tests\nbench:   Execute the benchmark tests\nlint:    Check the current package to catch common mistakes and improve the code\ntidy:    Cleanup go.mod\nfmt:     Format *.go and *.proto files using gofmt and clang-format\ncover:   Show the cover report\ngrpcui:  Run the grpcui tool\nclean:   Remove generated artifacts\nupdate:  Update dependencies as recorded in the go.mod and go.sum files\n  Docker commands\nimage:           Build Dockerfile\ndebug-image:     Build Dockerfile.debug\ndc-build:        Build docker-compose.yaml\nup:              Up reddit-feed-api\ndown:            Down reddit-feed-api\nrm:              Remove Docker artifacts\n  CLI commands\nrun:             Run reddit-feed-api locally\ncli-create:      Run the CreatePostsV1 handle\ncli-generate:    Run the GenerateFeedV1 handle\nproducer:        Run the Kafka producer command\nconsumer:        Run the Kafka consumer command\n```\n\n## Reddit Feed API Overview\n\n### [REST API Handlers](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/arttet/reddit-feed-api/main/api/openapi-spec/api.swagger.json)\n\n| Method | Path                                                  | Description              |\n| :----: | :---------------------------------------------------: | :----------------------: |\n| POST   | [/v1/posts](http://localhost:8081/v1/posts)           | Create new posts         |\n| GET    | [/v1/feed/{page_id}](http://localhost:8081/v1/feed/1) | Generate a feed of posts |\n\n### [REST API Server (gRPC-Gateway)](https://github.com/grpc-ecosystem/grpc-gateway)\n\n* http://localhost:8080\n\n### [gRPC Server](https://github.com/grpc/grpc-go)\n\n* http://localhost:8082\n\n### Metrics Server\n\n* http://localhost:9100/metrics\n    * `http_microservice_requests_total`\n    * `reddit_feed_api_feed_not_found_total`\n\n### Status Server\n\n* http://localhost:8000\n    * [/live](http://localhost:8000/live)- Layed whether the server is running\n    * [/ready](http://localhost:8000/ready) - Is it ready to accept requests?\n    * [/version](http://localhost:8000/version) - Version and assembly information\n    * [/debug/pprof](http://localhost:8000/debug/pprof) - Profiles when profiling enables\n\n### [Apache Kafka](https://kafka.apache.org/)\n\n* http://localhost:9094\n\n### [PostgreSQL](https://www.postgresql.org/docs/)\n\n* [pgcli](https://github.com/dbcli/pgcli)\n\n```sh\npgcli \"postgresql://docker:docker@localhost:5432/reddit_feed_api\"\n```\n\n* [goose](https://github.com/pressly/goose)\n\n```sh\ngoose -dir migrations/reddit-feed-api postgres \"postgresql://docker:docker@localhost:5432/reddit_feed_api\" status\ngoose -dir migrations/reddit-feed-api postgres \"postgresql://docker:docker@localhost:5432/reddit_feed_api\" up\ngoose -dir migrations/reddit-feed-api postgres \"postgresql://docker:docker@localhost:5432/reddit_feed_api\" status\n```\n\n\n## Tools (Use docker-compose)\n\n### [Jaeger UI](https://www.jaegertracing.io/)\n\n* http://localhost:16686\n\n### [Prometheus UI](https://prometheus.io/)\n\n* http://localhost:9090\n\n\n### [Swagger UI](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/arttet/reddit-feed-api/main/api/openapi-spec/api.swagger.json)\n\n* http://localhost:7000\n\n### [Grafana](https://grafana.com/oss/grafana/)\n\n* http://localhost:3000\n    * login `admin`\n    * password `ADMIN`\n    * [Dashboard: Reddit Feed API](http://localhost:3000/d/QXuFMwN7z/reddit-feed-api?orgId=1\u0026refresh=5s)\n\n### [Kafka UI](https://github.com/provectus/kafka-ui)\n\n* http://localhost:9001\n\n### [Graylog](https://www.graylog.org/)\n\n* http://localhost:9000\n    * login `admin`\n    * password `admin`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farttet%2Freddit-feed-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farttet%2Freddit-feed-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farttet%2Freddit-feed-api/lists"}