{"id":29198053,"url":"https://github.com/tingeytime/govinfo","last_synced_at":"2026-02-08T20:02:29.842Z","repository":{"id":298461621,"uuid":"1000014094","full_name":"TingeyTime/GovInfo","owner":"TingeyTime","description":"Report government info based on an address. Its core idea is to provide government-based public information based on address, including details about House Representatives, Senators, and Governors, as well as official bills, all accessible via SMS","archived":false,"fork":false,"pushed_at":"2025-06-11T07:22:33.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-11T08:35:34.181Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","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/TingeyTime.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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-11T06:22:24.000Z","updated_at":"2025-06-11T07:22:36.000Z","dependencies_parsed_at":"2025-06-11T08:37:44.321Z","dependency_job_id":"f223b205-abe5-462e-b42a-9f5b11354827","html_url":"https://github.com/TingeyTime/GovInfo","commit_stats":null,"previous_names":["tingeytime/govinfo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TingeyTime/GovInfo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TingeyTime%2FGovInfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TingeyTime%2FGovInfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TingeyTime%2FGovInfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TingeyTime%2FGovInfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TingeyTime","download_url":"https://codeload.github.com/TingeyTime/GovInfo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TingeyTime%2FGovInfo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263102314,"owners_count":23414090,"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":[],"created_at":"2025-07-02T08:30:27.999Z","updated_at":"2026-02-08T20:02:24.784Z","avatar_url":"https://github.com/TingeyTime.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GovInfo\n\n\u003e 🏛️ **Get your government information delivered straight to your phone**\n\n[![Go 1.21+](https://img.shields.io/badge/Go-1.21+-00ADD8?style=flat\u0026logo=go)](https://golang.org/)\n[![PostgreSQL 13+](https://img.shields.io/badge/PostgreSQL-13+-336791?style=flat\u0026logo=postgresql\u0026logoColor=white)](https://postgresql.org/)\n[![Twilio SMS](https://img.shields.io/badge/Twilio-SMS-F22F46?style=flat\u0026logo=twilio\u0026logoColor=white)](https://twilio.com/)\n[![Docker](https://img.shields.io/docker/:govinfo-blue?style=flat)](https://hub.docker.com/r/tingeytime/govinfo)\n[![MIT License](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nGovInfo is an opt-in SMS service that delivers personalized government information based on your address. Stay informed about your elected officials, upcoming legislation, and local government activities—all through simple text messages.\n\n## ✨ Features\n\n- **📍 Location-Based Information**: Get details about your House Representatives, Senators, and Governor by address\n- **📱 SMS Interface**: Receive information via text messages with simple opt-in/opt-out\n- **⏰ Scheduled Updates**: Weekly updates on legislation and representative activities\n- **🔒 Privacy-First**: Explicit opt-in required, easy opt-out anytime\n- **🏛️ Comprehensive Coverage**: Federal and state-level government information\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- [Go 1.21+](https://golang.org/dl/)\n- [PostgreSQL 13+](https://www.postgresql.org/download/)\n- [Twilio Account](https://www.twilio.com/try-twilio) with SMS capabilities\n\n### Local Development Setup\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/yourusername/govinfo.git\n   cd govinfo\n   ```\n\n2. **Start local database**\n   ```bash\n   docker-compose up -d postgres\n   ```\n\n3. **Set up environment variables**\n   ```bash\n   cp .env.example .env\n   # Edit .env with your Twilio credentials and database URL\n   ```\n\n4. **Run database migrations**\n   ```bash\n   go run cmd/migrate/main.go\n   ```\n\n5. **Start the API server**\n   ```bash\n   go run cmd/api/main.go\n   ```\n\n6. **Run the batch job (separate terminal)**\n   ```bash\n   go run cmd/batch/main.go\n   ```\n\n## 🏗️ Architecture\n\nGovInfo uses a clean, scalable architecture designed for reliability and performance:\n\n```\n    [HTTP API] ←→ [handlers] ←→ [services] ←→ [database]\n         ↑               ↓\n     [Twilio] ←← [batch job scheduler]\n```\n\n### Tech Stack\n\n- **Backend**: Go with standard library and minimal dependencies\n- **Database**: PostgreSQL for reliable data storage\n- **SMS Provider**: Twilio for message delivery\n- **Deployment**: Static binaries with systemd (production) / Docker Compose (development)\n\n## 📦 Project Structure\n\n```\ngovinfo/\n├── cmd/\n│   ├── api/           # REST API server\n│   ├── batch/         # Weekly batch job\n│   └── migrate/       # Database migrations\n├── internal/\n│   ├── services/      # Business logic layer\n│   ├── models/        # Database models\n│   ├── handlers/      # HTTP request handlers\n│   └── config/        # Configuration management\n├── migrations/        # SQL migration files\n├── docker-compose.yml # Local development setup\n└── README.md\n```\n\n## 🔧 Configuration\n\nSet the following environment variables:\n\n```bash\n# Database\nDATABASE_URL=postgres://user:pass@localhost:5432/govinfo\n\n# Twilio\nTWILIO_ACCOUNT_SID=your_account_sid\nTWILIO_AUTH_TOKEN=your_auth_token\nTWILIO_PHONE_NUMBER=your_twilio_number\n\n# Server\nPORT=8080\nHOST=localhost\nENV=development\n```\n\n## 📱 User Journey\n\n1. **Opt-in**: Text your address to the service number\n2. **Verification**: Receive confirmation and welcome message\n3. **Weekly Updates**: Get personalized government information\n4. **Manage Preferences**: Update address or frequency anytime\n5. **Opt-out**: Simple text command to unsubscribe\n\n### Example SMS Flow\n\n```\nUser: \"123 Main St, Anytown, NY 12345\"\nBot:  \"Welcome to GovInfo! You'll receive weekly updates about your representatives. Reply STOP to opt-out anytime.\"\n\nWeekly: \"Your Rep: John Smith voted on H.R. 1234 (Infrastructure Bill). Sen. Jane Doe introduced S. 567 (Climate Act). More: govinfo.com/details\"\n```\n\n## 🛠️ Development\n\n### Running Tests\n\n```bash\n# Run all tests\ngo test ./...\n\n# Run with coverage\ngo test -cover ./...\n\n# Run integration tests (requires running database)\ngo test -tags=integration ./...\n```\n\n### Database Operations\n\n```bash\n# Create new migration\ngo run cmd/migrate/main.go create add_user_preferences\n\n# Run migrations\ngo run cmd/migrate/main.go up\n\n# Rollback migration\ngo run cmd/migrate/main.go down\n```\n\n### API Endpoints\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| POST | `/users/subscribe` | Opt-in a new user |\n| DELETE | `/users/{id}/subscription` | Opt-out user |\n| PUT | `/users/{id}/preferences` | Update user preferences |\n| POST | `/webhooks/twilio` | Handle incoming SMS |\n\n## 🚀 Deployment\n\n### Production Deployment (Recommended)\n\n1. **Build static binaries**\n   ```bash\n   CGO_ENABLED=0 GOOS=linux go build -o bin/api cmd/api/main.go\n   CGO_ENABLED=0 GOOS=linux go build -o bin/batch cmd/batch/main.go\n   ```\n\n2. **Deploy to VPS**\n   ```bash\n   # Copy binaries and set up systemd services\n   # See deployment/ directory for systemd service files\n   ```\n\n3. **Set up PostgreSQL**\n   ```bash\n   # Install and configure PostgreSQL on your VPS\n   # Run migrations in production\n   ```\n\n### Container Deployment (Alternative)\n\n```bash\n# Build and deploy with Docker\ndocker build -t govinfo .\ndocker run -d --name govinfo-api govinfo\n```\n\n## 📊 Monitoring \u0026 Observability\n\n- **Health Checks**: `/health` endpoint for service monitoring\n- **Metrics**: Prometheus metrics for delivery rates and API performance  \n- **Logging**: Structured JSON logging with different levels\n- **Alerting**: Monitor opt-out rates and delivery failures\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 📋 Roadmap\n\n- [ ] **Phase 1**: Core SMS functionality with basic government data\n- [ ] **Phase 2**: Enhanced data sources and real-time updates\n- [ ] **Phase 3**: Web dashboard for user management\n- [ ] **Phase 4**: Advanced filtering and personalization\n- [ ] **Phase 5**: Multi-language support\n\n## 🔒 Privacy \u0026 Compliance\n\n- **TCPA Compliant**: Explicit opt-in required for all messaging\n- **Data Minimization**: Only store necessary user information\n- **Easy Opt-out**: Clear unsubscribe process in every message\n- **Audit Trail**: Complete logging of consent and communications\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙋‍♂️ Support\n\n- **Issues**: [GitHub Issues](https://github.com/yourusername/govinfo/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/yourusername/govinfo/discussions)\n\n---\n\n**Made with ❤️ for civic engagement**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftingeytime%2Fgovinfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftingeytime%2Fgovinfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftingeytime%2Fgovinfo/lists"}