{"id":13431273,"url":"https://github.com/3Shain/Comen","last_synced_at":"2025-03-16T11:31:20.998Z","repository":{"id":39559575,"uuid":"167899209","full_name":"3Shain/Comen","owner":"3Shain","description":"📺直播用弹幕栏【原bilichat】","archived":false,"fork":false,"pushed_at":"2023-03-08T03:20:28.000Z","size":5106,"stargazers_count":908,"open_issues_count":18,"forks_count":84,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-03-10T13:14:38.581Z","etag":null,"topics":["acfun","bilibili","bilichat","livechat","obs","overlay","youtube"],"latest_commit_sha":null,"homepage":"https://comen.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/3Shain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"custom":["https://afdian.net/@comen"]}},"created_at":"2019-01-28T04:31:58.000Z","updated_at":"2025-02-17T09:06:22.000Z","dependencies_parsed_at":"2024-01-21T20:12:11.180Z","dependency_job_id":null,"html_url":"https://github.com/3Shain/Comen","commit_stats":null,"previous_names":["3shain/bilichat"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3Shain%2FComen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3Shain%2FComen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3Shain%2FComen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3Shain%2FComen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3Shain","download_url":"https://codeload.github.com/3Shain/Comen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243862810,"owners_count":20360214,"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":["acfun","bilibili","bilichat","livechat","obs","overlay","youtube"],"created_at":"2024-07-31T02:01:01.849Z","updated_at":"2025-03-16T11:31:19.993Z","avatar_url":"https://github.com/3Shain.png","language":"TypeScript","funding_links":["https://afdian.net/@comen"],"categories":["TypeScript","直播相关工具"],"sub_categories":["直播脚本"],"readme":"# Comen\n\n\u003e 此项目已长期没有维护\n\n[![MIT License](https://img.shields.io/npm/l/isomorphic-danmaku.svg)](https://github.com/3Shain/isomorphic-danmaku/LICENSE)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)\n原项目【bilichat】请查看[bilichat](https://github.com/3Shain/Comen/tree/bilichat)分支\n\nComen是一个主要用于在网络直播中向观众展示当前直播间实时评论流的工具。\n\n### 主要特性\n* 多平台支持：默认提供了Acfun，Bilibili的接入实现。合理的抽象低耦合设计使得新平台的接入也很容易。\n* 高可靠性：不只是一个爱好项目。原项目已运行两年的时间，积累了各种对用户体验和异常处理的优化。\n* 兼容Youtube评论栏样式，只需修改URL就能迁移。\n* \u003cspan style=\"color:#7f7f7f\"\u003e高度自定义 (计划中,TBD)\u003c/span\u003e\n* \u003cspan style=\"color:#006c91\"\u003e作为原项目的延续，提供用户几乎无感知的兼容。\u003c/span\u003e\n\n\n### 贡献代码\n\n本项目主要技术栈为前端Angular+后端Nestjs,即完全使用TypeScript(JavaScript)实现。\n\n本项目使用到了nx workspace作为管理代码的工具。本项目是一个monorepo的结构，所以任何本项目开源的部分都能在此仓库找到。\n\n**代码结构**\n```\n- apps\n    - core    --- 前端项目\n    - node-backend    --- 后端的node(cli)包装\n- libs\n    - backend-core    --- 后端的可嵌入式实现\n    - common          --- 常用与扩展代码\n    - gamma           --- 兼容Youtube的评论栏渲染器(Angular组件库)\n    - isomorphic-danmaku            --- 同构弹幕，实现了acfun、bilibili的ws连接\n    - isomprphic-danmaku-server     --- 同构弹幕，服务端only部分\n```\n\n**调试运行**\n拉取仓库后，首先安装项目依赖\n```sh\nnpm install\n```\n\n然后分别打开前端与后端的dev-server\n```\nnx serve core\nnx serve node-backend\n```\n\n现在可以对代码进行更改了。任何有关代码更改都会触发自动刷新。\n\n**我想贡献一些新功能/我想修复一些问题**\n\n本项目的主要目标是将一类实时/非实时评论流在任何兼容html5的平台上渲染出来。在抽象设计上，本项目可分成三大部分：评论源(source),过滤器(filter)和渲染器(renderer)\n\n* 我想添加一个新的平台实现\n\n参考 apps/core/src/app/sources 下的文件。你需要实现MessageSource接口，其中connect方法就是返回一个生产Message的可观察对象。\n\n* 我想修改过滤相关的代码\n    \n参考 apps/core/src/app/common/filter.ts 。过滤器是通过rxjs的pipe实现的，强烈建议熟练掌握rxjs，或仅在现有的代码上修改。原理上有点类似于后端的middleware，但rxjs的可观察对象概念要复杂一些，涉及到错误处理，subscription和complete的处理。\n        另外你还可能需要参考各类Message对象的定义(common包的message.ts)。他们只是单纯的数据对象，不涉及到类也没有成员函数。这些类型定义可能并不稳定。Message由source生成，经过filter后最终流向renderer。但并不是所有类型(以type字段区分的类型)都会被renderer处理。filter也有可能在中间对类型对象数据进行转换/变更。\n\n\n* 我想修改渲染相关的代码\n\n所有渲染相关代码都在libs/gamma包内。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3Shain%2FComen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3Shain%2FComen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3Shain%2FComen/lists"}