{"id":15096097,"url":"https://github.com/pvsune/loadcentral-admin","last_synced_at":"2026-01-06T09:32:46.040Z","repository":{"id":78198157,"uuid":"268965320","full_name":"pvsune/loadcentral-admin","owner":"pvsune","description":"  A simple interface to let you topup mobile load to multiple phone numbers concurrently using Goroutines.","archived":false,"fork":false,"pushed_at":"2020-06-08T03:52:55.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T17:44:20.340Z","etag":null,"topics":["gin-gonic","gin-jwt","golang","jwt","topup"],"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/pvsune.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}},"created_at":"2020-06-03T02:21:39.000Z","updated_at":"2020-06-08T03:52:57.000Z","dependencies_parsed_at":"2023-04-21T08:46:46.457Z","dependency_job_id":null,"html_url":"https://github.com/pvsune/loadcentral-admin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvsune%2Floadcentral-admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvsune%2Floadcentral-admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvsune%2Floadcentral-admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvsune%2Floadcentral-admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pvsune","download_url":"https://codeload.github.com/pvsune/loadcentral-admin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245852856,"owners_count":20683104,"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":["gin-gonic","gin-jwt","golang","jwt","topup"],"created_at":"2024-09-25T15:45:25.547Z","updated_at":"2026-01-06T09:32:41.020Z","avatar_url":"https://github.com/pvsune.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LoadCentral Admin\nA simple interface to let you topup mobile load to multiple phone numbers concurrently using Goroutines.\n\n## Quickstart\n1. Build the image:\n```\n$ docker build -t pvsune/loadcentral-admin .\n```\n\n2. Fill up required environment variables in `.env`.\n  - `APP_AUTH_USERNAME` `APP_AUTH_PASSWORD` - User credentials is not necessary to save to DB yet.\n  - `APP_AUTH_KEY` - JWT key used for signing the token.\n  - `APP_AUTH_COOKIEDOMAIN` - Set to localhost for development.\n  - `APP_LC_USERNAME` `APP_LC_PASSWORD` - LoadCentral credentials.\n  - `APP_AUTH_SECURECOOKIE` - Avoid XSS; Set to false for development.\n  \n3. Start the app:\n```\n$ docker run --rm --env-file .env -p 8000:8000 pvsune/loadcentral-admin\n```\n\n4. Alternatively, you can run the app directly and export environment variables.\n```\n$ go get .\n$ go run main.go \n```\n\n## How it works\n### Authentication\nThere's no need to use DB yet; the user credentials are set by environment variables. When the user logins, the app generates a JWT token and save it to cookie. Cookie settings are set to avoid CSRF, XSS. The token will expire for one hour and the user needs to login again.\n\n### Load topup\nEach `(PhoneNumber, Pcode)` is posted to LoadCentral API using its own Goroutine. The response is sent back to main program using channels and finally sent to templates for display (duhh).\n\n## Notes\n1. Maybe good idea to setup proper CSRF token and not rely on `Set-Cookie: \u003ccookie-name\u003e=\u003ccookie-value\u003e; SameSite=Strict` response header.\n2. Send email for every topup request.\n3. Use sentry free tier to send app logs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvsune%2Floadcentral-admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpvsune%2Floadcentral-admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvsune%2Floadcentral-admin/lists"}