{"id":14989524,"url":"https://github.com/aermin/ghchat","last_synced_at":"2025-04-12T15:33:06.924Z","repository":{"id":37752214,"uuid":"134268716","full_name":"aermin/ghChat","owner":"aermin","description":":octocat: 📱A chat application for GitHub. React + PWA + Node(koa2) + Typescripts  + Mysql  + Socket.io","archived":false,"fork":false,"pushed_at":"2023-01-04T11:17:17.000Z","size":56807,"stargazers_count":932,"open_issues_count":53,"forks_count":168,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-04-11T09:17:38.392Z","etag":null,"topics":["axios","chat","im","jwt","koa2","mysql","nodejs","pwa","react","react-router","redux","scss","socket-io","typescript","webpack"],"latest_commit_sha":null,"homepage":"https://im.aermin.top/group_chat/ddbffd80-3663-11e9-a580-d119b23ef62e","language":"JavaScript","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/aermin.png","metadata":{"files":{"readme":"README-en.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}},"created_at":"2018-05-21T12:51:55.000Z","updated_at":"2025-04-02T12:36:25.000Z","dependencies_parsed_at":"2023-02-02T10:00:22.001Z","dependency_job_id":null,"html_url":"https://github.com/aermin/ghChat","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aermin%2FghChat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aermin%2FghChat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aermin%2FghChat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aermin%2FghChat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aermin","download_url":"https://codeload.github.com/aermin/ghChat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248589874,"owners_count":21129693,"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":["axios","chat","im","jwt","koa2","mysql","nodejs","pwa","react","react-router","redux","scss","socket-io","typescript","webpack"],"created_at":"2024-09-24T14:18:30.088Z","updated_at":"2025-04-12T15:33:06.896Z","avatar_url":"https://github.com/aermin.png","language":"JavaScript","readme":"\u003e### GitAds\n\u003e\u003ca href=\"https://tracking.gitads.io/?repo=ghChat\"\u003e\u003cimg src=\"https://images.gitads.io/ghChat\" alt=\"GitAds\"/\u003e\u003c/a\u003e\n\n\n![ghChat](https://user-images.githubusercontent.com/24861316/54087066-55783580-438a-11e9-9a5d-14288e84a3f9.png)\n\n\n[![Node.js](https://img.shields.io/badge/Node.js-10.15.3-brightgreen.svg)](https://nodejs.org/en/download/)\n[![MySQL](https://img.shields.io/badge/MySQL-5.7.22-lightgrey.svg)](https://www.mysql.com/downloads/)\n[![License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/aermin/ghChat/blob/master/LICENSE)\n[![Author](https://img.shields.io/badge/Author-aermin-blue.svg)](https://github.com/aermin)\n\nEnglish | [简体中文](./README.md)\n\n## ghChat(react version)\n\nI hope that this project can be a chat tool for GitHub. So I will try to make it do some integration with GitHub. At present，it just support logging in with GitHub authorization and look GitHub user public information in ghChat. You can create group in ghChat for your github project and post the group link in the readme to convenient for the users' communication.\n\nIf you have anything idea about integration, welcome to create issues about feature suggestion, bug feedback or send pull requests.\n\n### Address\n\n[GitHub address](https://github.com/aermin/ghChat)\n\n[Project online address(also this project's group address)，support logging in with GitHub authorization](https://im.aermin.top/group_chat/ddbffd80-3663-11e9-a580-d119b23ef62e)\n\nWelcome to [ click this link](https://im.aermin.top/private_chat/1) to contact me.\n\n\n### What technology do ghChat use?\n\nFront-End : React+Redux+React-router+axios+scss；\nBack-end: node(koa2)+mysql+JWT(Json web token);\nuse socket.io to send messages with each other.\nAnd get other technology please follow the package.json file.\n\n### Demo with photo：\n\n\n![pic](https://user-images.githubusercontent.com/24861316/75103650-7cca2000-5638-11ea-8518-03eb95deb87b.png)\n\n![pic1](https://user-images.githubusercontent.com/24861316/75103301-ff9cac00-5633-11ea-89b0-f54fa90b71ea.png)\n\n![pic2](https://user-images.githubusercontent.com/24861316/75103299-fa3f6180-5633-11ea-9598-1f2852e5aa19.png)\n\n![pic3](https://user-images.githubusercontent.com/24861316/57188951-5e285a80-6f3a-11e9-8def-ef932c4abc8b.png)\n\n![pic4](https://user-images.githubusercontent.\n\n### Suggest to open PWA: [How to turn on PWA in chrome?](https://github.com/aermin/blog/issues/63)\n\n### Features \u0026\u0026 Progress\n\n- Account system\n\n  - [x] Log in\n  - [x] Resister\n  - [x] Log out\n  - [x] log in multiple devices at the same time\n\n- Integrate with github\n\n  - [x] Log in with github authorization\n  - [x] show github user public information\n\n- UI\n    - [x] Basic UI components: modal，notification ...\n    - [x] Responsive layout.\n\n- Private chat\n\n  - [x] Chat with my contacts\n  - [x] Add contact\n  - [x] Contact information card\n  - [x] Delete contact\n\n- Group chat\n\n  - [x] Chat together in a group\n  - [x] Create a group\n  - [x] Join a group\n  - [x] Group information view, include group members, group notice, group name...\n  - [x] Quit the group\n  - [x] Editor group information\n  - [x] Prompt when some one join group\n\n- Search\n\n  - [x] Search users and groups in local or online obscurely\n\n- Rich chat mode\n\n  - [x] Chat list sort by time every time\n  - [x] Send photo\n  - [x] Send emoji\n  - [x] Send file\n  - [x] Download file\n  - [x] Press enter key to send message\n  - [x] @somebody\n  - [x] Full view photo\n  - [x] Send photo from copy\n  - [x] share user/group in the internal or external\n  - [ ] Markdown\n  - [ ] Quote\n\n- Message notification\n\n  - [x] Browser notification\n  - [x] Browser notification switch\n  - [x] Show chat messages unread number in the chat list\n  - [x] chat messages unread number still show accurately when user refresh, reopen page or (different accounts)login again\n\n- Performance\n\n  - [x] Open gzip to compress static resource\n  - [x] Lazy load chat messages. Fetch twenty messages by one time in every chat.\n  - [x] lazy load components\n  - [x] API request frequency limit\n  - [x] Build file Split Chunks\n  - [ ] SQL optimization\n\n- Others\n\n  - [x] Robot smart reply (just support Chinese)\n  - [x] Add SSL for website\n  - [x] PWA\n  - [x] Rewrite back end code with TS\n  - [ ] Multilingual solution with I18\n  - [ ] encapsulate back end code as sdk.\n  - [ ] CI/CD\n\n### Development\n\n1. clone project code\n```\ngit clone https://github.com/aermin/ghChat.git\n```\n\n2. download npm module for front end\n\n```\ncd ghChat\n```\n\n```\nnpm i\n```\n\n3. download npm module for the back end\n```\ncd ghChat/server\n```\n\n```\nnpm i\n```\n\n4. init DB\n```\n// You should create a MySQL DB which name ghchat in local\nDB configuration follows 'ghChat/server/src/configs/configs.dev.ts'\n\nnpm run init_sql // then check if it inits successfully\n```\nps: if you want to use github authorization to log in and use qiniu cdn which provides storage to send photo and file, you should follow the file(ghChat/server/src/configs/configs.dev.ts) to configure. The default won't be able to use.\n\n\n5. run front end and back end code\n```\nnpm run start\n```\n\n```\ncd ..\n```\n\n```\nnpm run start\n```\n\n### use in production\n\nPremise: pls create secrets.ts file to do configuration inside ghChat/server/ folder\n\n```\nexport default {\n  port: '3000', // server port\n  dbConnection: {\n    host: '', // 数据库IP\n    port: 3306, // 数据库端口\n    database: 'ghchat', // 数据库名称\n    user: '', // 数据库用户名\n    password: '', // 数据库密码\n  },\n  client_secret: '', // client_secret of github authorization:  github-\u003e settings -\u003e  Developer settings to get\n  jwt_secret: '', // secret of json web token\n  qiniu: { // qiniu cdn configuration\n    accessKey: '',\n    secretKey: '',\n    bucket: ''\n  },\n  robot_key: '', // the key of robot chat api =\u003e If you want to use robot chat, pls apply this key from http://www.tuling123.com/\n};\n```\n\n1.build front end code\n\n```\ncd src\nnpm run build:prod\n```\n\n2.build server code\n\n```\ncd sever\nnpm run build:prod\n```\n\n3. put the folders(build, dist) which built from step1, step2 into you server, and run dist/index.js file\n(here you can copy ghChat/server/package.json to your sever as well，and run command `npm run start:prod`)\n\n### License\n\n[MIT](https://opensource.org/licenses/MIT)\n\n***Please indicate the source if you use the code of this project***\n\n### Contributors\n\n\u003ca href=\"https://github.com/aermin\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/24861316?s=460\u0026v=4\" width=\"60\" height=\"60\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/AbbyJL\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/33203948?s=400\u0026v=4\" width=\"60\" height=\"60\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/ZouYouShun\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/5878538?s=400\u0026v=4\" width=\"60\" height=\"60\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/blackmatch\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/12443954?s=400\u0026v=4\" width=\"60\" height=\"60\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/gaoac\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/15978393?s=400\u0026v=4\" width=\"60\" height=\"60\" /\u003e\u003c/a\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faermin%2Fghchat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faermin%2Fghchat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faermin%2Fghchat/lists"}