Commit graph

257 commits

Author SHA1 Message Date
e94ad257b1
feat(EX-0000): switch LLM from OpenAI to DeepSeek
- Use DeepSeek API (api.deepseek.com) with openai-go SDK
- Replace OPENAI_MODEL env var with DEEPSEEK_MODEL
- Default model: deepseek-v4-pro
- API key read from DEEPSEEK_API_KEY env var
2026-05-09 16:57:40 +02:00
e8bfcf26f3
feat(pdf): improve invoice PDF layout and style
Some checks failed
CI / checks (push) Has been cancelled
Redesigned the invoice PDF with a more modern, modular layout. Updated
colors, spacing, and section organization for better readability and
visual appeal. Added a summary block, improved table formatting, and
refined header/footer presentation. Also updated dependencies in go.mod
and go.sum to support new features.
2026-03-27 14:48:41 +01:00
24f289b767
feat(pdf): redesign invoice PDF layout and structure
Refactored the invoice PDF generation to use a modular, visually
improved
layout. Extracted header, details, items, payments, summary, and notes
sections into dedicated functions for clarity and maintainability.
Introduced color constants and improved table formatting for better
readability. Updated labels and formatting to enhance the overall
appearance and user experience of generated invoices.
2026-03-27 14:35:52 +01:00
0f327c814a
fix: normalize minio endpoints
Some checks failed
CI / checks (push) Has been cancelled
2026-03-21 10:19:33 +01:00
9b2510460a
feat: store invoice PDFs in minio
Some checks are pending
CI / checks (push) Waiting to run
2026-03-20 23:58:57 +01:00
bb71291278
fix(booking): restore stripe payment link button handler
Some checks failed
CI / checks (push) Has been cancelled
2026-02-18 19:00:22 +01:00
e138d493ab
fix(api): return bookingURL only from sync endpoint 2026-02-18 18:39:43 +01:00
df1cd66cf1
chore: wire APP_OPENAI_MODEL and upgrade Go/deps 2026-02-18 18:32:01 +01:00
584d81f7bd
feat(i18n): add language toggle and localize views
Some checks failed
CI / checks (push) Has been cancelled
2026-01-09 16:09:20 -04:00
fe6beeded5
feat(api): include booking URL in sync response
Some checks failed
CI / checks (push) Has been cancelled
Enhance the booking sync API to return the full booking URL in the
response.
The URL is constructed based on the request's scheme and host,
supporting
both HTTP and HTTPS, and uses the X-Forwarded-Proto header if present.
This provides clients with a direct link to the created booking
resource.
2026-01-01 17:40:57 -04:00
be5b707fa0
feat(booking): improve item sync and add tests (#51)
Some checks failed
CI / checks (push) Has been cancelled
Enhance the booking sync logic to trim and match item names more
robustly,
falling back to creating a generic item when no host item is found. Add
unit tests for item creation and fallback behavior in booking sync.
2025-12-01 15:06:22 +01:00
23f3ceec21
Feat/stripe integration (#50)
Some checks are pending
CI / checks (push) Waiting to run
* feat(stripe): add Stripe payment sync and webhook support

Introduce Stripe integration for automatic payment ingestion and refund
tracking. Adds new fields to the payment model for Stripe IDs and
status,
Stripe client driver, sync service, cron job, manual API endpoint, and
public webhook handler for real-time updates. Includes tests and
documentation. Manual cash entry remains supported.

* chore(stripe): upgrade to stripe-go v83

Upgrade Stripe SDK from v79 to v83 across the codebase. Update all
imports to use github.com/stripe/stripe-go/v83 and refactor client usage
to match the new API, including changes to PaymentIntents listing.
Update documentation and plans to reference the new version. Remove
references to the old version from go.mod and go.sum.

* refactor(payment): extract payment logic to new service

Moves all payment-related logic (manual payments, Stripe sync, webhook
handling) from the booking service into a dedicated payment service
(`internal/service/payment`). Updates server, cron, and handler wiring
to
inject and use the new payment service. Adjusts tests, routes, and
documentation to reflect the new separation of concerns.

This improves cohesion, clarifies responsibilities, and prepares for
future payment features. No database schema changes are introduced.

* chore(ci): add Go and templ setup to CI workflow

This update enhances the CI workflow by adding steps to set up Go using
the version specified in go.mod, add the Go bin directory to the PATH,
and install the templ code generation tool. These additions ensure that
Go-based tooling is available for subsequent CI steps.
2025-11-21 15:47:01 +01:00
afc61e02f1
refactor: improve booking error handling and responses
Some checks failed
CI / checks (push) Has been cancelled
Refactor booking retrieval to return errors instead of nil values,
enabling more robust error handling throughout the booking, payment,
and PDF endpoints. Add custom HTTP error page rendering for not found
and internal server errors. Update interfaces and tests to match new
method signatures. This improves user feedback and code maintainability.
2025-11-17 19:26:45 +01:00
a0b7672e9e
feat(payments): add Stripe dashboard links for card payments
Some checks are pending
CI / checks (push) Waiting to run
- Add `APP_STRIPE_ACCOUNT_ID` to config and README.
- Pass Stripe account ID to payment view models.
- Show "View in Stripe" badge linking to the payment in Stripe dashboard
  for card payments when account ID and payment ID are present.
- Update Makefile to run format/lint locally instead of in container.
- Update templates and generated code to support new dashboard link.
2025-11-16 18:04:35 +01:00
4dc4d2f2b5
fix(booking): create items during sync 2025-11-16 17:40:00 +01:00
508de01116
feat(stripe): add booking_id metadata to payment links
Some checks failed
CI / checks (push) Has been cancelled
Refactored payment link creation to ensure booking_id is set in both the
PaymentLink and PaymentIntent metadata. Extracted parameter building
logic
into a helper for improved testability. Added a unit test to verify
metadata propagation.
2025-11-10 20:23:33 +01:00
4bd47dc6e9
feat(deps): migrate from Echo to Chi, update Stripe/Sentry (#49)
Some checks failed
CI / checks (push) Has been cancelled
2025-11-02 21:45:37 +01:00
91a9a74750
feat(stripe): add payment link creation for bookings
Some checks are pending
CI / checks (push) Waiting to run
Introduce backend and frontend support for generating Stripe payment
links
for outstanding booking balances. Adds a new POST endpoint to create
payment
links, updates booking view to include a Stripe button, and integrates
error handling and feedback for payment link creation. Refactors view
models and templates to support the new feature.
2025-11-01 17:22:13 +01:00
5cfe9b4169
refactor(stripe): remove support for Stripe Connect account
Eliminated all references to the Stripe Connect account configuration
and
option handling. This includes removing the related environment
variable,
config struct field, client option, and usage in Stripe client setup.
Stripe integration now only uses the main secret key and webhook secret.
2025-10-30 17:03:55 +01:00
aa9f46a222
feat/stripe integration (#48) 2025-10-19 15:48:59 +02:00
5d42a5aefe
refactor: simplify main entry and improve logging
Refactors main.go to streamline context and logger initialization.
Moves signal handling directly into main, sets up a base logger for
early errors, and updates error handling to use structured logging.
No functional changes to application logic.
2025-10-03 20:09:27 +02:00
ac94faedb0
refactor: unify ID and API key naming conventions
This commit standardizes the naming of identifier and API key fields
across the codebase to use consistent camel case (e.g., `ID`, `APIKey`,
`DatabaseURL`). This includes updates to struct fields, method names,
function parameters, and environment variable references. The changes
improve code clarity and maintainability by reducing ambiguity and
aligning with Go naming conventions. No functional behavior is changed.
2025-10-03 19:47:41 +02:00
40d2338c0f
feat(logging): add slog-based structured logging
Introduce slog-based structured logging throughout the booking service
and
server handlers. Add configurable log level via LOG_LEVEL environment
variable. Replace legacy log usage with slog and propagate logger to
booking service for improved observability.
2025-09-12 12:17:22 -04:00
2aadb421ef
chore(go): bump Go to 1.25 (Dockerfiles + go.mod); respect .gitignore 2025-09-12 11:24:06 -04:00
9c5123968a
payment form 2025-06-27 13:28:46 +02:00
968e5d2aef
line items 2025-06-27 13:15:53 +02:00
8b29657c36
booking form 2025-06-23 20:12:50 +02:00
eaa40a62f3
booking details page header 2025-06-23 19:29:45 +02:00
c0f617944c
footer 2025-06-23 19:12:51 +02:00
5a566ac13d
body spacing 2025-06-23 19:07:57 +02:00
e72ad67c98
update deps 2025-06-23 19:02:48 +02:00
f836822ff0
upgrade dependencies and remove dead code 2025-05-04 23:48:12 +02:00
9e2cef07e1
feat(parser): refactor BookingAgentParser to use OpenAI client and add parsing tests
- Update BookingAgentParser to utilize OpenAI's client for parsing booking data.
- Remove base URL dependency and streamline the initialization process.
- Introduce ResponseData struct to define expected JSON structure from the LLM.
- Add unit tests for BookingAgentParser to validate parsing logic and expected output.
2025-05-04 23:18:42 +02:00
e298efabb4
fix(config): correct env variable prefix in documentation
Update the documentation for the Config struct to clarify that environment variables must be prefixed, e.g., with "APP_", to be recognized. This change improves clarity for users configuring the application.
2025-05-04 22:06:46 +02:00
db1fa2cbd9
feat: update Go version and dependencies
Updated Go version to 1.24 and upgraded dependencies to their latest
compatible versions. This includes updates to Dockerfiles, go.mod,
and go.sum. Regenerated templated files with templ v0.3.857.
2025-04-23 17:31:46 +02:00
9e9cd8acc4
update dependencies 2025-03-23 23:06:19 +01:00
3f57232a9d
move cron code to pkg 2025-03-23 23:00:02 +01:00
75eb3b8502
use COnfig struct to parse env variables 2025-03-23 22:57:22 +01:00
26207baee8
feat: add luggage storage item 2025-03-23 20:56:33 +01:00
17eb65ebdc
update booking list to card layout (#46)
### TL;DR
Transformed the bookings list from a table layout to a responsive card-based grid design.

### What changed?
- Replaced table structure with a responsive grid of cards
- Each booking is now displayed as a card with improved visual hierarchy
- Added hover effects and shadows for better interactivity
- Reorganized booking information with dedicated sections for dates and pricing
- Updated the search functionality to target the new card container
- Added euro symbol to price display
- Improved the presentation of canceled bookings

### How to test?
1. Navigate to the bookings list page
2. Verify cards display correctly on different screen sizes
3. Check that hover effects work on cards
4. Confirm search functionality still filters bookings
5. Verify canceled bookings show with strikethrough
6. Test that "View Details" links work correctly
7. Ensure all booking information is visible and properly formatted

### Why make this change?
The card-based layout provides a more modern and user-friendly interface that works better across different screen sizes. It improves the visual hierarchy of booking information and makes it easier for users to scan and interact with individual bookings. The new design also better accommodates varying content lengths and provides a more engaging visual experience.
2025-03-02 13:44:43 +01:00
9a6b6ef0c3
fix cronjob (#45)
fixes #32
2025-02-23 22:38:32 +01:00
6bdbd36869
fix card calculation sql (#44) 2025-02-22 14:19:48 +01:00
44cf04bac7
update report template (#43) 2025-02-22 12:28:56 +01:00
b0198f7f9a
translate platform and payment method in invoices (#42) 2025-02-22 09:24:34 +01:00
7d909f34e3
remove payment status field on item (#41) 2025-02-22 02:34:13 +01:00
bddc4bb0fc
embed html template (#40)
### TL;DR

Implemented embedded file system for static assets using Go's `embed` package.

### What changed?

- Created a new `assets.go` file to define an embedded filesystem for static assets
- Moved all static assets (HTML, icons, images, JS) under a nested `assets` directory
- Updated PDF generation to use the embedded filesystem when parsing HTML templates
- Modified main application to use the embedded filesystem for serving static files
- Added logging statements for invoice generation

### How to test?

1. Run the application and verify static assets are served correctly
2. Generate a PDF invoice and confirm it renders properly
3. Check that all HTML error pages (400, 401, 403, 404, 500) are accessible
4. Verify images and icons load correctly throughout the application

### Why make this change?

Using an embedded filesystem ensures all static assets are compiled into the binary, making deployment simpler and more reliable. This eliminates the need to manage separate asset files and ensures the application has all required resources available at runtime.
2025-02-04 18:49:20 +01:00
cf1620592a
create invoice (#39)
### TL;DR

Enhanced invoice generation with improved formatting and Euro symbol display

### What changed?

- Added Euro symbol (€) to monetary values in the invoice template
- Implemented new invoice data structure with dedicated types for lines and payments
- Created ToInvoice method to properly format booking data for invoice generation
- Added HTML template parsing and rendering functionality
- Improved date formatting for consistency
- Added new API endpoint for booking creation

### How to test?

1. Create a new booking through the API
2. Navigate to the PDF generation endpoint
3. Verify that monetary values display with Euro symbol
4. Check that dates are properly formatted
5. Confirm that payment history and totals are correctly calculated
6. Validate that the generated HTML maintains proper formatting

### Why make this change?

To improve invoice readability and consistency by standardizing monetary value display and providing better data structure for invoice generation. This change also makes the system more maintainable by separating concerns between data transformation and presentation.
2025-02-04 11:34:14 +01:00
bfde4eb601
fix bugs (#37)
### TL;DR
Reorganized booking service code and removed unused BookingRequest model

### What changed?
- Moved Payment model from payment.go to models.go
- Relocated payment-related service methods from service.go to payment.go
- Removed unused BookingRequest struct
- Updated dependencies to their latest versions

### How to test?
1. Run database migrations to verify removal of BookingRequest model
2. Test all payment-related endpoints to ensure functionality remains intact:
   - GET /payments/{id}
   - POST /payments
   - PUT /payments/{id}

### Why make this change?
- Improves code organization by grouping payment-related code together
- Removes unused BookingRequest model to reduce technical debt
- Keeps dependencies up to date for security and performance improvements
2025-01-25 00:41:32 +01:00
b8265cf80f
fix: only update the payments on payment creation 2025-01-25 00:21:30 +01:00
541c813be0
Raw 34 enable payments (#35)
Closes #34
2025-01-24 17:30:35 +01:00