Appointment Service API
- support@Olanna.tech
- Olanna
Contact
License
Pull requests are welcome! For major changes, please open an issue first.
Contributing
calendar-sync-enabled: true
default-duration-minutes: 60
timezone: UTC
reminder-advance-hours: 24
appointment:
```yaml
Set the following environment variables in `application.yml`:
## Configuration
---
### Run
- Run Flyway migrations (auto on startup).
- Configure your PostgreSQL credentials in `src/main/resources/application.yml`.
### Database
### Setup
- Gradle
- PostgreSQL
- Java 17+
### Prerequisites
## Getting Started
---
}
TIMESTAMP updated
TIMESTAMP created
BOOLEAN active
VARCHAR resource_type
VARCHAR resource_name
UUID tenant_id
UUID id PK
resources {
}
TIMESTAMP created
VARCHAR status
TIMESTAMP slot_end
TIMESTAMP slot_start
UUID resource_id
UUID tenant_id
UUID id PK
availability_slots {
}
TIMESTAMP updated
TIMESTAMP created
TEXT description
VARCHAR status
TIMESTAMP end_time
TIMESTAMP start_time
UUID client_id
UUID resource_id
UUID tenant_id
UUID id PK
appointments {
erDiagram ```mermaid
Database Schema
API-->>U: 201 Created + appointment details
S-->>API: AppointmentResponse
N-->>S: queued
S->>N: queue reminder notification
R-->>S: appointment created
S->>R: save appointment
A-->>S: slot available
S->>A: check availability
API->>S: validate appointment
U->>API: POST /appointments (date, resource)
participant R as AppointmentRepository
participant N as NotificationService
participant A as AvailabilityService
participant S as AppointmentService
participant API as AppointmentController
participant U as User
sequenceDiagrammermaid
Sequence: Create Appointment
| GET | /api/v1/appointments/{id}/reminder | Trigger reminder | |
| POST | /api/v1/availability | Create availability window | Resource and time parameters |
| GET | /api/v1/availability/slots | Get available time slots | Resource and date parameters |
| DELETE | /api/v1/appointments/{id} | Cancel appointment | Status transitions |
| PUT | /api/v1/appointments/{id} | Update appointment | Before start time only |
| GET | /api/v1/appointments | List appointments (paginated) | tenantId param, date range filter |
| GET | /api/v1/appointments/{id} | Get appointment details | |
| POST | /api/v1/appointments | Create appointment | tenantId header, appointment data |
|--------|---------------------------------------------|------------------------------------------|---------------------------------------|
| Method | Endpoint | Description | Notes/Parameters |
API Endpoints
E --> I[Message Queue]
G --> H
F --> H[(PostgreSQL)]
D --> G[AvailabilityRepository]
D --> F[AppointmentRepository]
C --> E[NotificationService]
C --> D[AvailabilityService]
B --> C[AppointmentService]
A[Client] -->|REST API| B(AppointmentController)
flowchart TDmermaid
Architecture Overview
| Multi-Tenant Support | Isolate appointments per tenant | π’ | | Conflict Detection | Prevent double-booking and scheduling conflicts | β οΈ | | Resource Management | Track resources and staff availability | π₯ | | Calendar Integration | Sync with Google Calendar, Outlook, and iCal formats | π | | Automated Reminders | Send reminders via email/SMS before appointments | π | | Availability Management| Define and manage time slots and availability windows | β° | | Appointment Scheduling | Create, update, and cancel appointments | π | |------------------------|------------------------------------------------------------------|--------| | Feature | Description | Icon |
Features
A scheduling and appointment management REST API built with Java, Spring Boot, and PostgreSQL. Manages appointments, availability slots, reminders, cancellations, and calendar integrations.
π€