A Java-based zoo management system built with JavaFX and MySQL for managing zoo animals, staff, and operations.
ZooInsight is a desktop application designed to help zoo administrators and caretakers manage various aspects of zoo operations including:
- User Management: Create and manage staff accounts (Admins, Caretakers, Owners)
- Animal Management: Track and manage animal information including species, age, diet, and mood
- Database Integration: MySQL backend for persistent data storage
- Role-Based Access: Different user types with appropriate permissions
- Create new user accounts with role assignment (Admin, Caretaker, Owner)
- Store user details: name, email, contact information, date of birth
- Automatic username and password generation
- User authentication and login system
- Register new animals with detailed information
- Track animal attributes:
- Name, age, and gender
- Taxonomic classification (class, family, species)
- Favorite food preferences
- Mood tracking and updates
- View and edit animal records in interactive tables
- Delete animal records with confirmation
- MySQL database integration for reliable data storage
- File-based backup system (text files)
- Import/export functionality for user and animal data
- Language: Java
- UI Framework: JavaFX
- Database: MySQL
- Database Connectivity: JDBC
- UI Components: Swing (JOptionPane for dialogs)
- Java Development Kit (JDK): Version 8 or higher
- JavaFX: Ensure JavaFX library is properly configured
- MySQL Server: Version 5.7 or higher
- MySQL Connector/J: JDBC driver for MySQL
git clone https://github.com/JCheney20/ZooInsight.git
cd ZooInsight-- Create the database
CREATE DATABASE zooinsight;
-- Use the database
USE zooinsight;
-- Create users table
CREATE TABLE users (
accnum INT AUTO_INCREMENT PRIMARY KEY,
firstname VARCHAR(100),
surname VARCHAR(100),
email VARCHAR(255),
usertype VARCHAR(50),
gender VARCHAR(20),
cellnumber VARCHAR(20),
dob VARCHAR(20),
username VARCHAR(100),
password VARCHAR(100)
);
-- Create animals table
CREATE TABLE animals (
animalsid INT AUTO_INCREMENT PRIMARY KEY,
fname VARCHAR(100),
age VARCHAR(10),
gender VARCHAR(20),
a_class VARCHAR(100),
family VARCHAR(100),
species VARCHAR(100),
favFood VARCHAR(255),
mood VARCHAR(100)
);
-- Create MySQL user for the application
CREATE USER 'AAdmin'@'localhost' IDENTIFIED BY 'admin123';
GRANT ALL PRIVILEGES ON zooinsight.* TO 'AAdmin'@'localhost';
FLUSH PRIVILEGES;Ensure JavaFX libraries are added to your project build path:
- Download JavaFX SDK from openjfx.io
- Add JavaFX library modules to your project
- Configure VM arguments if needed:
--module-path /path/to/javafx-sdk/lib --add-modules javafx.controls,javafx.fxml
Edit src/utils_DBManager.java if your MySQL credentials differ:
static final String DB_URL = "jdbc:mysql://localhost:3306/zooinsight";
static final String USER = "AAdmin";
static final String PASS = "admin123";javac -d bin src/*.java
java -cp bin src.AppZooInsight/
├── src/
│ ├── App.java # Main application entry point
│ ├── Page_Login.java # Login page
│ ├── Page_Home_Admin.java # Admin dashboard
│ ├── obj_User.java # User data model
│ ├── obj_Animal.java # Animal data model
│ ├── utils_DBManager.java # Database operations
│ ├── utils_CreateNew.java # User/Animal creation utilities
│ ├── utils_newTabel.java # Table generation utilities
│ ├── utils_newLabel.java # Label creation utilities
│ ├── utils_background.java # Background styling utilities
│ ├── utils_ObjectGen.java # Interface for data models
│ └── Stylesheets.css # Application styles
├── resources/
│ └── background.png # Background image
├── javafx/ # JavaFX libraries
├── DB/ # Database scripts
└── DemoVideos/ # Application demos
- Launch the application
- Use default credentials or create a new admin account
- Access the admin dashboard
- Click Create to add a new user
- Fill in user details in the dialog prompts
- Select user role (Admin/Caretaker/Owner)
- Credentials are automatically generated
- Click Save to File to backup data
- Navigate to the animal management section
- Click Create to register a new animal
- Enter animal details (name, species, diet, etc.)
- View animals in the data table
- Edit mood status by clicking on the mood column
- Delete animals using the Delete button
- Use environment variables for sensitive data
- Implement proper password hashing (BCrypt, Argon2)
- Use prepared statements for all database queries (already implemented)
- Add input validation and sanitization
- Implement proper session management
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source and available for educational purposes.
JCheney20
- GitHub: @JCheney20
- JavaFX community for UI framework
- MySQL for database management
- Oracle for Java platform
Note: This application was created for educational purposes. Ensure proper security measures are implemented before deploying in a production environment.