{"id":30705087,"url":"https://github.com/eshaffer321/monarchmoney-walmart-server","last_synced_at":"2025-10-09T15:40:55.008Z","repository":{"id":312642702,"uuid":"1048170985","full_name":"eshaffer321/monarchmoney-walmart-server","owner":"eshaffer321","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-01T03:47:36.000Z","size":28992,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-01T05:54:29.149Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/eshaffer321.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":null,"dco":null,"cla":null}},"created_at":"2025-09-01T03:32:43.000Z","updated_at":"2025-09-01T03:35:09.000Z","dependencies_parsed_at":"2025-09-01T06:04:33.637Z","dependency_job_id":null,"html_url":"https://github.com/eshaffer321/monarchmoney-walmart-server","commit_stats":null,"previous_names":["eshaffer321/monarchmoney-walmart-server"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/eshaffer321/monarchmoney-walmart-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshaffer321%2Fmonarchmoney-walmart-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshaffer321%2Fmonarchmoney-walmart-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshaffer321%2Fmonarchmoney-walmart-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshaffer321%2Fmonarchmoney-walmart-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eshaffer321","download_url":"https://codeload.github.com/eshaffer321/monarchmoney-walmart-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshaffer321%2Fmonarchmoney-walmart-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001651,"owners_count":26083147,"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-09T02:00:07.460Z","response_time":59,"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":[],"created_at":"2025-09-02T18:08:26.548Z","updated_at":"2025-10-09T15:40:54.961Z","avatar_url":"https://github.com/eshaffer321.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Walmart-Monarch Money Sync Backend\n\n[![CI](https://github.com/eshaffer321/monarchmoney-walmart-server/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/eshaffer321/monarchmoney-walmart-server/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/eshaffer321/monarchmoney-walmart-server/graph/badge.svg)](https://codecov.io/gh/eshaffer321/monarchmoney-walmart-server)\n[![Go Report Card](https://goreportcard.com/badge/github.com/eshaffer321/monarchmoney-walmart-server)](https://goreportcard.com/report/github.com/eshaffer321/monarchmoney-walmart-server)\n\nA Go backend server that receives Walmart order data from a Chrome extension and syncs it with Monarch Money for intelligent transaction categorization and splitting.\n\n## Overview\n\nThis backend is part of a larger system that automatically transforms single Walmart transactions in Monarch Money into properly categorized, split transactions that accurately reflect what was purchased.\n\n**Example**: A $150 Walmart transaction becomes:\n- $50 - Groceries (milk, bread, eggs)\n- $30 - Home \u0026 Garden (cleaning supplies) \n- $40 - Electronics (phone charger, batteries)\n- $30 - Personal Care (shampoo, toothpaste)\n\n## Architecture\n\n```\nChrome Extension → Go Backend → LLM API → Monarch Money API\n     ↓                ↓            ↓            ↓\nScrape Orders    Process      Categorize    Split \u0026 Update\nfrom Walmart      Orders        Items        Transactions\n```\n\n## Current Status\n\n✅ **Phase 1 Implementation Complete**:\n- Health check endpoint with monitoring\n- Order reception from Chrome extension  \n- Request authentication with X-Extension-Key\n- Comprehensive order validation\n- Sentry error tracking and monitoring\n- 60%+ test coverage with TDD methodology\n- golangci-lint passing with 0 issues\n- Full CI/CD pipeline with GitHub Actions\n- Cross-platform binary builds\n- Security scanning integration\n\n🚧 **Next: Monarch Money Integration**\n\n## Quick Start\n\n```bash\n# Install dependencies and development tools\nmake deps\nmake install-tools\n\n# Copy environment variables\ncp .env.example .env\n# Edit .env with your API keys\n\n# Run tests (TDD workflow)\nmake test\n# Or with coverage\nmake coverage\n\n# Check code quality\nmake check  # Runs fmt, vet, lint, test\n\n# Build and run\nmake build\nmake run\n# Or for development with hot reload\nmake run-watch\n```\n\n## Development Workflow\n\n### Available Make Commands\n\n```bash\n# Development\nmake help           # Show all available commands\nmake deps           # Download and tidy dependencies\nmake install-tools  # Install development tools (golangci-lint, etc.)\n\n# Code Quality\nmake fmt           # Format code with gofmt and goimports\nmake fmt-check     # Check if code is formatted\nmake vet           # Run go vet\nmake lint          # Run golangci-lint\nmake check         # Run all checks (fmt, vet, lint, test)\n\n# Testing\nmake test          # Run all tests\nmake test-short    # Run tests in short mode\nmake coverage      # Run tests with coverage report\nmake benchmark     # Run benchmarks\n\n# Building\nmake build         # Build binary\nmake release       # Build release binaries for all platforms\nmake clean         # Clean build artifacts\n\n# Running\nmake run           # Run the application\nmake run-watch     # Run with hot reload (requires air)\n\n# Docker\nmake docker-build  # Build Docker image\nmake docker-run    # Run Docker container\n\n# CI/CD\nmake pre-commit    # Run pre-commit checks\nmake ci            # Run full CI pipeline locally\n```\n\n### TDD Workflow\n\nThis project follows strict Test-Driven Development:\n\n```bash\n# 1. Write test first\n# 2. Run test - watch it fail\nmake test\n\n# 3. Implement feature\n# 4. Run test - watch it pass\nmake test\n\n# 5. Check all code quality\nmake check\n```\n\n## API Endpoints\n\n- `GET /health` - Health check\n- `POST /api/walmart/orders` - Receive Walmart orders (requires `X-Extension-Key` header)\n\nSee `/docs/api.md` for full API documentation.\n\n## Testing\n\n```bash\n# Test health endpoint\ncurl http://localhost:8080/health\n\n# Test order endpoint\ncurl -X POST http://localhost:8080/api/walmart/orders \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-Extension-Key: test-secret\" \\\n  -d @testdata/sample_order.json\n```\n\n## Documentation\n\n- `/docs/progress.md` - Development progress tracking\n- `/docs/api.md` - API documentation\n- `/docs/testing.md` - Testing strategy\n- `/docs/setup.md` - Setup instructions\n- `/docs/bug-fixes.md` - Bug fix log\n\n## Current Status\n\n✅ Phase 1 MVP Complete:\n- Health check endpoint\n- Walmart order receive endpoint\n- Authentication middleware\n- Sentry error tracking integration\n- Configuration management system\n- 77.4% test coverage for handlers\n- All tests passing (9/9)\n\n## Next Steps\n\n1. Integrate Monarch Money SDK (currently blocked - package unavailable)\n2. Add transaction matching logic\n3. Implement LLM categorization (Ollama for free local option)\n4. Add transaction splitting functionality\n\n## CI/CD Pipeline\n\n### GitHub Actions\n\n- **Continuous Integration**: Runs on every push/PR to main/develop\n  - Linting with golangci-lint\n  - Testing on multiple Go versions (1.21, 1.22, 1.23)\n  - Security scanning with Gosec and Trivy\n  - Docker image building\n  - Coverage reporting to Codecov\n\n- **Automated Releases**: Triggers on version tags (v*)\n  - Cross-platform binary builds (Linux, macOS, Windows)\n  - Docker image publishing to Docker Hub \u0026 GitHub Container Registry\n  - GitHub release creation with assets\n\n### Pre-commit Hooks\n\n```bash\n# Install pre-commit (requires Python)\npip install pre-commit\n\n# Install hooks\npre-commit install\n\n# Run manually\npre-commit run --all-files\n```\n\n## Tech Stack\n\n- **Framework**: Gin\n- **Error Tracking**: Sentry\n- **Testing**: Testify\n- **Code Quality**: golangci-lint, gosec, pre-commit\n- **CI/CD**: GitHub Actions, Docker\n- **Configuration**: godotenv + custom config package\n- **Future**: Monarch SDK, Ollama/OpenAI, PostgreSQL, Redis","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feshaffer321%2Fmonarchmoney-walmart-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feshaffer321%2Fmonarchmoney-walmart-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feshaffer321%2Fmonarchmoney-walmart-server/lists"}