Skip to content

Modernize BookIT UI, runtime, and deployment - #117

Open
Portals wants to merge 44 commits into
mainfrom
shore/upgrade-dependencies
Open

Portals wants to merge 44 commits into
mainfrom
shore/upgrade-dependencies

Conversation

@Portals

@Portals Portals commented Sep 6, 2026

Copy link
Copy Markdown
Member

Important

Deployment changes: bookit-node-frontend and bookit-node-backend have been merged into bookit-node.

  • Replace both application containers with one using ghcr.io/cthit/bookit:<tag>. Route / and /api/* to its port 8080 and remove the separate frontend deployment.
  • Set DB_HOST, DB_NAME, DB_USER, and DB_PASS; DB_PORT defaults to 5432.
  • Move the backend environment settings to the combined container and set NODE_ENV=production. Keep the existing SECRET; no new key is required. SESSION_SECRET is accepted only as a compatibility fallback.
  • Keep existing PostgreSQL/Redis data volumes. The Alpine container now runs prisma migrate deploy before starting and exits on migration failure. Existing databases previously managed with prisma db push need a one-time baseline after verifying their schema; see the setup and upgrade instructions.
  • Local environment examples now live at the repository root. docker compose -f docker-compose.test.yml up --build -d --wait starts the complete local stack and provisions Gamma credentials automatically. docker-compose.prod.yml provides the app, PostgreSQL, and Redis for production.
  • Remove the old db-scripts cleanup container or scheduled job. The backend cleans up old booking contact data automatically at startup and daily.
  • Existing sessions will require users to sign in again.

Modernizes BookIT across the UI, runtime, and deployment. Replaces the legacy frontend with TypeScript and shadcn/ui, generates GraphQL contracts, strengthens booking concurrency and contact-data privacy, and serves the frontend and API from one container.

Review guide

  • Backend: authentication/session handling, booking permissions, transactional overlap checks, and automatic contact-data cleanup.
  • Deployment: the migration instructions above, Dockerfile, DB configuration, and the CI → tested image → release flow.
  • Frontend: calendar navigation, booking creation/editing/drag confirmation, rules management, and keyboard/mobile behavior.

Dependency changes

Dependency / tooling Change
Node / package manager Node 24.19.0; npm replaced with pnpm 12.3.4 workspaces
React / React DOM 17 → 19.2.8
TypeScript 4.9 → 7.0.2
Create React App / ESLint / Mocha / Chai Replaced with Vite+ 0.3.0: Vite 8.2.2, Vitest 4.1.11, Oxlint and Oxfmt
Digit Components / Material UI icons Replaced with shadcn/ui, Radix UI 1.6.7, Tailwind CSS 4.3.3 and Lucide 1.41.0
React Router 5 Replaced with TanStack Router 1.170.32; added TanStack Query 5.102.8
FullCalendar 5.9 → 7.1.0, using the Monarch shadcn integration
Moment Replaced with date-fns 4.4.0
Express 4 → 5.2.1
express-graphql Replaced with Apollo Server 5.5.1 and its Express 5 integration 1.1.2
GraphQL 15 → 16.14.2; added GraphQL Codegen
Prisma 5.9 prerelease → 7.10.0, with the PostgreSQL driver adapter
Redis client 3 → 6.2.1
express-openid-connect 2 → 3.4.0
Axios / dotenv 0.21 → 1.20.0 / 16 → 17.4.2
ts-node / ts-node-dev Replaced with tsx 4.23.13
Browser tooling Added Playwright 1.63.0 and Testcontainers 12.1.0

Removed unused legacy dependencies including express-session, connect-redis, js-base64, qs, prop-types and web-vitals. Moved personal-data cleanup from the separate Jobber container into the backend. Updated CI and container builds for the workspace layout.

Existing PostgreSQL 12 and Redis 5 deployments remain supported. The optional production Compose stack uses PostgreSQL 16; migrating existing PostgreSQL 12 data to it requires dump/restore, not reusing the old data directory.

Issues resolved

Screenshots

Desktop

Rules table rules
Calendar — list view download
Calendar — month view download
Calendar — week view download

Mobile

Mobile — booking form mobile-booking
Mobile — rules table mobile-rules
Mobile — list view download
Mobile — month view download

Migrate to pnpm 12 and Vite+, React 19 with shadcn and FullCalendar, TanStack Router and Query, Apollo Server, Prisma 7, and generated TypeScript contracts.

Restore compact room filters and original calendar, booking, and rules behavior. Add signed sessions, private phone fields, serializable booking writes, modern CI, and real Gamma Playwright coverage.

Keep PostgreSQL 12 and Redis 5 server upgrades as documented separate follow-ups. Verified 45 unit/API tests, four E2E flows, strict types and lint, production builds, clean dependency audit, and local Docker smoke tests.
Invalidate the moved booking's detail query alongside all calendar ranges. Cover opening details, dragging, immediately editing and preserving the moved timestamps in the real browser suite.
Build frontend and backend from the repository root, replace obsolete demo Gamma settings with required current OIDC configuration, and keep backing services private on the deferred database versions. Document explicit schema setup and existing database storage migration precautions.
Split four packed flows into ten independent tests while sharing the existing worker environment. Separate setup, actions and assertions with whitespace, format all E2E files with Vite+, and document role-first selectors with date/time label fallbacks.

Verified ten browser tests, the retained mobile day-view regression, 45 unit/API tests, strict TypeScript and formatting/lint checks.
Comment thread e2e/accessibility.spec.ts Outdated
Comment thread e2e/screenshots.ts Outdated
Comment thread .github/workflows/ci.yml Outdated
@cthit cthit deleted a comment from github-advanced-security AI Sep 6, 2026
Comment thread e2e/Makefile
Comment thread gamma/bookit-client.sql
@Portals Portals changed the title Modernize BookIT dependencies and UI Modernize BookIT UI, runtime, and deployment Sep 6, 2026
@Portals
Portals marked this pull request as ready for review September 6, 2026 16:42
@goosetaf

goosetaf commented Sep 6, 2026

Copy link
Copy Markdown
Member

The desktop week view has strange edges. Also, maybe the label background could be improved somewhat?

image

@Portals
Portals requested review from goosetaf and molleer September 6, 2026 17:05
@Portals

Portals commented Sep 6, 2026

Copy link
Copy Markdown
Member Author

The desktop week view has strange edges. Also, maybe the label background could be improved somewhat?

image

I think I fixed it. Updated the screenshots. @GAsplund

@goosetaf

goosetaf commented Sep 6, 2026

Copy link
Copy Markdown
Member

The labels, yes I guess. For the edges, not really. Check the top edge for example, where is misaligns:
image

@Portals

Portals commented Sep 6, 2026

Copy link
Copy Markdown
Member Author

@GAsplund I see! Check it out, all fixed.

@goosetaf

Copy link
Copy Markdown
Member

The desktop week view has strange edges. Also, maybe the label background could be improved somewhat?
image

Thanks for the change. However, from my own preference maybe the background dim should be just with a container around the text and not the entire container?

@Portals

Portals commented Sep 20, 2026

Copy link
Copy Markdown
Member Author

Thanks for the change. However, from my own preference maybe the background dim should be just with a container around the text and not the entire container?

Fixed @goosetaf

@goosetaf

Copy link
Copy Markdown
Member

Having tried to set it up locally, I found a few things:

  • Is it possible to use alpine instead of bookworm-slim in the Dockerfile? This would greatly reduce image size
  • Having tried to set up my own test compose, I could not get it to migrate. The Dockerfile should probably run database migrations before starting the server
  • It would be nice to have a ready-to-go compose file both for production (app + db) and for testing the full environment (that has an additional service that builds and runs the Dockerfile) rather than just a development compose. This would resolve headaches for finding Gamma's test API keys and client.
  • It's a bit confusing with the .env.example file being in the bookit directory rather than the root, but I understand if it needs to be there.

@goosetaf

goosetaf commented Sep 20, 2026

Copy link
Copy Markdown
Member

Nice! I have two more suggestions for the UI, and then I think I'm confident to approve. I have looked through the frontend and backend and I cannot find anything that I have any protest about.

The new color scheme looks a bit dark. Maybe this is a side-effect from attempting to darken the background before?
imageimage

What exactly is secure here? If it has no real meaning, maybe it should be removed to reduce potential visual clutter.
image

Edit: third thing. The background is inconsistent depending on if one or multiple rooms are booked. Could also remove the little dot as it does not seem to represent anything in multi-room context.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants