Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
settings.json
AGENTS.md
debug.log
web-client/.env.development
services/spring-letter/.env
12 changes: 12 additions & 0 deletions web-client/.env.development.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copy this file to `.env.development` for local dev. Vite loads `.env.development`
# automatically for `pnpm dev`. The real `.env.development` is gitignored so each
# developer can choose mocks vs. live backend without committing the choice.

# Serve fixtures everywhere instead of calling the backend.
# Set to false (or delete) to run against the real services.
VITE_USE_MOCKS=true

# Demo as a specific persona so member-scoped pages (dashboard feedback, payments,
# development report) resolve against that fixture identity.
# Options: member | coach | director | admin
VITE_MOCK_PERSONA=member
5 changes: 3 additions & 2 deletions web-client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="icon" type="image/svg+xml" href="/RoostFavIcon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>web-client</title>
<title>Roost</title>
<meta name="description" content="Roost — the sports club platform for managing members, teams, events, and payments." />
<script>
(function() {
var theme = localStorage.getItem('ui-theme') || 'system';
Expand Down
1 change: 1 addition & 0 deletions web-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"lucide-react": "^1.17.0",
"radix-ui": "^1.4.3",
"react": "^19.2.6",
"react-day-picker": "^10.0.1",
"react-dom": "^19.2.6",
"react-hook-form": "^7.77.0",
"react-router-dom": "^7.15.1",
Expand Down
31 changes: 31 additions & 0 deletions web-client/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions web-client/public/RoostFavIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions web-client/public/RoostIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion web-client/public/favicon.svg

This file was deleted.

8 changes: 4 additions & 4 deletions web-client/src/__tests__/useAuth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ vi.mock('@/lib/keycloak', () => ({
const { useAuth } = await import('@/features/auth/useAuth')

describe('useAuth', () => {
it('reads the member_roles claim into user.roles', () => {
it('collapses the member_roles claim into user.role', () => {
keycloakMock.tokenParsed = {
name: 'Jane Coach',
email: 'jane@example.com',
Expand All @@ -21,14 +21,14 @@ describe('useAuth', () => {

const { user } = useAuth()

expect(user.roles).toEqual(['Coach', 'Admin'])
expect(user.role).toBe('admin')
})

it('defaults roles to an empty array when the claim is absent', () => {
it('defaults role to member when the claim is absent', () => {
keycloakMock.tokenParsed = { name: 'Jane', email: 'jane@example.com' }

const { user } = useAuth()

expect(user.roles).toEqual([])
expect(user.role).toBe('member')
})
})
Loading
Loading