Commit graph

139 commits

Author SHA1 Message Date
e138d493ab
fix(api): return bookingURL only from sync endpoint 2026-02-18 18:39:43 +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
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
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
aa9f46a222
feat/stripe integration (#48) 2025-10-19 15:48:59 +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
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
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
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
ffa7f140d1
use daisyUI (#25)
* use tailwind and daisyui

* split the layout in multiple components

* remove unused code

* footer compoonent

* login form

log

* booking table

fd

* cancel style

* header

* booking form

* new booking

* line items

* line item

* report

* uniform headings
2024-11-16 19:24:26 +01:00
6376fbd234
RE19 taxes only for booking (#24)
* create taxes only ofr booking platform

* also for sync

sync
2024-11-14 23:29:20 +01:00
abfbe1ff1b
refactor authentication service 2024-09-13 17:32:18 +02:00
34ce10ff86
move booking to service layer 2024-09-12 22:18:12 +02:00
b073844772
move auth to service layer 2024-09-12 22:11:01 +02:00
876d54d7bb
move pdf to driver layer 2024-09-11 11:04:34 +02:00
78ca637807
call calendar driver from the booking service 2024-09-11 09:38:22 +02:00
4c209da0f6
move calendar to driver layer 2024-09-11 09:09:23 +02:00
49dde76af6
hx boost helper 2024-09-09 22:34:29 +02:00
26c8996f0f
rename private handler 2024-09-09 22:01:43 +02:00
6fbac3ec39
fix linter 2024-09-09 21:15:28 +02:00
701a32671a
fix search bug introduce isHxRequest helper 2024-09-09 17:42:57 +02:00
542dbf0f97
split the service layer 2024-09-08 23:12:13 +02:00
aa5dd17d07
move config and constant packages to internal 2024-09-08 21:34:36 +02:00
d4e6b35a96
Create taxes for taxable items automatically (#16)
* refactor return error when building booking service

* fix the description

* set taxable item by amount

* auto create tax items if the item is taxable

* fix linter

* remove legacy tax entry

* display multiple items

* use the price from the form

* improve item sorting

* lintfix
2024-08-26 21:44:31 +02:00
8417ac8ddc
fix linter error 2024-08-23 10:11:39 +02:00
abf37d8413
add search by custumer name 2024-08-23 09:55:19 +02:00
f4250fb275
cleanup 2024-08-23 08:21:22 +02:00
c79232a019
fix linter warning 2024-08-21 22:01:37 +02:00
75832d251d
use colorful logger 2024-08-21 16:56:11 +02:00
47ee4f2168
upgrade to Go 1.23 2024-08-21 07:41:54 +02:00
8a6531f50e
add static assets caching 2024-08-19 15:00:38 +02:00
fefbbc2ae9
add calendars as we use them 2024-08-17 00:59:45 +02:00
3983de237f
sync calendar on item creation 2024-08-16 19:58:49 +02:00
6a15d1b32a
refactor: server option to own filed 2024-08-15 23:48:35 +02:00
ac10e65097
Refactor service (#14)
* add comments to main file

* create health check handler

health check

* use naming convention for booking handler

* use naming convention for hamndlers

naming convention

* clean up
2024-08-07 09:12:50 +02:00
4409facd34
create calendar service at startup 2024-08-05 20:19:25 +02:00
22175a9b39
fix linter errors 2024-07-14 23:43:14 +02:00
967df34451
add external field to form 2024-07-14 23:35:39 +02:00
1f55bf3556
make external id nullable 2024-07-14 23:05:14 +02:00
ee3674e12f
better date formatting 2024-06-29 09:28:51 +02:00
ba950f3b03
use constants 2024-06-20 18:34:57 +02:00
0dc9bee3f7
add api_key to config 2024-06-16 16:20:55 +02:00