Graphical-Nwitter is the user-facing desktop application for the Nwitter social ecosystem. Developed with JavaFX and styled with CSS, it transforms raw server data into a rich, interactive visual experience. It allows users to browse timelines, interact with posts (like, retweet, comment), and communicate via real-time messaging.
A key architectural feature is its Offline Manager, which allows the application to remain functional without an internet connection. Actions taken while offline (such as sending messages or updating settings) are cached locally and synchronized with the server automatically upon reconnection.
- Interactive UI: A polished interface built with FXML and Gluon Charm components (
Cards,Pages). - Feed & Explorer: Visual timeline rendering with support for image posts and infinite scrolling logic.
- Advanced Messaging: Support for Direct Messages, Group Chats, and Mass Messaging (
massMessenger), complete with visual bubbles for senders/receivers. - Offline Synchronization: robust handling of network interruptions; queues requests in local JSON files (
offlineMessages,offlineSetting) to be pushed later. - User Management: Dedicated graphical views for Registration, Login, Profile Editing, and User Search.
- Visual Customization: Theming support via
styles.cssandsegmented.css. - Bot Interaction: Native UI support for rendering bot responses and game states (e.g., XO game boards).
- Java Development Kit (JDK): Version 11 or higher.
- JavaFX SDK: Required for UI rendering.
- Nwitter Server: The backend instance must be running.
- Dependencies:
charm-glisten-6.0.6.jargson-2.8.6.jarlog4j-core/log4j-apicommons-io-2.8.0.jar
The source code is organized under main/src/java/:
launch/Main.java: The application entry point that initializes the JavaFX Stage.launch/Controller.java: The central navigation controller, swapping views between Login, Feed, and Chat.connection/sender.java: Handles raw socket communication with the backend.mainPages/: Controllers for the primary tabs (Feed.java,Explorer.java,Messenger.java,Setting.java).jsonContoller/: Decodes incoming JSON data streams into Java Objects (jsonTwittes,jsonMessage).offlineMessages/&offlineSetting/: Contains the logic for saving user actions to local storage when the server is unreachable.graphics/: Utility classes for loading images and managing graphical assets.resources/layout/: Contains all.fxmlfiles defining the structure of pages and cards (e.g.,twitte.fxml,chat_sender.fxml).
git clone https://github.com/nikelroid/graphical_nwitter.git
cd graphical_nwitterEnsure all JAR files located in the lib folder are added to your project's libraries.
- Note: If using an IDE like IntelliJ or Eclipse, you may need to add the JavaFX library to your module path.
Navigate to main/src/resources/configs/connectionConfig.properties and verify the target IP and Port:
host=127.0.0.1
port=8080Execute the Main class.
VM Options for Java 11+:
--module-path /path/to/javafx-sdk/lib --add-modules javafx.controls,javafx.fxml- Launch: Start the application. You will be greeted by the Login/Register page.
- Authenticate: Create an account or sign in.
- Explore: Use the bottom navigation bar to switch views.
- House Icon: Your personalized Feed.
- Compass: Explorer (Global posts).
- Envelope: Chat and Groups.
- Gear: Settings and Privacy.
- Chat: Click on a user to start a DM, or use the "Group" tab to create a new group.
We welcome improvements to the UI/UX. Please ensure any changes to FXML files are tested against the current controller logic to avoid binding errors.
Distributed under the MIT License.
Project Maintainer - GitHub Profile