Skip to content

Scaffold GillyTracker reporter SPA from keboo.react and adapt to existing Azure infra#1

Merged
Keboo merged 15 commits into
mainfrom
copilot/setup-reporter-app-infra
May 18, 2026
Merged

Scaffold GillyTracker reporter SPA from keboo.react and adapt to existing Azure infra#1
Keboo merged 15 commits into
mainfrom
copilot/setup-reporter-app-infra

Conversation

Copilot AI commented May 17, 2026

Copy link
Copy Markdown
Contributor

This PR turns the repo into a web-based Gilly sighting reporter using keboo.react 1.13.1, while adapting deployment assumptions to existing Azure resources instead of provisioning a full new stack.
The app is now a no-auth single-page flow that captures geolocation (with manual fallback) plus reporter contact/details, and persists reports to SQL under the GillyTracker schema.

  • Template bootstrap and repo initialization

    • Generated the solution from Keboo.Dotnet.Templates@1.13.1 (keboo.react) as the project baseline.
  • Reporter-focused SPA flow (no auth)

    • Replaced the frontend app entry experience with a single-page report form.
    • On load, attempts navigator.geolocation.getCurrentPosition(...).
    • If location is unavailable/denied, user can manually enter latitude/longitude.
    • Added freeform details/contact field and submit path to backend API.
  • Backend API and data model for sightings

    • Added SightingsController with POST /api/sightings (+ retrieval endpoint).
    • Added coordinate validation and details-length validation.
    • Added DogSightingReport entity and DbSet mapping to:
      • table: GillyTracker.DogSightingReports
      • coordinate precision configured in EF model.
  • Existing-infra alignment (Terraform)

    • Updated infra composition to consume existing Azure resources via variables/data lookups (RG, ACR login server, Container App Environment, existing DB connection string).
    • Removed assumptions that this app should always create net-new SQL/SWA/shared infra for this use case.
  • Docs and metadata alignment

    • Updated root README to describe the Gilly reporting workflow and existing-infra expectations.
    • Updated web metadata description and UI test README wording to remove stale Q&A-template framing.
// GillyTracker.Web/src/App.tsx (simplified)
navigator.geolocation.getCurrentPosition(
  ({ coords }) => {
    setLatitude(coords.latitude.toFixed(7))
    setLongitude(coords.longitude.toFixed(7))
  },
  () => {
    // manual entry fallback
  },
  { enableHighAccuracy: true, timeout: 10000 }
)

await apiClient.post('/api/sightings', {
  latitude: Number(latitude),
  longitude: Number(longitude),
  details,
})
Original prompt

I want to create a web based project to allow people to report the location of my dog Gilly. I have a sample react template that I would like to base this on, keboo.react inside of Keboo.Dotnet.Templates. Use version 1.13.1.

That template wants to create new infra for everything, but I have some existing infrastructure I would like to use.
Database: https://portal.azure.com/#@keboo.dev/resource/subscriptions/9f47860f-97e3-418d-b0ac-c514c26274a4/resourceGroups/KebooDev/providers/Microsoft.Sql/servers/keboodev-sql/databases/keboodevdb/queryEditor
ACR: https://portal.azure.com/#@keboo.dev/resource/subscriptions/9f47860f-97e3-418d-b0ac-c514c26274a4/resourceGroups/KebooDev/providers/Microsoft.ContainerRegistry/registries/keboodevacr/overview
Container App Environment: https://portal.azure.com/#@keboo.dev/resource/subscriptions/9f47860f-97e3-418d-b0ac-c514c26274a4/resourceGroups/KebooDev/providers/Microsoft.App/managedEnvironments/keboodev-env/containerAppEnvironment

For the database, I want to use a GillyTracker schema.
The app will not need auth.
This will be a single page application. I plan to print a QR code and put it on my dogs collar linking to the web page. When the page loads I want it to attempt to collect the user's location. If location services are not allowed or enabled, allow for the user to manually enter them. I want there to be a text field for the user to put in any details needed about themselves or contact information where I can reach them to pick up my dog.

Copilot AI changed the title [WIP] Setup existing infrastructure for Gilly location reporting app Scaffold GillyTracker reporter SPA from keboo.react and adapt to existing Azure infra May 17, 2026
Copilot finished work on behalf of Keboo May 17, 2026 18:57
Copilot AI requested a review from Keboo May 17, 2026 18:57
Install pnpm before setup-node cache in frontend jobs and pin pnpm to 11.1.1 to match packageManager.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Keboo Keboo marked this pull request as ready for review May 18, 2026 04:26
Keboo and others added 11 commits May 17, 2026 21:32
- Memoize refreshUser with useCallback to fix react-hooks/set-state-in-effect error
- Add refreshUser to useEffect dependencies
- Add void keyword to loadRooms() call for proper async handling

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Define initializeAuth inside useEffect in AuthContext
- Define load function inside useEffect in MyRooms
- Remove unnecessary useCallback import from MyRooms
- This satisfies react-hooks/set-state-in-effect rule

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Convert Box component style props to use sx prop (TS2769 errors)
- Replace process.env.NODE_ENV with import.meta.env.MODE for Vite compatibility
- Fixes Box styling issues in ProtectedRoute, QuestionDisplay, Room, RoomManage, and MyRooms

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
TypeScript requires component prop when using certain property combinations
with Typography. Added component='p' to the description Typography.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The paragraph prop is Typography-specific and not available on native
HTML elements. Since we're already rendering as a <p>, we don't need it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Create a new EF Core migration to capture model changes and ensure
database schema is in sync with the entity definitions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Create DogSightingReports table in GillyTracker schema
- Configure latitude/longitude with decimal(10,7) precision
- Add reporter details field with 2000 character limit
- Auto-generate migration designer file

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…velopment

The pre-login handshake error was caused by UseAzureSql() enforcing encryption
when connecting to the local Docker SQL Server container, which has a self-signed
certificate. In development, we now use UseSqlServer() to disable encryption,
while production continues to use UseAzureSql() for Azure SQL compatibility.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
UseAzureSql enforces encryption which fails with self-signed certificates
on the Docker SQL Server container. UseSqlServer works for both local
development and CI/CD test environments.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…n development

- Uses UseAzureSql() to preserve JSON column handling for AspNetUserPasskeys
- Adds Encrypt=false to connection string in development to bypass TLS handshake errors with Docker SQL Server self-signed certificates
- Removes accidentally generated RebuildSnapshot migration

This resolves the pre-login handshake failure while maintaining proper model compatibility.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Changed TypeScript from 6.0.3 to 5.9.3 which is compatible with typescript-eslint
- Removed incompatible 'ignoreDeprecations' setting from tsconfig.json
- Regenerated pnpm-lock.yaml with compatible dependencies
- Fixes 'Cannot read properties of null (reading matches)' error in npm install during AppHost startup

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Keboo Keboo merged commit 1d7129f into main May 18, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants