This is demo/poc for real time group chat, built with below tech. stack.
Frontend
: React.js, socket.io, webpack, babel, cypress.Backend
: Go language, websocket, rethinkdb, rethinkdb-go driver.
- Realtime multi-user message broadcasting.
- Realtime chat-group/channel generation and broadcasting.
- Realtime user event handling.
Pre-requirement for install + execution to work properly :
- Go language >= v1.10,
- Rethinkdb-go driver,
- Node.js >= 8.10+,
- npm >= 5.6.0 Or yarn
Update configuration as per development environment, once the source code in place :
Rethinkdb configuration
:- Sample data import after database create :
- Create database for example
realtimeappdemo1
and import sample data fromsample_data
directory. - Rebuild table indexes using
rethinkdb index-rebuild
.
- Create database for example
- Updates in
backend/main.go
Address
:System_IP_address
/localhost
/host address
and rethinkdb connectionport
,Database
: database name for connection.
- Sample data import after database create :
Backend
already configured to run on port9001
, if want to change thenbackend/main.go
-> changeport
value.Frontend
already configured to run on port9000
, if want to change thenfrontend/webpack.config.js
-> change value ofport
param.- Start rethinkdb server or if already started then make sure rethinkdb server is up and running .
- Start backend :
For backend tests :
$ cd backend $ go run *.go
$ go test ./tests/*.go
- Start frontend : Install the dependencies+devDependencies and start the server
For frontend tests, update configuration in
$ cd frontend $ npm install $ npm run start:development (hot reload) OR $ npm run build:development (hot reload + tests)
frontend/cypress/cypress-config.json
then ->$ npm run test
- Writing more tests (work in progress)
- User management and authentication (work in progress)
- List goes on ...
Apache License 2.0