Skip to content

edwinlzrvch/web-messaging-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Web Messaging App

This is a course project by Edvīns Lazarevičs for the subject Object Oriented Programming at TSI.

This project is a full-stack web messaging application, organized into separate backend and frontend modules. Below is an overview of the project structure and the purpose of each main component.

Project Structure

web-messaging-app/
│
├── backend/
│   ├── chat-history/         # Spring Boot (Kotlin) service for chat message history
│   └── real-time-chat/       # Spring Boot (Kotlin) service for real-time chat and websocket communication
│
└── frontend/
    └── chat-web/             # React + TypeScript + Vite frontend for the chat application

Backend

chat-history

  • Purpose: Handles storage and retrieval of chat message history.
  • Tech Stack: Kotlin, Spring Boot, JPA, H2 database, Kafka (for messaging integration).
  • Key Files:
    • build.gradle – Gradle build configuration
    • src/main/kotlin/ – Application source code
    • src/main/resources/ – Configuration and static resources

real-time-chat

  • Purpose: Manages real-time chat features, including websocket connections and live message delivery.
  • Tech Stack: Kotlin, Spring Boot, WebFlux, WebSocket, JPA, H2 database.
  • Key Files:
    • build.gradle.kts – Gradle build configuration (Kotlin DSL)
    • src/main/kotlin/ – Application source code
    • src/main/resources/ – Configuration and static resources
    • docker-compose.yaml – (If present) for local development/testing

Frontend

chat-web

  • Purpose: User interface for the chat application.
  • Tech Stack: React, TypeScript, Vite, Tailwind CSS, STOMP/WebSocket client libraries.
  • Key Files:
    • src/ – Main application source code
      • components/ – React components (organized by feature: channel, chat, profile, signin)
      • assets/ – Static assets (e.g., images)
      • App.tsx, Home.tsx, main.tsx – Main entry points and routing
    • index.html – Main HTML template
    • package.json – Project dependencies and scripts
    • tailwind.config.ts – Tailwind CSS configuration

How to Get Started

  1. Backend:

    • Each backend service can be built and run independently using Gradle (./gradlew bootRun).
    • Configure environment variables or application.properties as needed.
  2. Frontend:

    • Install dependencies: npm install
    • Start development server: npm run dev

Running Kafka with Docker Compose

A docker-compose.yaml file is provided in backend/real-time-chat/ to help you run Kafka and Zookeeper locally for development and testing. To start Kafka and Zookeeper, run the following command from the backend/real-time-chat directory:

docker-compose up -d
  • This will start both Zookeeper and Kafka containers in the background.
  • Kafka will be available on localhost:9092.
  • To stop the services, run:
docker-compose down

Security Notice

Important:

  • The application.properties files in backend modules now use placeholders for sensitive values:
    • spring.security.oauth2.client.registration.github.client-id=YOUR_GITHUB_CLIENT_ID
    • spring.security.oauth2.client.registration.github.client-secret=YOUR_GITHUB_CLIENT_SECRET

Notes

  • Each module contains its own README and configuration files for more details.
  • The backend and frontend communicate via REST APIs and WebSockets.
  • Designed for modularity and scalability.

For more details, refer to the README files within each module or the source code itself.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors