2026-04-19 18:56:58 -06:00
2026-04-14 22:52:01 -06:00
2026-04-19 18:44:08 -06:00
2026-04-19 18:26:16 -06:00
2026-04-19 17:33:48 -06:00
2026-04-18 20:36:46 -06:00
2026-04-19 18:56:58 -06:00

PetShop

A pet store management application with a Spring Boot API serving three clients: a Next.js web app, a JavaFX desktop app, and an Android app.

Handles product sales, pet adoption, appointment booking, real-time chat, AI assistance, payments (Stripe), email notifications (Resend), and file storage (Azure Blob).

Tech Stack

Layer Technology
API Java 25, Spring Boot 4, Spring Security (JWT), Hibernate
Database MySQL 8.0, Flyway migrations
Web Next.js 16, React 19, Tailwind CSS 4
Desktop JavaFX, Maven
Android Kotlin, Hilt, Retrofit, CameraX
Infra Docker, Azure Container Apps

Project Structure

main/
  backend/      Spring Boot REST API
  web/          Next.js frontend
  desktop/      JavaFX desktop client
  android/      Android mobile app

Prerequisites

  • Java 25
  • Node.js 18+
  • Docker
  • Maven
  • Android Studio (for mobile)

Getting Started

1. Start the database

cd backend
docker compose -f docker-compose.dev.yml up -d

2. Configure the backend

cd backend
cp .env.example .env

Fill in .env with your keys:

JWT_SECRET=<openssl rand -base64 32>
STRIPE_SECRET_KEY=sk_test_...
OPENROUTER_API_KEY=sk-or-v1-...
RESEND_API_KEY=re_...
RESEND_FROM=PetShop <no-reply@yourdomain.com>

3. Run the backend

cd backend
mvn spring-boot:run

The API starts at http://localhost:8080. Flyway runs migrations and seeds data automatically on first boot.

4. Run the web frontend

cd web
cp .env.example .env.local
npm install
npm run dev

The web app starts at http://localhost:3000.

5. Run the desktop client (optional)

cd desktop
cp connectionpetstore.properties.example connectionpetstore.properties
mvn javafx:run

6. Run the Android app (optional)

Open android/ in Android Studio and run on an emulator or device.

API

A Postman collection is available at backend/postman/. Key endpoint groups:

  • /api/auth -- registration, login, password reset
  • /api/products -- catalog and inventory
  • /api/pets -- listings and adoption
  • /api/appointments -- booking
  • /api/cart, /api/sales, /api/refunds -- transactions
  • /api/chat -- messaging and AI assistant
  • /ws -- WebSocket (STOMP) for real-time updates

Docker (full stack)

cd backend
docker compose up --build -d

Starts the API and MySQL together. The web frontend has its own Dockerfile for independent deployment.

Description
No description provided
Readme 14 MiB
Languages
Java 88.6%
JavaScript 11.2%
CSS 0.2%