37327742ae369ee9432dbff7859a684d696ec966
Changes: - MainLayoutController: Analytics access restricted to ADMIN only - STAFF users default to Sales view instead of Analytics - Logo click redirects STAFF to Sales, ADMIN to Analytics - Analytics button hidden for STAFF users - LoginController: Added CUSTOMER login rejection with clear message - CUSTOMER role users are now rejected at login with helpful error - Directs customers to use web/mobile applications instead - Configuration cleanup: Removed connectionpetstore.properties from project root - Config file remains in src/main/resources for proper packaging - ApiConfig already loads from classpath correctly These changes ensure proper role-based access control and clean configuration management.
Pet Shop Desktop (JavaFX)
Desktop pet shop management app built with JavaFX and MySQL.
Made by Group 2, Shiv, Nikitha, Alex, Harkamal.
Requirements
- IntelliJ IDEA (Community or Ultimate)
- Java 17+
- Maven (handled through IntelliJ)
- Docker and Docker Compose (for the local MySQL container)
Database setup (IntelliJ)
- Open the project in IntelliJ.
- Open View → Tool Windows → Services.
- Add a Docker connection if needed, then open the Docker section in Services.
- Start the Compose stack from
docker-compose.yml(Compose Up, or Start). - Confirm the
mysqlservice is running.
The container uses mysql:8.4, creates the Petstoredb database, and imports Petstoredata.sql.
App configuration
An example connection file is provided at connectionpetstore.properties.example. Copy it to connectionpetstore.properties and edit the values to match the local database setup.
Run the app (IntelliJ, Maven)
- Open View → Tool Windows → Maven.
- Click Reload All Maven Projects if the dependencies have not loaded yet.
- In the Maven tool window, expand Plugins → javafx.
- Double click javafx:run.
Optional, run a clean first:
- In the Maven tool window, expand Lifecycle and run clean.
Default accounts
On first run, the app creates a users table (if missing) and seeds two accounts:
- Admin:
admin/admin123 - Staff:
staff/staff123
Notes
connectionpetstore.propertiesis gitignored so credentials are not committed.- If the app cannot connect to MySQL, confirm the Compose stack is running and MySQL is available.
Description
Languages
Java
88.6%
JavaScript
11.2%
CSS
0.2%