Skip to content

Nikelroid/graphical_nwitter

Repository files navigation

Graphical-Nwitter

Java JavaFX Gluon Charm GSON Log4j

Project Description

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.

Features

  • 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.css and segmented.css.
  • Bot Interaction: Native UI support for rendering bot responses and game states (e.g., XO game boards).

System Requirements

  • 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.jar
    • gson-2.8.6.jar
    • log4j-core / log4j-api
    • commons-io-2.8.0.jar

Detailed File Analysis

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 .fxml files defining the structure of pages and cards (e.g., twitte.fxml, chat_sender.fxml).

Installation & Running

1. Clone the Repository

git clone https://github.com/nikelroid/graphical_nwitter.git
cd graphical_nwitter

2. Configure Build Path

Ensure 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.

3. Connection Setup

Navigate to main/src/resources/configs/connectionConfig.properties and verify the target IP and Port:

host=127.0.0.1
port=8080

4. Run the Application

Execute the Main class. VM Options for Java 11+:

--module-path /path/to/javafx-sdk/lib --add-modules javafx.controls,javafx.fxml

Usage

  1. Launch: Start the application. You will be greeted by the Login/Register page.
  2. Authenticate: Create an account or sign in.
  3. 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.
  4. Chat: Click on a user to start a DM, or use the "Group" tab to create a new group.

Contributing

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.

License

Distributed under the MIT License.

Contact

Project Maintainer - GitHub Profile

About

A comprehensive JavaFX-based desktop client for the Nwitter social platform, offering a modern graphical interface for users to tweet, chat, and manage profiles with built-in offline synchronization.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors