{"id":13815796,"url":"https://github.com/journey-ad/Bitmagnet-Next-Web","last_synced_at":"2025-05-15T09:33:50.073Z","repository":{"id":244029005,"uuid":"813949291","full_name":"journey-ad/Bitmagnet-Next-Web","owner":"journey-ad","description":"🧲 A modern BitTorrent indexer, powered by Bitmagnet - 一个更现代的磁力搜索列表程序，由 Bitmagnet 强力驱动","archived":false,"fork":false,"pushed_at":"2024-08-06T03:07:03.000Z","size":1786,"stargazers_count":193,"open_issues_count":9,"forks_count":26,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T12:16:09.586Z","etag":null,"topics":["bittorrent","dht","magnet","magnet-link","nextjs","nextui","torrent","torrents","torrents-crawler"],"latest_commit_sha":null,"homepage":"https://bitmagnet-next-web.vercel.app","language":"TypeScript","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/journey-ad.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-06-12T03:56:57.000Z","updated_at":"2025-05-11T10:39:01.000Z","dependencies_parsed_at":"2024-06-12T15:24:42.733Z","dependency_job_id":"5b9ca563-4586-40a5-b61f-adcc9d87aaf1","html_url":"https://github.com/journey-ad/Bitmagnet-Next-Web","commit_stats":null,"previous_names":["journey-ad/bitmagnet-next-web"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/journey-ad%2FBitmagnet-Next-Web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/journey-ad%2FBitmagnet-Next-Web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/journey-ad%2FBitmagnet-Next-Web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/journey-ad%2FBitmagnet-Next-Web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/journey-ad","download_url":"https://codeload.github.com/journey-ad/Bitmagnet-Next-Web/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254314138,"owners_count":22050174,"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":["bittorrent","dht","magnet","magnet-link","nextjs","nextui","torrent","torrents","torrents-crawler"],"created_at":"2024-08-04T04:04:04.116Z","updated_at":"2025-05-15T09:33:50.011Z","avatar_url":"https://github.com/journey-ad.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cimg src=\".readme/Logo.svg\" width=\"100\" height=\"100\" alt=\"Bitmagnet-Next-Web\" /\u003e\n\n\u003ch1\u003eBitmagnet-Next-Web\u003c/h1\u003e\n\nEnglish / [中文文档](./README_zh-CN.md)\n\nA more modern magnet search website program, developed using [Next.js 14](https://nextjs.org/docs/getting-started) + [NextUI v2](https://nextui.org/), with the backend powered by [Bitmagnet](https://github.com/bitmagnet-io/bitmagnet).\n\n![Index](.readme/en_Index.jpg)\n![Search](.readme/en_Search.jpg)\n\n\u003c/div\u003e\n\n## Deployment Instructions\n\n### Container Deployment\n\nThe most convenient way to deploy is using Docker Compose. Refer to the [docker-compose.yml](./docker-compose.yml)\n\n### Running with docker run\n\nIf not using Docker Compose, you can run each container separately using the following commands:\n\n1. Run the PostgreSQL container:\n\n```bash\ndocker run -d \\\n  --name bitmagnet-postgres \\\n  -p 5432:5432 \\\n  -e POSTGRES_PASSWORD=postgres \\\n  -e POSTGRES_DB=bitmagnet \\\n  -e PGUSER=postgres \\\n  -v ./data/postgres:/var/lib/postgresql/data \\\n  --shm-size=1g \\\n  postgres:16-alpine\n```\n\n2. Run the Bitmagnet container:\n\n```bash\ndocker run -d \\\n  --name bitmagnet \\\n  --link bitmagnet-postgres:postgres \\\n  -p 3333:3333 \\\n  -p 3334:3334/tcp \\\n  -p 3334:3334/udp \\\n  -e POSTGRES_HOST=postgres \\\n  -e POSTGRES_PASSWORD=postgres \\\n  ghcr.io/bitmagnet-io/bitmagnet:latest \\\n  worker run --keys=http_server --keys=queue_server --keys=dht_crawler\n```\n\n3. Run the Bitmagnet-Next-Web container:\n\n```bash\ndocker run -d \\\n  --name bitmagnet-next-web \\\n  --link bitmagnet-postgres:postgres \\\n  -p 3000:3000 \\\n  -e POSTGRES_DB_URL=postgres://postgres:postgres@postgres:5432/bitmagnet \\\n  journey0ad/bitmagnet-next-web:latest\n```\n\n### Full-Text Search Optimization\n\nThe search capability relies on the `torrents.name` and `torrent_files.path` columns. The original Bitmagnet does not index these columns, so it's recommended to create indexes to improve query efficiency:\n\n```sql\ncreate extension pg_trgm; -- Enable pg_trgm extension\n\n-- Create indexes on `torrents.name` and `torrent_files.path`\nCREATE INDEX idx_torrents_name_1 ON torrents USING gin (name gin_trgm_ops);\nCREATE INDEX idx_torrent_files_path_1 ON torrent_files USING gin (path gin_trgm_ops);\n```\n\n## Development Guide\n\nBefore starting development, create a `.env.local` file in the project root directory and fill in the environment variables:\n\n```bash\n# .env.local\nPOSTGRES_DB_URL=postgres://postgres:postgres@localhost:5432/bitmagnet\n```\n\nIt's recommended to use `pnpm` as the package manager.\n\n### Install Dependencies\n\n```bash\npnpm install\n```\n\n### Run Development Environment\n\n```bash\npnpm run dev\n```\n\n### Build \u0026 Deploy\n\n```bash\npnpm run build\npnpm run serve\n```\n\n## Credits\n\n- [Bitmagnet](https://github.com/bitmagnet-io/bitmagnet)\n- [Next.js](https://nextjs.org/)\n- [NextUI](https://nextui.org/)\n- [Tailwind CSS](https://tailwindcss.com/)\n- [Fluent Emoji](https://github.com/microsoft/fluentui-emoji)\n\n## License\n\nLicensed under the [MIT license](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjourney-ad%2FBitmagnet-Next-Web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjourney-ad%2FBitmagnet-Next-Web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjourney-ad%2FBitmagnet-Next-Web/lists"}