MCPcopy Index your code
hub / github.com/edolganov/live-chat-engine

github.com/edolganov/live-chat-engine @v1.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.3 ↗ · + Follow
4,001 symbols 14,100 edges 817 files 233 documented · 6%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Live Chat Engine

Open source system for live chats with visitors (customers) in any site. Contains server-side (chats storing, users and billing management), operators cabinet for chatting and chat form for site's visitors.

Chat Form on a site: Operators Cabinet

Operators Cabinet: Operators Cabinet

Two work modes

Software as a Service (SaaS mode)

In SaaS mode clients create accounts for themselves and pay monthly bills. This mode is ready for production usage and enabled by default.

Example of implementation: cheapchat.me

Other popular examples: olark, livezilla, boldchat and others

Tool for Other System (Tool mode)

In Tool Mode admin creates accounts, user can be only a operator, no monthly bills. You can use Tool Mode for single site with own hosting for example.

To enable this mode change:

  • before build open file /components/cache-remote/extra/net-props/common.properties
  • or after build open file /build/_servers/chat-central-server/net-props/common.properties
  • change prop 'toolMode' to true

Requirements

  • Java 8
  • PostgreSQL or default H2DB (included to the build)
  • Windows (tested on Win7) / Linux (tested on Ubuntu)

How to build

  • download last version
  • check Java version (print "java -version" in a console)
  • start build.bat (win) or build.sh (linux)
  • on BUILD SUCCESSFUL message see /build/_servers dir
  • copy all files from /build/_servers to your work dir
  • run all components by single runner: run-all.bat (win) or run-all.sh (linux)
  • open browser with url 127.0.0.1:10280 for access to index page
  • sign in to cabinet with admin / admin login and password

Engine components

database-h2-server

Included database server by default. Use for tests. For production use PostgreSQL.

Run by /run.bat (run.sh).

By default H2 creates ~/livechat db file.


chat-central-server

Server for caches and synchronization.

Run by /run.bat (run.sh).

Configs and logs:

  • /config.properties - configs for central server
  • /net-props/* - common configs for all servers
  • /server.log - logs

chat-front-server

Web server for site and operators online cabinet. Powered by Tomcat 7 Web Server.

Run by /bin/run.bat (run.sh).

Configs and logs:

  • /conf - web server conf (see Tomcat docs)
  • /webapps/ROOT/WEB-INF/front.properties - special front app configs
  • /logs/catalina.log - logs

chat-node-server

Storage for chats accounts. Powered by Tomcat 7 Web Server.

Run by /bin/run.bat (run.sh).

Configs and logs:

  • /conf - web server conf (see Tomcat docs)
  • /webapps/ROOT/WEB-INF/chat.properties - special node app configs
  • /logs/catalina.log - logs
  • /data/accounts - created chat accounts

Demployment

Simple deployment scheme

Only one instance of front and node servers:

deploy-scheme-simple

Production deployment scheme

Load balancer (for example: nginx) for multi front instances, new storages for new accounts:

deploy-scheme-prod

Extension points exported contracts — how you extend this code

Cache (Interface)
(no doc) [6 implementers]
components/cache-remote/src/och/comp/cache/Cache.java
AccConfigRead (Interface)
(no doc) [7 implementers]
common/api/src/och/api/model/chat/config/AccConfigRead.java
SecureKeyHolder (Interface)
(no doc) [14 implementers]
common/util/src/och/util/model/SecureKeyHolder.java
Sender (Interface)
(no doc) [5 implementers]
components/mail/src/och/comp/mail/Sender.java
PaypalClient (Interface)
(no doc) [4 implementers]
components/paypal/src/och/comp/paypal/PaypalClient.java
WebSecurityProvider (Interface)
(no doc) [4 implementers]
components/web/src/och/comp/web/BaseServlet.java
ChatsAccListener (Interface)
(no doc) [4 implementers]
components/chats/src/och/comp/chats/ChatsAccListener.java
Props (Interface)
(no doc) [4 implementers]
common/services/src/och/service/props/Props.java

Core symbols most depended-on inside this repo

size
called by 295
common/util/src/och/util/model/LimitedQueueList.java
get
called by 218
common/util/src/och/util/concurrent/DoneFuture.java
add
called by 175
common/util/src/och/util/model/LimitedQueueList.java
isEmpty
called by 172
server-front/src/och/front/service/chat/HostsStat.java
get
called by 169
server-front/src/och/front/web/FrontAppProvider.java
info
called by 130
components/paypal/src/com/paypal/core/LoggingManager.java
put
called by 129
common/util/src/och/util/socket/json/server/JsonProtocolSocketHandler.java
popUserFromSecurityContext
called by 120
common/api/src/och/api/model/user/SecurityContext.java

Shape

Method 2,971
Class 717
Function 252
Interface 50
Enum 11

Languages

Java94%
TypeScript6%

Modules by API surface

common/util/test-src/web/MockHttpServletRequest.java111 symbols
components/chats/src/och/comp/chats/ChatsAccService.java68 symbols
server-front/test-src/och/front/service/FrontAppTest.java66 symbols
common/util/test-src/web/MockHttpServletResponse.java64 symbols
server-front/src/och/front/service/ChatService.java61 symbols
common/util/test-src/web/MockServletContext.java52 symbols
common/util/src/och/util/Util.java49 symbols
server-chat/src/och/chat/service/ChatsService.java43 symbols
common/util/src/och/util/sql/SingleTxConnection.java43 symbols
server-front/src/och/front/service/model/ChatsModel.java40 symbols
components/chats/src/och/comp/chats/ChatsAcc.java35 symbols
common/util/src/och/util/string/WordsCounter.java34 symbols

Datastores touched

livechatDatabase · 1 repos
och-testDatabase · 1 repos

For agents

$ claude mcp add live-chat-engine \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact