{"id":29016170,"url":"https://github.com/naptie/nearcade","last_synced_at":"2025-07-17T00:06:44.492Z","repository":{"id":300917817,"uuid":"1007347924","full_name":"Naptie/nearcade","owner":"Naptie","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-10T20:24:36.000Z","size":690,"stargazers_count":60,"open_issues_count":2,"forks_count":4,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-11T04:59:44.470Z","etag":null,"topics":["daisyui","rhythm-game","svelte","svelte5","sveltekit","tailwindcss","typescript"],"latest_commit_sha":null,"homepage":"https://nearcade.phi.zone","language":"Svelte","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Naptie.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,"zenodo":null}},"created_at":"2025-06-23T21:17:54.000Z","updated_at":"2025-07-10T23:45:47.000Z","dependencies_parsed_at":"2025-07-11T01:27:42.357Z","dependency_job_id":null,"html_url":"https://github.com/Naptie/nearcade","commit_stats":null,"previous_names":["naptie/nearcade"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Naptie/nearcade","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naptie%2Fnearcade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naptie%2Fnearcade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naptie%2Fnearcade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naptie%2Fnearcade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Naptie","download_url":"https://codeload.github.com/Naptie/nearcade/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naptie%2Fnearcade/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265553321,"owners_count":23787052,"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":["daisyui","rhythm-game","svelte","svelte5","sveltekit","tailwindcss","typescript"],"created_at":"2025-06-25T22:06:55.056Z","updated_at":"2025-07-17T00:06:44.486Z","avatar_url":"https://github.com/Naptie.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nearcade 🕹️\n\n**中文** | [English](README_en.md)\n\n一个帮你快速查找任意位置附近的机厅的网站。\n\n有关网站的问题答疑、数据纠正、功能建议等请加入以下 QQ 群进行讨论。\n\n\u003cimg src=\"static/group-chat-qq.jpg\" alt=\"nearcade QQ群二维码\" width=\"350\"/\u003e\n\n## ✨ 功能特色\n\n### 🎯 附近探索\n\n- **我的位置**：基于当前位置查找附近的机厅\n- **高校搜索**：搜索特定高校校园附近的机厅\n- **地图选址**：在交互式地图上选择任意位置\n- **自定义半径**：在 1~30 km 半径内搜索\n\n### 🏆 高校排行榜\n\n- 根据校园周围的机厅/机台覆盖情况对高校进行排名\n- 指标包括店铺数量、总机台数和区域密度（每平方公里机台数）\n- 特定游戏机台数量的专项排名\n- 每日数据更新，24 小时缓存刷新\n\n### 🎮 支持的游戏\n\n- 舞萌DX\n- 中二节奏\n- 太鼓之达人\n- 音律炫动\n- 华卡音舞\n\n## 🛠️ 技术栈\n\n### 前端框架\n\n- **SvelteKit**：具有 SSR/SPA 功能的全栈框架\n- **Svelte 5**：具有增强响应式系统的最新版本\n- **TypeScript**：提供全程类型安全的开发体验\n\n### 样式和 UI\n\n- **Tailwind CSS 4.0**：实用程序优先的 CSS 框架\n- **daisyUI**：Tailwind 的语义化组件类\n- **Font Awesome**：庞大而全面的图标库\n\n### 后端和数据库\n\n- **MongoDB**：用于存储机厅和大学数据的非 SQL 数据库\n- **服务端 API**：使用 SvelteKit 构建的 RESTful API 端点\n\n### 地图和位置服务\n\n- **高德地图和腾讯地图**：地图服务集成\n- **地理位置 API**：基于浏览器的位置检测\n\n### 国际化\n\n- **Paraglide.js**：类型安全的国际化（i18n）解决方案\n- **基于消息的翻译**：结构化翻译系统\n\n### 开发工具\n\n- **Vite**：快速构建工具和开发服务器\n- **ESLint**：带有 Svelte 特定规则的代码检查\n- **Prettier**：带插件支持的代码格式化\n- **pnpm**：快速且节省磁盘空间的包管理器\n\n## 🚀 本地构建\n\n### 前置要求\n\n- Node.js 18+\n- pnpm（推荐）或 npm\n- MongoDB 实例\n- 高德地图 JS API key 与 secret\n- 腾讯地图 API key\n- Sentry\n\n### 安装\n\n1. **克隆仓库：**\n\n   ```bash\n   git clone https://github.com/Naptie/nearcade.git\n   cd nearcade\n   ```\n\n2. **安装依赖：**\n\n   ```bash\n   pnpm install\n   ```\n\n3. **设置环境变量：**\n\n   在根目录创建 `.env` 文件：\n\n   ```env\n   PUBLIC_AMAP_KEY = \"your_key\"\n   PUBLIC_QQMAP_KEY = \"your_key\"\n   PUBLIC_SENTRY_DSN = \"https://example.ingest.de.sentry.io/\"\n\n   AMAP_SECRET = \"your_secret\"\n   MONGODB_URI = \"mongodb://localhost:27017/?dbName=nearcade\"\n   ```\n\n   此外，如果需要生成静态构建，请设置环境变量 `PUBLIC_API_BASE`（并删除所有 `+page.server.ts` 文件）；如果需要发布 Sentry release 或上传 source maps 至 Sentry，请设置环境变量 `SENTRY_AUTH_TOKEN`。\n\n4. **启动开发服务器：**\n\n   ```bash\n   pnpm dev\n   ```\n\n5. **打开浏览器：**\n   导航到 `http://localhost:5173`\n\n### 生产构建\n\n```bash\n# 构建应用\npnpm build\n\n# 预览生产构建\npnpm preview\n```\n\n### 部署到 Cloudflare Workers\n\n```bash\nADAPTER=cloudflare pnpm cf-deploy\n```\n\n## 🚢 使用 Docker 运行\n\n### 前置要求\n\n- **Docker** 已安装在您的机器上（按照[安装指南](https://docs.docker.com/get-docker/)）。\n- **Docker Compose**（用于多容器设置，如果需要）。\n\n### 分步指南\n\n1. **克隆仓库：**\n\n   ```bash\n   git clone https://github.com/Naptie/nearcade.git\n   cd nearcade\n   ```\n\n2. **构建 Docker 镜像：**\n\n   确保 `Dockerfile` 和 `docker-compose.yml` 都在项目的根目录中。\n\n   ```bash\n   docker-compose build\n   ```\n\n3. **设置环境变量：**\n\n   确保您已设置所需的环境变量。您可以在项目根目录创建 `.env` 文件，内容如下：\n\n   ```env\n   PUBLIC_AMAP_KEY = \"your_key\"\n   PUBLIC_QQMAP_KEY = \"your_key\"\n   PUBLIC_SENTRY_DSN = \"https://example.ingest.de.sentry.io/\"\n\n   AMAP_SECRET = \"your_secret\"\n   MONGODB_URI = \"mongodb://localhost:27017/?dbName=nearcade\"\n   ```\n\n   **注意：** 如果您使用 Docker Compose 同时运行应用和 MongoDB，您可能需要修改 `MONGODB_URI` 以指向 MongoDB 容器而不是 `localhost`。\n\n4. **使用 Docker Compose 启动应用：**\n\n   ```bash\n   docker-compose up\n   ```\n\n   这将启动应用程序和您在 `docker-compose.yml` 文件中定义的任何依赖项，如 MongoDB。\n\n5. **访问应用：**\n\n   容器启动运行后，在浏览器中导航到 `http://localhost:3000` 查看应用。\n\n### 停止 Docker 容器\n\n要停止 Docker 容器，运行：\n\n```bash\ndocker-compose down\n```\n\n---\n\n## 🤝 贡献\n\n我们欢迎贡献！请随时提交 issue 和 pull request。\n\n### 开发指南\n\n- 遵循 TypeScript 最佳实践\n- 使用 Prettier 进行代码格式化\n- 编写有意义的提交消息\n- 彻底测试您的更改\n\n## ⭐ 星标历史\n\n[![Stargazers over time](https://starchart.cc/Naptie/nearcade.svg?variant=adaptive)](https://starchart.cc/Naptie/nearcade)\n\n## 📄 许可证\n\n本开源项目遵循 [Mozilla 公共许可证 2.0](LICENSE)。\n\n## 🙏 致谢\n\n- [BEMANICN](https://map.bemanicn.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaptie%2Fnearcade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaptie%2Fnearcade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaptie%2Fnearcade/lists"}