{"id":25024822,"url":"https://github.com/blue-davinci/socialaid","last_synced_at":"2026-05-15T23:13:16.868Z","repository":{"id":275753620,"uuid":"926555404","full_name":"Blue-Davinci/SocialAid","owner":"Blue-Davinci","description":"[Demo API] SocialAid Tracker is a Management Information System (MIS) designed to track beneficiaries of social protection programs. It enables efficient storage and retrieval of program details, household geolocation data, and household member information. ","archived":false,"fork":false,"pushed_at":"2025-02-06T07:14:53.000Z","size":71,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-06T02:47:11.506Z","etag":null,"topics":["api","backend","golang","rest-api","security"],"latest_commit_sha":null,"homepage":"","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/Blue-Davinci.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}},"created_at":"2025-02-03T13:18:23.000Z","updated_at":"2025-02-06T07:17:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"182c087b-3879-4955-8419-f110d268bdc1","html_url":"https://github.com/Blue-Davinci/SocialAid","commit_stats":null,"previous_names":["blue-davinci/socialaid"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Blue-Davinci/SocialAid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blue-Davinci%2FSocialAid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blue-Davinci%2FSocialAid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blue-Davinci%2FSocialAid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blue-Davinci%2FSocialAid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Blue-Davinci","download_url":"https://codeload.github.com/Blue-Davinci/SocialAid/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blue-Davinci%2FSocialAid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33082991,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","backend","golang","rest-api","security"],"created_at":"2025-02-05T16:32:20.874Z","updated_at":"2026-05-15T23:13:16.863Z","avatar_url":"https://github.com/Blue-Davinci.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"\" rel=\"noopener\"\u003e\n \u003cimg width=200px height=190px src=\"https://i.ibb.co/LhnG5QWC/socialaid-high-resolution-logo.png\" alt=\"Project logo\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n# SocialAid Tracker\n\n## Table of Contents\n\n- [About](#about)\n- [Getting Started](#getting_started)\n- [Usage](#usage)\n- [Contributing](../CONTRIBUTING.md)\n\n## About \u003ca name = \"about\"\u003e\u003c/a\u003e\n\nSocialAid Tracker is a Management Information System (MIS) designed to track beneficiaries of social protection programs. It enables efficient storage and retrieval of program details, household geolocation data, and household member information. The system ensures data security by encrypting sensitive data such as phone numbers while providing seamless access through RESTful API endpoints.\n\n## Getting Started \u003ca name = \"getting_started\"\u003e\u003c/a\u003e\n\nThese instructions will help you set up SocialAid Tracker on your local machine for development and testing. See [deployment](#deployment) for details on deploying the system in a production environment.\n\n### Prerequisites\n\nEnsure you have the following installed before proceeding:\n\n```\n- Go (1.18 or later)\n- PostgreSQL (latest version)\n- Docker (optional for containerized setup)\n- Git\n```\n\n### Installing\n\nFollow these steps to set up the development environment:\n\n1. **Clone the repository:**\n   ```sh\n   git clone https://github.com/Blue-Davinci/socialaid.git\n   cd socialaid-tracker\n   ```\n\n2. **Set up the database**:\n   ```sh\n   psql -U postgres -c \"CREATE DATABASE socialaid;\"\n   ```\n\n3. **Install the Go dependencies:** The Go tools will automatically download and install the dependencies listed in the `go.mod` file when you build or run the project. To download the dependencies without building or running the project, you can use the `go mod download` command:\n\n    ```bash\n    go mod download\n    ```\n\n4. **Set up the database:** The project uses a PostgreSQL database. You'll need to create a new database and update the connection string in your configuration file or environment variables.\nWe use `GOOSE` for all the data migrations and `SQLC` as the abstraction layer for the DB. To proceed\nwith the migration, navigate to the `Schema` director:\n```bash\ncd internal\\sql\\schema\n```\n- Then proceed by using the `goose {connection string} up` to execute an \u003cb\u003eUp migration\u003c/b\u003e as shown:\n- \u003cb\u003eNote:\u003c/b\u003e You can use your own environment variable or load it from the env file.\n\n```bash\ngoose postgres postgres://socialaid:password@localhost/socialaid  up\n```\n\n\n5. **Configure environment variables (create a `.env` file):**\n   ```bash\n      SOCIALAID_DB_DSN= ADD YOUR POSTGRESQL DSN HERE\n      SOCIALAID_DATA_ENCRYPTION_KEY= ADD YOUR HEX ENCODED ENCRYPTION KEY STRING HERE, you can use the generateEncryptioKey() func in `internal_helpers.go` to generate one.\n   ```\n\n5. **Build the project:** You can build the project using the makefile's command:\n\n    ```bash\n    make build/api\n    ```\n    This will create an executable file in the current directory.\n    \u003cb\u003eNote: The generated executable is for the windows environment\u003c/b\u003e\n\n6. **Run the project:** You can run the project using the `go run ./cmd/api` or use \u003cb\u003e`MakeFile`\u003c/b\u003e and do:\n\n    ```bash\n    make run/api\n\n## Usage \u003ca name = \"usage\"\u003e\u003c/a\u003e\n\nOnce the server is running, you can interact with the API using Postman or Curl:\n\n- Retrieve single household info:\n  ```sh\n  curl -X GET http://localhost:8080/v1/house_holds/-household_ID-\n  ```\n\n- Create a new household beneficiary:\n  ```sh\n  curl -X POST http://localhost:8080/v1/house_holds/member -d '{\"name\": \"John Doe\", \"program_id\": 1, \"geolocation_id\": 2}' -H \"Content-Type: application/json\"\n  ```\n\n- For authentication, check the `006 users.sql` migration file for the plain text token example. You will need to select the ApiKey method for authorization\nusing the key: `ApiKey` and the **Token** as the Value.\n- This will allow you to access all `\\house_holds` routes\n\nFor more details, refer to the API documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblue-davinci%2Fsocialaid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblue-davinci%2Fsocialaid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblue-davinci%2Fsocialaid/lists"}