https://github.com/deerborg/invoice-app-api
https://github.com/deerborg/invoice-app-api
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/deerborg/invoice-app-api
- Owner: deerborg
- License: mit
- Created: 2025-08-09T11:19:51.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-09T12:26:49.000Z (11 months ago)
- Last Synced: 2025-08-09T14:29:23.242Z (11 months ago)
- Language: Java
- Size: 17.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Invoice API
> ⚠️ This project is currently under active development. APIs and features are subject to change.
---
### Technologies and Libraries Used
- **Spring Boot 3.5.4** — Main application framework.
- **Java 17** — Language level.
- **Spring Starters:**
- `spring-boot-starter-web` — REST API development.
- `spring-boot-starter-data-jpa` — Database interaction using JPA.
- `spring-boot-starter-security` — Authentication and authorization.
- `spring-boot-starter-mail` — Sending emails.
- `spring-boot-starter-amqp` — Messaging with RabbitMQ.
- **Database:** PostgreSQL (`org.postgresql:postgresql`) — runtime driver.
- **JWT:** `jjwt-api`, `jjwt-impl`, `jjwt-jackson` — Token authentication.
- **API Documentation:** `springdoc-openapi-starter-webmvc-ui` — OpenAPI/Swagger.
---
## Additional Integrations
- **RabbitMQ:** Used for asynchronous message handling and audit logging.
- **Email Service:** Sends notification emails upon important events like invoice creation.
*Note: Integration with RabbitMQ and Email service is currently under development and will be added soon.*
---
## pom.xml Summary
```xml
17
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-starter-data-jpa
org.springframework.boot
spring-boot-starter-security
org.springframework.boot
spring-boot-starter-mail
org.springframework.boot
spring-boot-starter-amqp
org.postgresql
postgresql
runtime
io.jsonwebtoken
jjwt-api
0.12.6
io.jsonwebtoken
jjwt-impl
0.12.6
runtime
io.jsonwebtoken
jjwt-jackson
0.12.6
runtime
org.springdoc
springdoc-openapi-starter-webmvc-ui
2.5.0
org.springframework.boot
spring-boot-starter-test
test
org.springframework.amqp
spring-rabbit-test
test
org.springframework.security
spring-security-test
test
```
# API Documentation
---
## User Controller
### POST /api/users/private/register
**Request Body:**
```json
{
"username": "string",
"email": "string",
"password": "string"
}
```
**Response:**
```json
{
"status": true,
"message": "string",
"data": {
"userId": "string",
"createAt": "2025-08-09T18:11:16.935Z"
}
}
```
---
## Invoice Controller
### POST /api/invoices/private
**Request Body:**
```json
{
"customerName": "string",
"customerEmail": "string",
"totalAmount": 0,
"taxAmount": 0,
"subTotal": 0,
"details": "string",
"userId": "string"
}
```
**Response:**
```json
{
"status": true,
"message": "string",
"data": {
"invoiceId": 0,
"customerName": "string",
"customerEmail": "string",
"totalAmount": 0,
"taxAmount": 0,
"subTotal": 0,
"details": "string",
"createdAt": "2025-08-09T18:11:16.936Z"
}
}
```
---
### GET /api/invoices/private/user/{userId}
**Path Parameter:**
| Name | Type | Description |
|--------|--------|-------------|
| userId | string | userId |
**Response:**
```json
{
"status": true,
"message": "string",
"data": [
{
"invoiceId": 0,
"customerName": "string",
"customerEmail": "string",
"totalAmount": 0,
"taxAmount": 0,
"subTotal": 0,
"details": "string",
"createdAt": "2025-08-09T18:11:16.938Z"
}
]
}
```
---
## Auth Controller
### POST /api/auth/public/authenticate
**Request Body:**
```json
{
"username": "string",
"password": "string"
}
```
**Response:**
```json
{
"token": "string"
}
```
---
## Schemas
### CreateUserRequest
| Field | Type |
|----------|--------|
| username | string |
| email | string |
| password | string |
---
### ApiResponseUserResponse
| Field | Type |
|---------|--------------|
| status | boolean |
| message | string |
| data | UserResponse |
---
### UserResponse
| Field | Type |
|----------|--------------------|
| userId | string |
| createAt | string (date-time) |
---
### CreateInvoiceRequest
| Field | Type |
|---------------|-----------------|
| customerName | string |
| customerEmail | string |
| totalAmount | number (double) |
| taxAmount | number (double) |
| subTotal | number (double) |
| details | string |
| userId | string |
---
### ApiResponseInvoiceDetailsResponse
| Field | Type |
|---------|------------------------|
| status | boolean |
| message | string |
| data | InvoiceDetailsResponse |
---
### InvoiceDetailsResponse
| Field | Type |
|---------------|--------------------|
| invoiceId | integer (int64) |
| customerName | string |
| customerEmail | string |
| totalAmount | number (double) |
| taxAmount | number (double) |
| subTotal | number (double) |
| details | string |
| createdAt | string (date-time) |
---
### AuthRequest
| Field | Type |
|----------|--------|
| username | string |
| password | string |
---
### AuthResponse
| Field | Type |
|-------|--------|
| token | string |
---
### ApiResponseListInvoiceDetailsResponse
| Field | Type |
|---------|---------------------------------|
| status | boolean |
| message | string |
| data | Array of InvoiceDetailsResponse |