The Retro Web
The Retro Web is the small internet inside Retro PC. Retro Internet Explorer browses it,
and its sites have their own addresses: www.retro.com, mail.retro.com,
zone.retro.com, yankees.retrobaseball.com.
A Retro Web site is not a real website. Nothing is fetched by address. A site is a TypeScript object, compiled into the web app, that maps host names and paths to React components. Those components talk to the Retro PC server like any other app.
A site
Section titled “A site”export const todaySite: Site = { hosts: ['www.retro.com', 'retro.com'], pages: { '/': { component: HomePage } }, search: [{ title: 'Retro Today', address: HOME, words: ['retro', 'today', 'portal'] }],};| Field | What it does |
|---|---|
hosts |
The host names the site answers to |
pages |
Path patterns to page components. /games/:kind passes kind as a param. |
search |
Entries the built-in search can find (the Search pane, and pages that search) |
Every site is listed in SITES in apps/web/src/ie/sites.ts. Retro Internet Explorer
opens nothing else.
What happens when you type an address
Section titled “What happens when you type an address”normalizeAddresstrims it, addshttp://if there’s no scheme, and lower-cases the host.resolveAddressfinds the site whosehostsinclude the host, then the first page whose pattern matches the path.- A match renders the page component. No match shows Internet Explorer’s error page; for an address outside the Retro Web it offers to open it in your real browser.
What a page gets
Section titled “What a page gets”A page component receives PageProps: its url and params, and callbacks to navigate,
setTitle, setLoading, and setUnsavedChanges (Internet Explorer asks before leaving a page
with unsent work). Back, Forward, History and Favorites are Internet Explorer’s, not the
page’s.
The sites today
Section titled “The sites today”| Site | Host | Folder |
|---|---|---|
| Retro Today, the portal | www.retro.com |
apps/web/src/sites/today |
| Retro Mail | mail.retro.com |
apps/web/src/sites/mail |
| The Retro Zone | zone.retro.com |
apps/web/src/sites/zone |
| Retro Support | support.retro.com |
apps/web/src/sites/support |
| Retro Account Services | account.retro.com |
apps/web/src/sites/account |
| Team portals | <team>.retrobaseball.com |
apps/web/src/sites/yankees |
Add a site walks through making one.