About this project
OwnChat is a self-hosted desktop chat application for users who want control over their communication. It follows a client-server-client architecture, where multiple desktop clients connect to a central server that relays messages in real time. The application is built with Java Swing for the user interface, Java Sockets for networking, and Oracle Database for persistent storage.
Key features include:
- **Account creation and login**: User credentials are stored in the `USER_DETAILS` table and validated during login.
- **Contacts management**: Users can add contacts, view their contact list, and check if a contact is online before starting a chat.
- **Real-time messaging**: Each logged-in client registers a socket with the server; messages are relayed live to the recipient if they have a chat window open. All messages are logged to `CHAT_HISTORY`.
- **Chat history**: Reopening a chat with a contact replays prior messages, color-coded by sender, with date/time headers.
- **Themes**: Users can choose between Metal, Dark, and Light look-and-feels. The selected theme is saved per user in the `SETTINGS` table and automatically applied on login.
- **Online/offline status tracking**: The server updates `LOG_STATUS` whenever a user opens/closes the contacts list or logs in/out, including an auto-logout hook on window close.
- **Configurable server IP**: Clients can point to any server host via a simple settings screen.
- **About screen**: Displays developer and branding information.
The project is structured into three main parts: the client application, the server, and the database schema. The client consists of multiple Java classes for different screens (welcome, login, create account, settings, contacts, chat window, etc.). The server is multi-threaded, handling each client connection in a separate thread, and uses a `ConcurrentHashMap` to track connected clients for message relaying. The database schema includes tables for users, settings, login status, contacts, and chat history, with triggers to auto-seed default settings and initial logged-out status for new users.
Setup involves building the Oracle database by running the provided SQL script, then running the server executable (OwnChatS-Portable.zip) and entering database credentials, and finally running the client executable (OwnChat-Portable.zip), setting the server IP, creating an account, and chatting. The roadmap mentions a future web-based version using Servlets, JSP, J2EE, and Spring Boot with an HTML/CSS/Bootstrap frontend.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.