Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฌ Movie Database Management System

A JavaFX-based Client-Server Movie Database Management System built for BUET CSE 108 (Object Oriented Programming Lab).

Java JavaFX Gradle License

๐Ÿ“– Overview

This application allows production companies to manage their movie portfolios through a graphical user interface. It features a multi-threaded server that handles multiple clients simultaneously, with real-time synchronization of movie data.

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      TCP Socket (Port 8080)      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   JavaFX Client     โ”‚ โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ โ”‚      Server         โ”‚
โ”‚  (GUI Application)  โ”‚         DataWrapper              โ”‚  (Multi-threaded)   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                                  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                                                         โ”‚
         โ–ผ                                                         โ–ผ
    User Interface                                            movies.txt
   (FXML + Controllers)                                     (Data Storage)

โœจ Features

Feature Description
๐Ÿ” Multi-tenant Each production company sees only their movies
๐Ÿ”„ Real-time Sync Changes sync between clients via server
๐ŸŽฏ Search Search by name, year, genre, or runtime range
๐Ÿ“Š Analytics Calculate total profit, find best/recent movies
โœ๏ธ CRUD Operations Add, delete, transfer movies
๐Ÿงต Multi-threaded Server Handles multiple clients simultaneously
๐Ÿ’พ Persistent Storage Data saved to movies.txt

๐Ÿ“ Project Structure

โ”œโ”€โ”€ MovieDatabaseClient/          # JavaFX Client Application
โ”‚   โ”œโ”€โ”€ src/main/java/
โ”‚   โ”‚   โ”œโ”€โ”€ com/example/javatermproject/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ProjectMain.java      # Main application entry
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ MainWindow.java       # Dashboard controller
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ MainFunctions.java    # Business logic
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ AddMenu.java          # Add movie controller
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ TransferWindow.java   # Transfer movie controller
โ”‚   โ”‚   โ”œโ”€โ”€ Linker/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Movie.java            # Movie data model
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ DataWrapper.java      # Network protocol wrapper
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ SocketWrapper.java    # Socket communication
โ”‚   โ”‚   โ””โ”€โ”€ Server/
โ”‚   โ”‚       โ”œโ”€โ”€ ServerMain.java       # Server entry point
โ”‚   โ”‚       โ”œโ”€โ”€ ReadingFile.java      # File input operations
โ”‚   โ”‚       โ””โ”€โ”€ WritingFile.java      # File output operations
โ”‚   โ””โ”€โ”€ src/main/resources/           # FXML UI files
โ”‚
โ”œโ”€โ”€ MovieDatabaseServer/          # Server Application (standalone)
โ”‚   โ””โ”€โ”€ (Same structure as client)
โ”‚
โ””โ”€โ”€ movies.txt                    # Movie database (CSV format)

๐Ÿš€ Getting Started

Prerequisites

  • Java 21 or higher
  • Gradle 8.5 or higher (wrapper included)

Installation

  1. Clone the repository

    git clone https://github.com/mninadmnobo/Movie-DataBase-Management-JavaFX.git
    cd Movie-DataBase-Management-JavaFX
  2. Build the project

    # Build Server
    cd MovieDatabaseServer
    ./gradlew build
    
    # Build Client
    cd ../MovieDatabaseClient
    ./gradlew build

Running the Application

โš ๏ธ Important: Always start the server before launching any clients!

  1. Start the Server

    cd MovieDatabaseServer
    ./gradlew run

    The server will start listening on localhost:8080

  2. Start the Client (in a new terminal)

    cd MovieDatabaseClient
    ./gradlew run
  3. Login with a production company name:

    • Pixar Animation Studios
    • Walt Disney Pictures
    • Miramax Films
    • Paramount Pictures
    • Or any company from the database

๐ŸŽฎ Usage Guide

Main Dashboard

Button Function
My Movies View all movies by your production company
Recent Movies Show movies from the most recent year
Best Movie Display highest profit movie
Search by Name Find movies by title
Search by Year Filter movies by release year
Search by Genre Filter by genre (Action, Drama, Comedy, etc.)
Search by Runtime Find movies within a runtime range
Add Movie Add a new movie to your company
Delete Movie Remove a movie from the database
Transfer Movie Transfer a movie to another company
Total Profit Calculate total profit for your company
Refresh Sync data with the server

Adding a New Movie

  1. Click Add Movie
  2. Fill in the movie details:
    • Movie Name
    • Release Year
    • Genres (up to 3)
    • Runtime (minutes)
    • Budget
    • Revenue
  3. Click Add to save

๐Ÿ—ƒ๏ธ Database Format

Movies are stored in movies.txt as CSV:

Name,Year,Genre1,Genre2,Genre3,Runtime,ProductionCompany,Budget,Revenue
Toy Story,1995,Animation,Comedy,Family,81,Pixar Animation Studios,30000000,373554033

๐Ÿ› ๏ธ Technology Stack

  • Language: Java 21
  • UI Framework: JavaFX 21
  • Build Tool: Gradle 8.5
  • Architecture: Client-Server with TCP Sockets
  • Data Format: CSV for storage, Serialized objects for network

๐Ÿ“Š Sample Data

The database includes 101 classic movies such as:

  • ๐ŸŽฅ Toy Story (1995) - Pixar
  • ๐ŸŽฅ Pulp Fiction (1994) - Miramax Films
  • ๐ŸŽฅ The Lion King (1994) - Walt Disney Pictures
  • ๐ŸŽฅ Star Wars (1977) - Lucasfilm
  • ๐ŸŽฅ The Godfather (1972) - Paramount Pictures

๐Ÿ”ง Configuration

Server Port

To change the server port, modify ServerMain.java:

ServerSocket serverSocket = new ServerSocket(8080); // Change 8080 to desired port

Client Connection

To connect to a different server, modify ProjectMain.java:

server = new SocketWrapper("127.0.0.1", 8080); // Change IP and port

๐Ÿ“ Course Information

  • Course: CSE 108 - Object Oriented Programming Lab
  • Institution: Bangladesh University of Engineering and Technology (BUET)
  • Term: Level 1, Term 2

๐Ÿค Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ‘ค Author

Moshiur Rahman Minad


Made with โค๏ธ for BUET CSE 108

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages