Add 'desktop/' from commit 'bc9a54b29a8a8c8272609082438f36b92de7f4d1'
git-subtree-dir: desktop
git-subtree-mainline: 737028e06d5207fc69425cf4431b7d047cf3110f
git-subtree-split: bc9a54b29a
This commit is contained in:
48
desktop/README.md
Normal file
48
desktop/README.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# 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)
|
||||
|
||||
1. Open the project in IntelliJ.
|
||||
2. Open **View → Tool Windows → Services**.
|
||||
3. Add a Docker connection if needed, then open the **Docker** section in Services.
|
||||
4. Start the Compose stack from `docker-compose.yml` (Compose Up, or Start).
|
||||
5. Confirm the `mysql` service 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)
|
||||
|
||||
1. Open **View → Tool Windows → Maven**.
|
||||
2. Click **Reload All Maven Projects** if the dependencies have not loaded yet.
|
||||
3. In the Maven tool window, expand **Plugins → javafx**.
|
||||
4. 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.properties` is gitignored so credentials are not committed.
|
||||
- If the app cannot connect to MySQL, confirm the Compose stack is running and MySQL is available.
|
||||
Reference in New Issue
Block a user