Skip to content

Repository files navigation

Restaurant CRM Dashboard (Legacy Java Swing Desktop Application)

Restaurant CRM Dashboard is a legacy Java Swing desktop application developed for restaurant customer relationship management, customer and staff survey collection, serial-connected feedback devices, and reporting using an Apache Derby database.

This project was originally built more than 10 years ago as a practical desktop system. The modernization work in this repository focuses on making the project understandable, buildable, and recruiter-friendly while preserving the original behavior, UI layout, database model, and hardware assumptions.

Executive Summary

The application is a Persian right-to-left restaurant CRM/dashboard. It supports login-based access, question and scenario banks, sending survey messages to external serial devices, health checks for survey nodes, and chart-based survey result views.

This is intentionally presented as a professionally preserved legacy system rather than a rewritten modern application.

Project Status

This repository preserves the original application while improving documentation, repository organization, and build portability.

The goal is to demonstrate software engineering practices applied to a real-world legacy Java desktop application rather than to redesign or modernize the application's architecture.

Features

  • Swing desktop UI with login dialog and tabbed workflow
  • Role/access-control table for question bank, scenario bank, and chart permissions
  • Restaurant operations tabs for: Daily sales management, Chef recommendations / daily specials, Finished food management
  • Survey question bank management
  • Survey scenario bank management
  • Serial message sending through RXTX
  • Serial answer ingestion into Derby
  • Node health-check workflow
  • JFreeChart bar charts for survey results
  • Embedded legacy Derby database directory for historical demo data

Technologies

  • Java Swing
  • NetBeans Java SE project metadata
  • Apache Ant build
  • Apache Derby Network Server
  • JDBC
  • RXTX serial communication
  • JFreeChart / JCommon
  • Legacy third-party Java libraries

Architecture Overview

RestaurantMain starts serial communication, starts Derby Network Server on port 1527, opens the login dialog, and then shows the main Swing frame. RestaurantPane and SurveyPane organize the top-level and survey-specific tabs. Screen classes build UI controls directly and use the Database helper for SQL operations.

More detail is available in docs/architecture.md.

Folder Structure

src/com/paydaran/Restaurant/  Java Swing source code
lib/                          Legacy jar dependencies
Restaurant_DB/                Preserved Derby database files
nbproject/                    NetBeans Ant project metadata
docs/                         Portfolio and maintenance documentation
screenshots/                  Placeholder folder for real screenshots

Running Locally

Requirements

  • JDK 8 recommended for best RXTX compatibility
  • JAVA_HOME pointing to a JDK
  • Apache Ant
  • RXTX native library installed for real serial hardware use

Build

ant jar

Run With Real Hardware

java -cp "dist/Restaurant.jar:lib/*" com.paydaran.Restaurant.RestaurantMain

On Windows, use ; instead of : in the classpath.

The application starts Derby Network Server automatically and connects to:

jdbc:derby://localhost:1527/Restaurant_DB

Default legacy login:

username: admin
password: admin

Database credentials used by the application:

username: paydaran
password: 123

Demo Mode

Use demo mode when serial hardware or RXTX native libraries are unavailable:

java -Drestaurant.demoMode=true -cp "dist/Restaurant.jar:lib/*" com.paydaran.Restaurant.RestaurantMain

Demo mode skips serial initialization and serial writes. For screenshots, it also uses the existing Restaurant_DB/ files through embedded Derby instead of requiring a Derby Network Server. It does not change UI layout, business logic, schema, or stored data.

Screenshots

Login

Login

Dashboard

Dashboard

Survey Question Bank

Question Bank

Survey Distribution

Survey Send

Reports & Charts

Charts

Documentation

Modernization Notes

The modernization is intentionally conservative. It adds documentation, build portability, dependency clarity, repository hygiene, and a narrow demo mode for machines without serial hardware. It does not rewrite the UI, replace Derby, alter schema, migrate to another framework, or change product workflows.

Future Improvements

These are good candidates for separate branches because they may affect behavior:

  • Export the Derby schema to SQL scripts and add explicit seed data.
  • Add automated smoke tests around login and database connectivity.
  • Replace raw SQL string concatenation with prepared statements.
  • Move credentials to environment-specific configuration.
  • Replace RXTX with a maintained serial library after protocol verification.
  • Add a Maven or Gradle build while keeping NetBeans/Ant compatibility.
  • Remove generated binaries from Git history after preserving required runtime dependencies.

Key Engineering Highlights

  • Java Swing desktop application
  • Apache Derby database integration
  • Serial communication with external hardware devices
  • Role-based access control
  • Real-time survey collection and reporting
  • JFreeChart data visualization
  • Persian (RTL) user interface
  • Legacy application preserved and documented for long-term maintainability

Repository Topics

Recommended GitHub topics:

java, swing, desktop-application, legacy-modernization, apache-derby, rxtx, serial-communication, jfreechart, restaurant-management, crm, netbeans, ant

About

Legacy Java Swing desktop CRM for restaurant operations featuring customer surveys, order management, serial hardware integration, role-based access control, and Apache Derby reporting.

Topics

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages