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
#1a365d, Slate #4a5568, soft accent #ebf8ff.<label for> pairs, aria-invalid,
role="alert" validation, visible focus rings, keyboard-friendly controls,
fully mobile responsive.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:
https://rental-application.val.run/api/stripe-webhookcheckout.session.completed event.whsec_โฆ signing secret into STRIPE_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 card
4242 4242 4242 4242. Switch to live keys when you're ready to collect
real payments.
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:
frontend/components/.frontend/components/ApplicationForm.tsx.APPLICATION_FEE_CENTS = 3500 in index.ts.View the source at any time from the View source link in the footer.