This is a real-time chat application using a Scala backend and a Vue.js-based frontend with the Quasar Framework, organized as a monorepo. Users can join chat rooms, send messages, and view connected members in real-time.
- Real-time messaging using WebSockets.
- Connected members display with live updates.
- Display of join and leave messages.
- Simple username-based login.
- Folder:
front/quasar-chat/src/
- Components:
ChatRoom.vue
: Core chat room UI.LoginForm.vue
: Handles user login input.
- Pages:
IndexPage.vue
: The main page, which leads from login to the chat room.
- Layouts:
MainLayout.vue
: Layout used across the app.
- Services:
websockets.ts
: Manages WebSocket connections to the backend.
- Router:
routes.ts
: Configures app routing for navigation between pages.
- Components:
- Folder:
project/src/main/scala/
- Main.scala: Entry point for the backend server.
- ChatServer.scala: Sets up WebSocket connections and manages messaging.
- ChatRoomActor.scala: Manages chat room actors for message handling.
- WebSocketFlow.scala: Handles WebSocket flows for message routing.
- JsonMessageAdapter.scala: Manages JSON serialization and deserialization for WebSocket communication.
- Logging.scala: Handles logging for the backend using Logback.
- Frontend:
public/index.html
: Entry point for the frontend, working js prototype.
- Backend:
resources/logback.xml
: Configuration for logging, using Logback.
Frontend: Quasar Framework (Vue.js). Full details on dependencies in package.json
.
Backend: Scala with Akka Streams and WebSocket support. Full details of dependencies in build.sbt
.
Clone the repository.
- Navigate to the frontend folder:
cd front/quasar-chat
. - Install dependencies using
npm install
oryarn
. - Start the development server with
quasar dev
. - Open
http://localhost:8080
in your browser.
- Navigate to the root repo folder
- Run the Scala backend server using
sbt run
. - The WebSocket server will be accessible at
ws://localhost:8080/ws-chat/
.
-
Write Comments! - Fix buggy member list slider on desktop.
-
Automatically scroll to the bottom of thechatmessages
area when new messages arrive. -
Add auto-reconnect functionality for WebSockets after idle.
- Write Comments!
-
Implement message persistence with a database. - Add user authentication.
-
Resolve duplicate user error on login.