{"id":28906849,"url":"https://github.com/arpitsingh134/go-data-ingestor","last_synced_at":"2026-05-01T08:31:42.950Z","repository":{"id":299140766,"uuid":"1002175160","full_name":"arpitsingh134/go-data-ingestor","owner":"arpitsingh134","description":"It fetches log data from a public API, applies transformation, and stores it in a MongoDB database running inside a Docker container.","archived":false,"fork":false,"pushed_at":"2025-06-15T20:54:54.000Z","size":6436,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-29T14:50:37.129Z","etag":null,"topics":["docker","git","go","mongodb","mongoexpress"],"latest_commit_sha":null,"homepage":"https://github.com/arpitsingh134/go-data-ingestor","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/arpitsingh134.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":"2025-06-14T21:59:12.000Z","updated_at":"2025-06-15T20:54:57.000Z","dependencies_parsed_at":"2025-06-14T23:19:47.396Z","dependency_job_id":"9f784e0c-47de-4e2c-a946-e486dce86442","html_url":"https://github.com/arpitsingh134/go-data-ingestor","commit_stats":null,"previous_names":["arpitsingh134/go-data-ingestor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arpitsingh134/go-data-ingestor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arpitsingh134%2Fgo-data-ingestor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arpitsingh134%2Fgo-data-ingestor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arpitsingh134%2Fgo-data-ingestor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arpitsingh134%2Fgo-data-ingestor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arpitsingh134","download_url":"https://codeload.github.com/arpitsingh134/go-data-ingestor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arpitsingh134%2Fgo-data-ingestor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32490810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["docker","git","go","mongodb","mongoexpress"],"created_at":"2025-06-21T15:10:16.547Z","updated_at":"2026-05-01T08:31:42.945Z","avatar_url":"https://github.com/arpitsingh134.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Data Ingestion Service\n\nIt fetches log data from a public API, applies transformation, and stores it in a **MongoDB** database running inside a Docker container.\n\nIt also includes:\n- Dockerized setup\n- Unit testing\n- Mongo Express UI for easy database inspection\n- MongoDB shell access via Docker\n\n---\n\n\n## 🚀 Getting Started\n\n### 🔧 Prerequisites\n\n* [Git](https://git-scm.com/)\n* [Docker](https://www.docker.com/)\n* [Docker Compose](https://docs.docker.com/compose/)\n\n### 🧪 Run the Application\n\n```bash\ngit clone https://github.com/your-username/go-data-ingestor.git\ncd go-data-ingestor\ndocker-compose up --build\n```\n\n---\n\n## ✅ Run Tests\n\n```bash\ngo test ./test/...\n```\n\n---\n\n## 🗄️ MongoDB Details\n\n* MongoDB URI: `mongodb://localhost:27017`\n* Database: `logdb`\n* Collection: `posts`\n\n---\n\n## 📊 Viewing Ingested Data\n\n### 🔹 Option 1: Using Mongo Express (Browser UI)\n\n1. Run the app using Docker Compose:\n\n   ```bash\n   docker-compose up --build\n   ```\n\n2. Open your browser:\n\n   ```\n   http://localhost:8081\n   ```\n\n3. You’ll see the Mongo Express dashboard.\n\n4. Navigate to:\n\n   * Database: `logdb`\n   * Collection: `posts`\n\n5. Click to view the ingested JSON documents.\n\n---\n\n### 🔹 Option 2: Using Mongo Shell in Docker\n\n1. Open terminal access to MongoDB:\n\n   ```bash\n   docker exec -it go-data-ingestor-mongo mongosh\n   ```\n\n2. Switch to your database:\n\n   ```js\n   use logdb\n   ```\n\n3. View documents:\n\n   ```js\n   db.posts.find().pretty()\n   ```\n\n---\n\n## 🔁 API Endpoint Used\n\n* Source: [`https://jsonplaceholder.typicode.com/posts`](https://jsonplaceholder.typicode.com/posts)\n\n---\n\n## 🔄 Transformation Logic\n\nEach record from the API is transformed to include:\n\n* `ingested_at`: UTC timestamp at time of ingestion\n* `source`: `\"placeholder_api\"`\n\n---\n\n## 🧪 Trade-offs \u0026 Improvements\n\n* Focused on local-first\n* Could extend to cloud-native storage (e.g., AWS S3 or DynamoDB)\n* Additional observability and retry logic could be added\n* Uses simple MongoDB schema for flexibility and fast prototyping\n\n---\n\n## 🧱 Project Structure\n\n```bash\n.\n├── cmd/\n│   └── main.go                  # Entry point\n├── config/\n│   └── config.go                # MongoDB and app config\n├── internal/\n│   ├── fetcher/                 # API fetching logic\t\n│   ├── transformer/             # Data transformation\n│   ├── repository/              # MongoDB interaction\n│   └── models/                  # Data model definitions\n├── test/                        # Unit tests\n├── go.mod\n├── Dockerfile\n├── docker-compose.yml\n└── README.md\n````\n\n---\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farpitsingh134%2Fgo-data-ingestor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farpitsingh134%2Fgo-data-ingestor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farpitsingh134%2Fgo-data-ingestor/lists"}