MCPcopy Index your code
hub / github.com/KunMoe/kun-touchgal-next

github.com/KunMoe/kun-touchgal-next @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
2,329 symbols 6,768 edges 942 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

kun-touchgal-next

TouchGal

TouchGal 是一个一站式 Galgame 文化社区。提供Galgame 论坛、Galgame 下载等服务。承诺永久免费, 高质量。为Galgame 爱好者提供一片净土!

错误反馈

如果要反馈错误, 请您加入 TouchGal 的官方 Discord 服务器

https://discord.gg/e4QePvPQTB

开发联系

如果有对 Web 开发技术 (Node.js, Nuxt, Next.js, SvelteKit, SolidStart 等) 感兴趣的朋友们, 可以加入本项目的 Telegram 开发群组

https://t.me/KUNForum

如何运行

确保本地安装有 Node.js, pnpm, PostgreSQL, Redis 环境

  • 使用 git clone 拉取本项目至本地目录
  • 参考项目根目录的 .env.example 文件,新建 .env 文件,并自行填写环境变量(postgresql 的本地连接配置)
  • 初次运行本项目,可执行 pnpm prisma:push 创建此项目所使用的本地数据库
  • 使用 pnpm dev 即可运行
# 数据库 URL, 我们使用 psql
KUN_DATABASE_URL = "postgresql://postgres:kunloveren@localhost:5432/touchgal?schema=public"

# 网站 URL, 不变即可
KUN_VISUAL_NOVEL_SITE_URL = "https://www.touchgal.ink"

# 开发环境 URL, 不变即可
NEXT_PUBLIC_KUN_PATCH_ADDRESS_DEV = "http://127.0.0.1:3000"
NEXT_PUBLIC_KUN_PATCH_ADDRESS_PROD = "https://image.touchgal.moyu.moe"

# 本地 Redis 端口、地址和密码, 无密码时留空
REDIS_HOST = '127.0.0.1'
REDIS_PORT = '6379'
REDIS_PASSWORD = ''

# jwt 配置, 开发环境无需变动
JWT_ISS = 'touchgal'
JWT_AUD = 'touchgal_admin'
JWT_SECRET = 'moemoekungalgamekunisthecutest!chinorensukiazkhx'

# NODE_ENV, 开发环境无需变动
NODE_ENV = "development"

# 邮件服务地址
KUN_VISUAL_NOVEL_EMAIL_FROM = "鲲 Galgame 补丁"
KUN_VISUAL_NOVEL_EMAIL_HOST = "moyu.moe"
KUN_VISUAL_NOVEL_EMAIL_PORT = '587'
KUN_VISUAL_NOVEL_EMAIL_ACCOUNT = "auth@moyu.moe"
KUN_VISUAL_NOVEL_EMAIL_PASSWORD = "莲最可爱!"

# S3 相关配置
KUN_VISUAL_NOVEL_S3_STORAGE_ACCESS_KEY_ID = "kkkkkkkkkkkkkkkkkkkkkkkkkkkk"
KUN_VISUAL_NOVEL_S3_STORAGE_SECRET_ACCESS_KEY = "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk"
KUN_VISUAL_NOVEL_S3_STORAGE_BUCKET_NAME = "kun"
KUN_VISUAL_NOVEL_S3_STORAGE_ENDPOINT = "https://moyu.moe"
KUN_VISUAL_NOVEL_S3_STORAGE_REGION = "us-west-001"
NEXT_PUBLIC_KUN_VISUAL_NOVEL_S3_STORAGE_URL = "https://touchgal-patch.moyu.moe"

# 图床相关配置
KUN_VISUAL_NOVEL_IMAGE_BED_HOST = "touchgal-image.moyu.moe"
KUN_VISUAL_NOVEL_IMAGE_BED_URL = "https://touchgal-image.moyu.moe"

贡献指南

如果您的更改涉及到对项目源码的变动, 请务必在本地将项目运行成功, 自行测试无误后再 Pull Request, 否则会严重阻碍代码审计工作

开源声明 / 开源协议

本项目由 鲲 Galgame 补丁 - kun-galgame-patch-next 修改而来, 原仓库地址

https://github.com/KUN1007/kun-galgame-patch-next

本项目遵从 AGPL-3.0 开源协议, 进行任何的修改分发时请注明原始仓库与作者地址

Extension points exported contracts — how you extend this code

GalgameCard (Interface)
(no doc)
types/galgame.d.ts
QueryResultRow (Interface)
(no doc)
types/pg.d.ts
KunUser (Interface)
(no doc)
types/user.d.ts
KunPatchRating (Interface)
(no doc)
types/api/galgame.ts
Props (Interface)
(no doc)
components/auth/forgot/ResetForm.tsx
Props (Interface)
(no doc)
components/user/StartChatButton.tsx
Props (Interface)
(no doc)
components/galgame/Container.tsx
Props (Interface)
(no doc)
components/search/Container.tsx

Core symbols most depended-on inside this repo

verifyHeaderCookie
called by 176
middleware/_verifyHeaderCookie.ts
kunErrorHandler
called by 60
utils/kunErrorHandler.ts
kunParsePostBody
called by 50
app/api/utils/parseQuery.ts
kunParseGetQuery
called by 47
app/api/utils/parseQuery.ts
cn
called by 36
utils/cn.ts
getKv
called by 35
lib/redis.ts
setKv
called by 33
lib/redis.ts
kunParsePutBody
called by 31
app/api/utils/parseQuery.ts

Shape

Function 1,854
Interface 465
Class 8
Enum 2

Languages

TypeScript100%

Modules by API surface

app/api/utils/jwt.ts30 symbols
migration/backup/_migration.mjs18 symbols
types/api/admin.ts16 symbols
lib/redis.ts16 symbols
app/api/user/session/cache.ts15 symbols
components/patch/introduction/IntroductionTab.tsx14 symbols
components/settings/user/LoginSessions.tsx13 symbols
components/search/Input.tsx13 symbols
components/admin/rating/Container.tsx13 symbols
components/admin/comment/Container.tsx13 symbols
app/api/utils/algorithm.ts13 symbols
app/api/patch/cache.ts13 symbols

Datastores touched

touchgalDatabase · 1 repos

For agents

$ claude mcp add kun-touchgal-next \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page