feat: add admin payment dashboard - #49
Closed
Mathieu-bot wants to merge 17 commits into
Closed
Conversation
* feat: add CSV export endpoint and service methods * test: add CSV export integration and service tests * refactor: make applicationName optional in CSV export endpoint * refactor: replace System.currentTimeMillis() with static import * refactor: ZoneOffset.UTC as static import * refactor: improve CSV builder readability with String.format * refactor: use English instead of French for csv title * chore: add .env to .gitignore * test: replace inline CSV assertions with expected-export.csv comparison * test: replace inline CSV assertions with expected-export.csv comparison * test: remove unused PaymentRepository import --------- Co-authored-by: Mathieu-bot <mathieu-bot@users.noreply.github.com> * test: simplify CSV test to single data row * feat(security): require apiKey on GET /payments/export/csv, remove applicationName param * feat: add AdminAuthorizer, applicationName param for CSV export * fix: validate admin API key via env var instead of DB * style: inline format string in String.format * style: format code --------- Co-authored-by: Tafita Mathieu <199898191+Mathieu-bot@users.noreply.github.com> Co-authored-by: Mathieu-bot <mathieu-bot@users.noreply.github.com>
Mathieu-bot
force-pushed
the
feat/admin-ui
branch
from
July 30, 2026 06:27
934bd69 to
88b8575
Compare
Mathieu-bot
marked this pull request as ready for review
July 30, 2026 07:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an admin payment dashboard with authentication, filters, pagination, and CSV export.
SessionConfig. Spring Session JDBC needs its own tables but the project uses Flyway for schema management (it comes from the Poja generator). Setting spring.session.jdbc.initialize-schema would bypass Flyway and cause trouble. Instead, a @PostConstruct hook manually runs the session schema script with setContinueOnError(true) so it works cleanly whether the tables already exist or not. It also detects H2 vs PostgreSQL automatically.
SecurityConf. Form login backed by ADMIN_EMAIL and ADMIN_PASSWORD environment variables. Sessions are stored in the database through @EnableJdbcHttpSession. CSRF protection is on for admin forms and off for webhook endpoints.
PaymentViewController. The dashboard page at /payments. Paginated (15 per page, newest first), filterable by application, scope, and date range. Shows total collected, payment count, and pending count. The CSV export button passes the current filters along.
PaymentController fix. Empty or blank scope parameters are now normalized to null so they don't break the CSV export query.
Templates. Modular Thymeleaf fragments for the header (with a logout confirmation dialog), the filter form (with scope autocomplete), pagination controls, and stat cards.