Giter Site home page Giter Site logo

m10088 / ghchat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aermin/ghchat

0.0 1.0 0.0 53.19 MB

:octocat: 📱A chat application for GitHub. Front-End : React+Redux+React-router+axios+scss;Back-end: node(koa2)+mysql+JWT+ Typescripts; Socket.io, PWA

Home Page: https://im.aermin.top/group_chat/ddbffd80-3663-11e9-a580-d119b23ef62e

License: MIT License

JavaScript 63.83% HTML 0.68% CSS 12.56% TSQL 1.74% TypeScript 21.19%

ghchat's Introduction

ghChat

Node version: 8.12.0 Npm version: 6.4.1 MySQL version: 5.7.22

English | 简体中文

ghChat(react version)

I 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.

If you have anything idea about integration, welcome to create issues about feature suggestion, bug feedback or send pull requests.

Address

GitHub address

Project online address(also this project's group address),support logging in with GitHub authorization

Welcome to click this link to contact me.

What technology do ghChat use?

Front-End : React+Redux+React-router+axios+scss; Back-end: node(koa2)+mysql+JWT(Json web token); use socket.io to send messages with each other. And get other technology please follow the package.json file.

Demo with photo:

Just some functions

image

image

image

Suggest to open PWA: How to turn on PWA in chrome?

Features && Progress

  • Account system

    • Log in
    • Resister
    • Log out
    • log in multiple devices at the same time
  • Integrate with github

    • Log in with github authorization
    • show github user public information
  • UI

    • Basic UI components: modal,notification ...
    • Responsive layout.
  • Private chat

    • Chat with my contacts
    • Add contact
    • Contact information card
    • Delete contact
  • Group chat

    • Chat together in a group
    • Create a group
    • Join a group
    • Group information view, include group members, group notice, group name...
    • Quit the group
    • Editor group information
    • Prompt when some one join group
  • Search

    • Search users and groups in local or online obscurely
  • Rich chat mode

    • Chat list sort by time every time
    • Send photo
    • Send emoji
    • Send file
    • Download file
    • Press enter key to send message
    • @somebody
    • Full view photo
    • Send photo from copy
    • share user/group in the internal or external
    • Search expression online
    • Markdown
    • Quote
  • Message notification

    • Browser notification
    • Show chat messages unread number in the chat list
    • chat messages unread number still show accurately when user refresh, reopen page or (different accounts)login again
  • Performance

    • Open gzip to compress static resource
    • Lazy load chat messages. Fetch twenty messages by one time in every chat.
    • lazy load components
    • API request frequency limit
    • css files build separately
    • SQL optimization
  • Others

    • Robot smart reply (just support Chinese)
    • Add SSL for website
    • PWA
    • Rewrite back end code with TS
    • Multilingual solution with I18
    • encapsulate back end code as sdk.
    • CI/CD

Development

  1. clone project code
git clone https://github.com/aermin/ghChat.git
  1. download npm module for front end
cd ghChat
npm i
  1. download npm module for the back end
cd ghChat/server
npm i
  1. init DB
// You should create a MySQL DB which name ghchat in local
DB configuration follows 'ghChat/server/src/configs/configs.dev.ts'

npm run init_sql // then check if it inits successfully

ps: 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.

  1. run front end and back end code
npm run start
cd ..
npm run start

use in production

Premise: pls create secrets.ts file to do configuration

export default {
  port: '3000', // server port
  dbConnection: {
    host: '', // 数据库IP
    port: 3306, // 数据库端口
    database: 'ghchat', // 数据库名称
    user: '', // 数据库用户名
    password: '', // 数据库密码
  },
  client_secret: '', // client_secret of github authorization:  github-> settings ->  Developer settings to get
  jwt_secret: '', // secret of json web token
  qiniu: { // qiniu cdn configuration
    accessKey: '',
    secretKey: '',
    bucket: ''
  },
  robot_key: '', // the key of robot chat api => If you want to use robot chat, pls apply this key from http://www.tuling123.com/
};

1.build front end code

cd src
npm run build:prod

2.build server code

cd sever
npm run build:prod
  1. put the folders(build, dist) which built from step1, step2 into you server, and run dist/index.js file (here you can copy ghChat/server/package.json to your sever as well,and run command npm run start:prod)

License

MIT

Please indicate the source if you use the code of this project

Contributors

ghchat's People

Contributors

aermin avatar abbyjl avatar zouyoushun avatar blackmatch avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.