{"id":26212328,"url":"https://github.com/hackinggate/alttube-go","last_synced_at":"2025-04-15T15:22:15.856Z","repository":{"id":221794542,"uuid":"754400205","full_name":"HackingGate/AltTube-Go","owner":"HackingGate","description":"Backend code for alternative YouTube with no Ads, a YouTube clone avaliabe to Chinese users without censorship as of Feb 2024. (hosted on my home Raspberry Pi server behind Cloudflare tunnel)","archived":false,"fork":false,"pushed_at":"2025-03-24T11:08:34.000Z","size":249,"stargazers_count":5,"open_issues_count":8,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T21:51:09.224Z","etag":null,"topics":["backend","golang","no-ads","privacy-protection","video-streaming","youtube"],"latest_commit_sha":null,"homepage":"https://efficiency-node-alttube.hackinggate.com/swagger/index.html","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/HackingGate.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}},"created_at":"2024-02-08T00:52:46.000Z","updated_at":"2025-02-24T07:22:17.000Z","dependencies_parsed_at":"2025-01-22T13:22:19.974Z","dependency_job_id":"02860ae8-939b-4dff-90a5-f3368a5b45da","html_url":"https://github.com/HackingGate/AltTube-Go","commit_stats":null,"previous_names":["alttube/alttube-go","hackinggate/alttube-go"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HackingGate%2FAltTube-Go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HackingGate%2FAltTube-Go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HackingGate%2FAltTube-Go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HackingGate%2FAltTube-Go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HackingGate","download_url":"https://codeload.github.com/HackingGate/AltTube-Go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249095204,"owners_count":21211883,"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":["backend","golang","no-ads","privacy-protection","video-streaming","youtube"],"created_at":"2025-03-12T08:29:55.549Z","updated_at":"2025-04-15T15:22:15.834Z","avatar_url":"https://github.com/HackingGate.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AltTube-Go\n\n[![Lint](https://github.com/HackingGate/AltTube-Go/actions/workflows/lint.yml/badge.svg)](https://github.com/HackingGate/AltTube-Go/actions/workflows/lint.yml)\n[![golangci-lint](https://github.com/HackingGate/AltTube-Go/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/HackingGate/AltTube-Go/actions/workflows/golangci-lint.yml)\n[![Atlas](https://github.com/HackingGate/AltTube-Go/actions/workflows/ci-atlas.yaml/badge.svg)](https://github.com/HackingGate/AltTube-Go/actions/workflows/ci-atlas.yaml)\n[![Build and Test](https://github.com/HackingGate/AltTube-Go/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/HackingGate/AltTube-Go/actions/workflows/build-and-test.yml)\n[![CodeQL](https://github.com/HackingGate/AltTube-Go/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/HackingGate/AltTube-Go/actions/workflows/github-code-scanning/codeql)\n[![Dependabot Updates](https://github.com/HackingGate/AltTube-Go/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/HackingGate/AltTube-Go/actions/workflows/dependabot/dependabot-updates)\n\n## Getting Started\n\n### Common steps\n\nGenerate `DB_PASSWORD` and `JWT_KEY` in `.env` and `.env.docker` file\n\n```sh\npython3 generate_credentials.py\n```\n\nRemove `data/` directory after generating `DB_PASSWORD`\n\n```sh\nrm -rf data/\n```\n\n### Local environment\n\nBuild and run\n\n```sh\ndocker compose up -d --build alttube-postgres piped piped-postgres piped-proxy\ngo mod download\ngo run main.go\n```\n\n### Docker environment\n\nBuild and run\n\n```sh\ndocker compose build\ndocker compose up\n```\n\nBuild and run in background in one command\n\n```sh\ndocker compose up --build -d\n```\n\n## Database Development\n\n#### Dependencies\n\n- [ent](https://entgo.io)\n- [atlas](https://atlasgo.io)\n\n#### Generate ent if ent/schema is updated\n\n```sh\ngo generate ./ent\n```\n\n#### Generate Migration SQL\n\n```sh\natlas migrate diff add_something_awesome \\\n  --dir \"file://ent/migrate/migrations\" \\\n  --to \"ent://ent/schema\" \\\n  --dev-url \"postgres://AltTube:AltTube@localhost:5432/AltTube?search_path=public\u0026sslmode=disable\"\n```\n\n#### Apply Migration SQL\n\n```sh\natlas migrate apply \\\n  --dir \"file://ent/migrate/migrations\" \\\n  -u \"postgres://AltTube:AltTube@localhost:5432/AltTube?search_path=public\u0026sslmode=disable\"\n```\n\n#### Visualize Database Schema\n\n```sh\natlas schema inspect -w \\\n  -u \"postgres://AltTube:AltTube@localhost:5432/AltTube?search_path=public\u0026sslmode=disable\"\n```\n\n## API Documentation\n\n#### Generate\n\nInstall [swag](https://github.com/swaggo/swag)\n\n```sh\ngo install github.com/swaggo/swag/cmd/swag@latest\n```\n\nAt the root of the project, run\n\n```sh\nswag init --parseDependency --parseInternal --parseDepth 1\n```\n\n#### Access\n\nhttp://localhost:8072/swagger/index.html\n\nhttps://efficiency-node-alttube.hackinggate.com/swagger/index.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackinggate%2Falttube-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhackinggate%2Falttube-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackinggate%2Falttube-go/lists"}