Repository navigation
Prepare shared hosting with reliable billing recovery - #110
Merged
Merged
Conversation
ankitsejwal
added a commit
that referenced
this pull request
Nov 13, 2026
The mobile redesign in #110 and #111 rewrote the screens the phone demo touched. I kept the redesigned screens and re-applied the demo changes on top: each screen reads its API client from the session, the home screen hides the Resident/Gate toggle during a demo and shows the demo identity instead, and sign-in gets the demo entry through a SignInForm slot. Push registration stays inside the live Clerk tree, so a demo never registers a device. The demo client answers the new vehicle alert and returns an error for push token calls. Mobile tests now run both the vitest demo suites and the node build-environment test.
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.
I prepared OpenSociety for the shared DigitalOcean Droplet. The API and web now run in separate Node containers, with R2 uploads and database-backed push recovery. Billing is opt-in, catches up the current month after restart, and retries failed ledger posting. Container builds enforce HTTPS and Clerk configuration, and the deployment guide covers migrations, Caddy, and rollback.
Local development runs through
pnpm dev, with Turborepo rebuilding shared packages and restarting the API/web. Docker image builds and smoke tests run in GitHub Actions to keep their storage off the Mac.While adding restart recovery, I found that concurrent billing runs could create duplicates and failed line inserts could leave incomplete bills or journals. Migration 0024 adds monthly uniqueness, and both writes are now atomic. Monthly ledger posting also uses batches of 100 instead of several database requests per apartment. Existing duplicate monthly bills need review before applying the index; the migration does not delete records.
Build, type-check, lint, and all tests pass, including 1,000-apartment PostgreSQL billing and ledger checks. Both Docker images build and pass smoke tests for SSR, static assets, CORS, non-root execution, and graceful shutdown under the proposed restrictions. CI now repeats those container checks on Linux.
The Droplet is not provisioned. No production database, DNS, store release, or hosting deployment changed. Actual staging capacity and physical-device push delivery remain unverified.