Client #43: App shell with sidebar layout and data layer foundation#71
Merged
Conversation
ea1689b to
c2e8933
Compare
Collaborator
|
For consistency, please change "sports-events" to "events". |
Collaborator
|
Please further add the finance route. |
Collaborator
|
Rest lgtm. |
Collaborator
|
Also, maybe merge main into this branch for merge conflict resolution before merging to main. |
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.
Why
Sets up the foundational client architecture for all future feature screens — without this, every feature PR would need to independently wire up routing, data fetching, and shared state from scratch.
What changed
Providers & routing
BrowserRouter+ monolithicAppRouter.tsxwith React Router v7 route-object style (createBrowserRouter,RouterProvider)src/app/layout/AppShell.tsxusing shadcnSidebarProvider+OutletQueryClientProvideradded inmain.tsxwith shared retry logic (skip retry on 4xx, max 2 retries on 5xx/network)Feature-based architecture
api.ts/client.tsfiles into feature slices:api/,types/,pages/useQuery+useMutation) with query key factoriesremoveQueries) instead of waiting for gcTimeidin mutation variables rather than closing over it at hook-call timeShared foundations
src/types.ts— re-exports all OpenAPI schema types fromsrc/api.tswith clean names; feature types import from here (single source of truth)src/lib/forms.ts— re-exportsuseForm,zodResolver,zfrom a single entry pointsrc/store/ui.ts— Zustand store for client-only UI statesrc/components/ui/ErrorMessage.tsx+LoadingSpinner.tsx— shared UI primitivesNaming
eventsfeature renamed tosport-eventsthroughout (folder, hooks, query keys, page, nav label) — avoids shadowing the DOMEventglobal; backend route/api/v1/eventsunchangedEventtype aliased asSportEventinsrc/types.tsNotes
src/api.tsis auto-generated byopenapi-typescript(installed as dev dep) — do not edit it. Editsrc/types.tsaliases instead, or regeneratesrc/api.tsfrom the OpenAPI spec.createApiClient()fromsrc/lib/keycloak.ts— no custom auth or token logic was added.payments/folder name kept as-is (user-facing domain); base URL is/api/v1/financeto match the Traefik proxy route.Testing
pnpm lint— 0 errors, 0 warningspnpm typecheck— cleanpnpm build— 2020 modules, built successfullyCloses #43