A responsive, WCAG-compliant single-page rental application portal for Affordable Apartments USA. Applicants apply either as a Standard Applicant or a Housing Voucher / Section 8 Applicant, pay the $35.00 application fee online through Stripe, and the portal emails notifications to your team.
π Try it live: https://rental-application.val.run
- Application-type toggle β selecting Section 8 reveals Housing Authority, voucher amount, approved bedroom count, and caseworker contact fields (and hides them again for Standard applicants).
- Six form sections: Property Info Β· Applicant Personal Details Β· Rental History Β· Financial Details Β· Disclosures & Accessibility Β· Application Fee & Authorization.
- Online payment β after submitting, the applicant is offered a secure "Pay $35.00 Now" button that opens a Stripe Checkout page. A completed payment is verified via Stripe webhook and the application is marked paid.
- Email notifications β your team gets an email when an application is submitted and again when the fee is paid; applicants get a confirmation.
- Executive palette β Navy
#1a365d, Slate#4a5568, soft accent#ebf8ff. - Accessibility (WCAG) β real
<label for>pairs,aria-invalid,role="alert"validation, visible focus rings, keyboard-friendly controls, fully mobile responsive. - Validation β required-field checks, email/phone/SSN masking (last-4-only display), conditional validation, digital-signature requirement.
- Persistence β applications + payment status stored in the val's SQLite DB.
Rendering mermaid diagram...
| Variable | Required | Description |
|---|---|---|
NOTIFY_EMAIL | always (has default) | Inbox notified of new applications & payments. Defaults to Cynthiawilliamshouse@gmail.com. |
STRIPE_SECRET_KEY | for payments | Stripe API secret key (sk_test_β¦ or sk_live_β¦) |
STRIPE_WEBHOOK_SECRET | for payments | Stripe webhook signing secret (whsec_β¦) |
-
Create a Stripe account (or connect to an existing one), then grab the API secret key β Restrict API key access: https://dashboard.stripe.com/apikeys
-
Add the two Stripe variables and then register the webhook so Stripe can confirm payments:
- Endpoint:
https://rental-application.val.run/api/stripe-webhook - Subscribe to the
checkout.session.completedevent. - After saving, copy the
whsec_β¦signing secret intoSTRIPE_WEBHOOK_SECRET.
π Add STRIPE_SECRET_KEY here: https://www.val.town/x/affordableapartmentsusa/rental-application-portal/environment-variables?key=STRIPE_SECRET_KEY π Add STRIPE_WEBHOOK_SECRET here: https://www.val.town/x/affordableapartmentsusa/rental-application-portal/environment-variables?key=STRIPE_WEBHOOK_SECRET
For testing, use Stripe test keys (
sk_test_β¦) and their test card4242 4242 4242 4242. Switch to live keys when you're ready to collect real payments. - Endpoint:
Notifications are sent through Val Town's built-in std/email. The Free
plan only allows sending email to the account owner's own address β external
recipients (Cynthia's inbox or applicants' inboxes) require the Pro or
Business plan. If you stay on Free, submissions and payments still work;
the notification sends are attempted, logged, and safely ignored on failure.
Emails are always wrapped so a delivery problem never breaks the application
flow.
| Method | Route | Description |
|---|---|---|
GET | / | The application portal UI |
POST | /api/application | Store an application (ApplicationFormData JSON) |
GET | /api/application/:id | Fetch a single application (used on the paid confirmation page) |
POST | /api/checkout/:id | Create a Stripe Checkout session for the $35 fee |
POST | /api/stripe-webhook | Stripe webhook β marks an application paid & emails notifications |
GET | /api/applications | List the 50 most recent applications (internal) |
The val is deployed automatically on save. To build or extend:
- Tweak the palette and form fields in
frontend/components/. - Adjust business rules (fees, validation) in
frontend/components/ApplicationForm.tsx. - The fee is set by
APPLICATION_FEE_CENTS = 3500inindex.ts.
View the source at any time from the View source link in the footer.