How rayen03/swing-ai-chat works
Project type and purpose
• This is a Java-based full-stack chat application, composed of two Maven modules:
• client: a desktop UI client following an MVC pattern
• server: a backend providing authentication, session management, chat services, and persistence
• The goal is to let users log in, send/receive chat messages in real time, and persist chats and user data in a database.
File structure
• Top-level pom.xml ties together two submodules: client/ and server/.
• client/src/main/java/com/aichatapp/*
• views: ChatView, LoginView (UI layer)
• controllers: ClientController (handles user actions, serializes ChatMessage via GSON, calls network API)
• models: ChatMessage (data transfer object)
• server/src/main/java/com/aichatapp/*
• services: ChatService (broadcast and routing), UserService (auth, needs password hashing), SessionService (track active sessions)
• models: ChatMessage (shared DTO), DatabaseConnection (manages JDBC or ORM)
• Server.java: entry point that wires services, opens network endpoints (e.g. REST or socket listeners)
• Tests in both modules follow the same package layout.
• No Docker/Kubernetes manifests or external microservices—this is a monolithic server.
README for additional insights
• Notes on feature tasks: password hashing in UserService, GSON setup in ClientController, shared ChatMessage definition.