Critter Chronologer is a Software as a Service (SaaS) application that provides a scheduling interface for small businesses that take care of animals. This Spring Boot project allows users to create pets, owners, and employees, and then schedule events for employees to provide services for pets.
- Create and manage customers, pets, employees, and schedules
- Schedule services between employees and pets
- Manage employee availability
- Integration with MySQL for persistent data storage
- Structuring data in a multi-tier architecture
- Using the Java Persistence API (JPA)
- Connecting to multiple data sources
- Persistence using SQL and Data Access Objects (DAO)
- Solving persistence performance issues
- IntelliJ IDEA (Community or Ultimate)
- Java SE Development Kit 8+
- Maven
- MySQL Server 8+ (or another standalone SQL instance)
- Postman
⚠️ Do not use the H2 in-memory database as your primary data source.
-
Install MySQL 8
- Server and Connector/J are required.
- Optionally install Documentation and Workbench.
-
Create a MySQL User
- Grant the user all permissions on
localhost.
- Grant the user all permissions on
-
(Optional) Docker Setup
- You may use a Docker container for MySQL instead.
- Follow these instructions for Docker setup.
-
Clone or download this repository.
-
Open IntelliJ IDEA:
- File → Open → Navigate to the
critterdirectory inside the repository.
- File → Open → Navigate to the
-
Navigate to: src/main/java/com.udacity.jdnd.course3.critter
-
Open
CritterApplication.javaand:
- Run → Debug CritterApplication
- Open your browser:
- Visit: http://localhost:8082/test
- You should see:
"Critter Starter installed successfully"
Once the project is running:
-
In IntelliJ, go to: src/test/java/com.udacity.jdnd.course3.critter
-
Open
CritterFunctionalTest.javaand:
- Run → Run CritterFunctionalTest
- You will see 9 tests, which initially fail with
java.lang.UnsupportedOperationException.
As you complete the application logic, these tests will begin to pass.
testCreateCustomer: Customer creation viaUserController.saveCustomertestCreateEmployee: Employee creation viaUserController.saveEmployeetestAddPetsToCustomer: Pet creation and association with ownertestFindPetsByOwner: Return all pets for an ownertestFindOwnerByPet: Return the owner of a specific pettestChangeEmployeeAvailability: Update and fetch employee availabilitytestFindEmployeesByServiceAndTime: Find employees based on skills and availabilitytestSchedulePetsForServiceWithEmployee: Schedule creation with pets, employees, and servicestestFindScheduleByEntities: Fetch schedules by employee, pet, or customer
A Postman collection is included for API testing:
- Open Postman
- Click Import
- Import the file: src/main/resources/Udacity.postman_collection.json
- Expand the Udacity folder
- Requests include necessary data under the Body tab
- You may need to adjust IDs based on your key generation strategy
- Spring Boot - Dependency injection, web framework, transaction management
- Google Guava - Collections utilities and core libraries
- H2 Database - In-memory DB for running unit tests
- MySQL Connector/J - JDBC driver for MySQL