Simple Chat:你的前端技术游乐场

Simple Chat 是一个简单易上手的聊天项目,专为前端技术爱好者打造。你可以把它当作一个练手项目,也可以把它作为编码挑战来挑战自己。

每个会话都会在全局聊天室中创建一个用户。

想试试吗?运行以下命令:

$ yarn install
$ yarn start

然后访问 http://localhost:3000

该应用采用了面向对象和 MVC 模式,并通过 TypeScript 装饰器实现了基础的依赖注入(参见 decorators 目录)。

组件使用 Web Components 技术构建,为 Web 开发自定义组件提供了更自然的方式。虽然 Web Components 还处于早期阶段,在测试方面存在一些限制(例如对 Cypress 的支持),但它为构建现代 Web 应用提供了强大的可能性。

zip
simple-chat-master.zip 预估大小:53个文件
folder
simple-chat-master 文件夹
file
.gitignore 30B
file
chat.gif 8.69MB
file
package.json 1KB
file
package-lock.json 204KB
folder
src 文件夹
folder
declarations 文件夹
file
html.d.ts 84B
folder
components 文件夹
folder
app 文件夹
file
app.component.ts 1KB
file
app.template.html 498B
folder
chat-preview 文件夹
file
chat-preview.component.ts 2KB
file
chat-preview.template.html 1KB
folder
chat 文件夹
file
chat.component.ts 3KB
file
chat.template.html 2KB
folder
chat-list 文件夹
file
chat-list.template.html 298B
file
chat-list.component.ts 2KB
folder
sidebar 文件夹
file
sidebar-header.template.html 514B
file
sidebar-header.component.ts 1KB
file
sidebar.template.html 524B
file
sidebar.component.ts 256B
folder
message 文件夹
file
message.component.ts 1KB
file
message.template.html 2KB
folder
avatar 文件夹
file
avatar.component.ts 2KB
file
avatar.template.html 230B
folder
base 文件夹
file
base.component.ts 436B
file
abstract.component.ts 1KB
folder
decorators 文件夹
file
inject.decorator.ts 1KB
file
bind.decorator.spec.ts 971B
file
updates.decorator.ts 781B
file
bind.decorator.ts 563B
file
inject.decorator.spec.ts 1024B
folder
services 文件夹
file
scaledrone-chat.service.ts 4KB
file
memory-chat.service.ts 2KB
file
local-storage-chat.service.ts 736B
file
base.service.ts 383B
folder
models 文件夹
file
IMessage.ts 197B
file
IUser.ts 78B
file
IChat.ts 177B
folder
helpers 文件夹
file
rick-and-morty.ts 1KB
file
htmlLoader.js 143B
file
index.ts 87B
folder
controllers 文件夹
file
abstract.controller.ts 314B
file
chat.controller.ts 2KB
file
chat-list.controller.ts 1KB
file
sidebar.controller.ts 895B
file
base.controller.ts 130B
file
ChatApp.ts 3KB
file
webpack.config.js 797B
file
LICENSE 1KB
folder
public 文件夹
file
index.html 584B
file
styles.css 614B
file
tsconfig.json 291B
file
README.md 2KB
folder
.circleci 文件夹
file
config.yml 1KB
file
.editorconfig 274B
file
yarn.lock 192KB
...
zip 文件大小:5.02MB