CRH Condos is a polished prototype for Coastal Rise Holdings LLC. It includes:
- A welcome page with separate tenant and property manager login paths
- A manager portal for lease creation, editing, deletion, payment history, reports, and ticket handling
- A tenant portal for profile updates, lease review, payment history, payment posting, and maintenance tickets
- A Stripe-ready payment area that uses demo mode until Vercel environment variables enable live checkout
- Open [index.html](C:\Users\Karel\Documents\New project\index.html) in a browser.
- Use one of these demo accounts:
admin@crhcondos.com/admin123mia@crhcondos.com/tenant123julian@crhcondos.com/tenant123
Current limitation: the app now uses Neon/Postgres for login plus the main lease, ticket, payment, and tenant-profile flows, but the frontend still keeps UI state in localStorage. That means the browser is no longer the source of truth for the core records, yet the session/auth model still needs more hardening before real tenant use.
Open the browser console and run:
resetCRHCondosDemo();This repo now includes:
api/public-config.jsto expose safe runtime config from Vercelapi/auth-login.jsto authenticate against Neon/Postgresapi/session.jsfor signed server-session restore, refresh, and logoutapi/create-checkout-session.jsto create Stripe Checkout Sessionsapi/update-tenant-profile.jsto persist tenant profile editsapi/create-ticket.js,api/update-ticket-status.js, andapi/delete-ticket.jsfor ticket writesapi/record-payment.jsto persist demo-mode payment records in Postgresapi/_lib/payment-notifications.jsto send tenant payment confirmation emails through Gmail SMTPapi/save-lease.jsandapi/delete-lease.jsfor admin lease CRUD writesapi/stripe-webhook.jsto verify Stripe webhook signaturesdb/schema.sqlwith a starter Postgres schemadb/seed.sqlwith starter demo data for the database.env.examplewith the environment variables needed on Vercel
Add SESSION_SECRET in Vercel before relying on the signed session cookie in production. If it is missing, the server currently falls back to POSTGRES_PASSWORD so the app can still boot, but an explicit session secret is the recommended setup.
Payment confirmation emails are sent only after a payment is successfully saved.
To enable Gmail SMTP in Vercel, add these environment variables:
GMAIL_SMTP_EMAILUse the Gmail address that will send the payment confirmation emails.GMAIL_SMTP_APP_PASSWORDUse the Gmail App Password generated for that Gmail account. Do not use your normal Gmail password and do not hardcode it in the codebase.
Behavior:
- The app validates the tenant email format before trying to send.
- If the payment is saved and the email sends successfully, the payment record is marked with email status
sent. - If the payment is saved but the email fails, the payment still remains saved and the record is marked with email status
failed. - The tenant-facing flow shows:
Payment saved, but notification email could not be sent.when delivery fails.
This prototype follows the recommended direction from current Stripe guidance: use Checkout Sessions for on-session rent payments.
The tenant payment screen currently runs in demo mode and records a local payment entry. To go live:
- Set the Vercel environment variables from
.env.example - Set
STRIPE_MODE=live - Add your live Stripe keys
- Configure a Stripe webhook to call
/api/stripe-webhook - Enable at least
checkout.session.completedandcheckout.session.async_payment_succeeded - Replace the remaining browser-managed state with fully authenticated server APIs
Recommended payload shape:
{
"leaseId": "lease_123",
"tenantUserId": "user_123",
"amount": 295000,
"description": "April rent"
}Important notes:
- Amounts sent to Stripe should use minor units, so
$2,950.00becomes295000 - The latest Stripe API version referenced by the skill used for this build is
2026-02-25.clover - For production, replace browser
localStoragewith a real database plus authenticated server APIs - The frontend now attempts a real Checkout redirect automatically when
STRIPE_MODE=live - Recurring and one-time successful payments can now send confirmation emails through Gmail SMTP after the payment is stored
The app is still not production-ready for real tenants until these are completed:
- Hardened session storage and authorization beyond the current signed-cookie flow
- Admin and tenant edit flows fully removed from browser-managed state
- [index.html](C:\Users\Karel\Documents\New project\index.html)
- [styles.css](C:\Users\Karel\Documents\New project\styles.css)
- [app.js](C:\Users\Karel\Documents\New project\app.js)