A Spring Boot-based RESTful web service that processes and validates invoice files. Invoices are uploaded as PDF files, stored securely in AWS S3, and metadata is stored in a PostgreSQL database on AWS RDS.
- Upload invoices via REST endpoint
- Store PDF files in AWS S3
- Persist invoice metadata in AWS RDS (PostgreSQL)
- Validate file type (PDF only)
- Easy AWS integration with Terraform
- Structured service, controller, and repository layers
- Java 17
- Spring Boot
- Spring Data JPA
- PostgreSQL (AWS RDS)
- AWS S3
- AWS Lambda (for PDF validation, optional)
- Terraform (for infrastructure provisioning)
- Maven
- Java 17+
- Maven
- AWS CLI (configured)
- Terraform (optional, for provisioning resources)
Create application.yml in src/main/resources/application.yml like this:
spring:
datasource:
url: your-db-url
username: your-db-username
password: your-db-password
jpa:
hibernate:
ddl-auto: update
show-sql: true
aws:
region: eu-central-1
s3:
bucket: metinkuzey-invoice-uploadsmvn clean install
mvn spring-boot:run| Method | Endpoint | Description |
|---|---|---|
| POST | /api/invoices/upload |
Upload a PDF invoice |
| GET | /api/invoices |
Get all invoice metadata |
Provisioned using Terraform:
- ✅ S3 Bucket for file storage
- ✅ PostgreSQL RDS for metadata
- ✅ IAM Role and Lambda function (optional)
invoice-validator-api/
├── java/
│ ├── api/
│ ├── controller/
│ ├── exception/
│ ├── model/
│ ├── repository/
│ └── service/
└── resources/
└── application.yml
This project is licensed under the MIT License.