Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Critter Chronologer

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.


Features

  • Create and manage customers, pets, employees, and schedules
  • Schedule services between employees and pets
  • Manage employee availability
  • Integration with MySQL for persistent data storage

Concepts Demonstrated

  • 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

Dependencies

  • 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.


Setup Instructions

Database Installation

  1. Install MySQL 8

    • Server and Connector/J are required.
    • Optionally install Documentation and Workbench.
  2. Create a MySQL User

    • Grant the user all permissions on localhost.
  3. (Optional) Docker Setup

    • You may use a Docker container for MySQL instead.
    • Follow these instructions for Docker setup.

Installation Steps

  1. Clone or download this repository.

  2. Open IntelliJ IDEA:

    • File → Open → Navigate to the critter directory inside the repository.
  3. Navigate to: src/main/java/com.udacity.jdnd.course3.critter

  4. Open CritterApplication.java and:

  • Run → Debug CritterApplication
  1. Open your browser:

Testing

Once the project is running:

  1. In IntelliJ, go to: src/test/java/com.udacity.jdnd.course3.critter

  2. Open CritterFunctionalTest.java and:

  • Run → Run CritterFunctionalTest
  1. You will see 9 tests, which initially fail with java.lang.UnsupportedOperationException.

As you complete the application logic, these tests will begin to pass.


Tests Will Pass When:

  • testCreateCustomer: Customer creation via UserController.saveCustomer
  • testCreateEmployee: Employee creation via UserController.saveEmployee
  • testAddPetsToCustomer: Pet creation and association with owner
  • testFindPetsByOwner: Return all pets for an owner
  • testFindOwnerByPet: Return the owner of a specific pet
  • testChangeEmployeeAvailability: Update and fetch employee availability
  • testFindEmployeesByServiceAndTime: Find employees based on skills and availability
  • testSchedulePetsForServiceWithEmployee: Schedule creation with pets, employees, and services
  • testFindScheduleByEntities: Fetch schedules by employee, pet, or customer

Postman Collection

A Postman collection is included for API testing:

  1. Open Postman
  2. Click Import
  3. Import the file: src/main/resources/Udacity.postman_collection.json
  4. Expand the Udacity folder
  • Requests include necessary data under the Body tab
  • You may need to adjust IDs based on your key generation strategy

Built With


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages