{"id":30584215,"url":"https://github.com/koujialong/ray-admin","last_synced_at":"2025-08-29T09:03:16.339Z","repository":{"id":266646603,"uuid":"898906271","full_name":"koujialong/ray-admin","owner":"koujialong","description":"基于next rsc prisma trpc zod shadcn  jotai typescrip等构建的全栈admin starter","archived":false,"fork":false,"pushed_at":"2024-12-25T06:03:12.000Z","size":769,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-25T07:18:25.009Z","etag":null,"topics":["admin","jotai","nextjs","prisma","rsc","shadcn","shadcn-ui","trpc","typescript","zod"],"latest_commit_sha":null,"homepage":"https://koujialong-ray.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koujialong.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-12-05T09:05:17.000Z","updated_at":"2024-12-25T06:03:15.000Z","dependencies_parsed_at":"2024-12-17T10:41:53.499Z","dependency_job_id":null,"html_url":"https://github.com/koujialong/ray-admin","commit_stats":null,"previous_names":["koujialong/t3-next","koujialong/ray-admin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/koujialong/ray-admin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koujialong%2Fray-admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koujialong%2Fray-admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koujialong%2Fray-admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koujialong%2Fray-admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koujialong","download_url":"https://codeload.github.com/koujialong/ray-admin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koujialong%2Fray-admin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272658791,"owners_count":24971604,"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","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["admin","jotai","nextjs","prisma","rsc","shadcn","shadcn-ui","trpc","typescript","zod"],"created_at":"2025-08-29T09:03:08.669Z","updated_at":"2025-08-29T09:03:16.324Z","avatar_url":"https://github.com/koujialong.png","language":"TypeScript","funding_links":[],"categories":["Boilerplates \u0026 Starters"],"sub_categories":[],"readme":"# 简介\nRay是一个免费开源的全栈中后台模板，采用了 Next、TRPC、Prisma、TypeScript 等主流技术开发，开箱即用，可用于中后台全栈开发，也适合学习参考。\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"./doc/preview1.png\" alt=\"preview1\" width=\"900\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"./doc/preview3.png\" alt=\"preview2\" width=\"200\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n   \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"./doc/preview2.png\" alt=\"preview1\" width=\"900\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"./doc/preview4.png\" alt=\"preview2\" width=\"200\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n# 服务搭建\n## 数据库\n* 创建.env配置文件\n```shell\n# 配置数据库连接，以postgres为例\nDATABASE_URL=\"postgres://{用户名}:{密码}@{域名}:{端口}/{库名}\"\n```\n修改/prisma/schema.prisma 到对应数据库类型\n```\ndatasource db {\n  provider = \"postgres\"\n  url      = env(\"DATABASE_URL\")\n}\n```\n[其他数据库配置](https://www.prisma.io/docs/reference/database-reference/connection-urls#env)\n```shell\n# 配置NEXTAUTH_SECRET\nNEXTAUTH_SECRET=\"xxxxxx\"\n```\n```shell\n#秘钥生成方式\nopenssl rand -base64 32\n```\n\n* 初始化表结构\n```shell\npnpm db:push\n```\n* 初始化表数据\n```shell\npnpm db:seed\n```\n或者\n```shell\nnode --loader ts-node/esm .\\prisma\\seed.ts\n```\n## 本地启动服务\n```shell\npnpm i\npnpm dev\n```\n默认账号：admin/admin@123\n\n## Docker构建\n* 创建docker-compose.yml\n* 复制docker-compose-example.yml内容到docker-compose.yml\n* 修改环境变量\n```shell\n environment:\n  - DATABASE_URL=\"xxxx\"\n  - NEXTAUTH_SECRET=\"xxxx\"\n```\n* 启动服务\n```shell\ndocker compose up -d\n```\n注：如需要单独打包镜像使用一下脚本\n```shell\ndocker build -t ray-docker --build-arg NEXT_PUBLIC_CLIENTVAR=clientvar .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoujialong%2Fray-admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoujialong%2Fray-admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoujialong%2Fray-admin/lists"}