Machines
A machine is one Retro PC computer. Each has its own Welcome screen, its own Retro PC accounts and its own storage quota, at its own address:
https://retropc.toadzurg.com/m/<slug>/Think of a machine as a family PC, or a school lab computer: the people who log on to it are its accounts, and an administrator invites them.
What belongs to a machine
Section titled “What belongs to a machine”| Belongs to the machine | Belongs to the network |
|---|---|
| Retro PC accounts and their types | Messenger accounts and profiles |
| Invitations and password reset links | Contacts, groups and conversations |
| The Welcome screen’s tiles | Retro Mail |
| Each account’s files, under a shared quota | Retro Zone scores, ratings and badges |
A user name is unique on its machine, ignoring case. The same name can exist on two machines.
How a request knows its machine
Section titled “How a request knows its machine”- The session records its machine when someone logs on. The server filters every query on machine data by that id, never by anything in the request.
- The web app also sends an
x-retro-machine: <slug>header. It can only narrow what the session allows: a request for another machine’s slug is refused. - A browser holds one session, so logging on to machine B logs the browser off machine A.
/forwards to the last machine opened in this browser.
Making a machine
Section titled “Making a machine”The first machine and its administrator are made from the command line; after that an administrator can invite someone to a new computer, which makes a new machine. The machine’s owner is the Messenger account its first administrator signs in with.
In the code
Section titled “In the code”| What | Where |
|---|---|
| Table | machines in apps/server/src/db/schema.ts |
| Schemas | packages/protocol/src/machines.ts |
| Routing in the page | apps/web/src/system/machine/ (route.ts, MachinePage) |
| Server side | apps/core/src/machines.rs |