# Apartment planner ## What this builds A small apartment you can furnish and walk through in the browser. Rooms have documented sizes. Furniture comes from a shipped set. Layouts serialise to a shareable state URL. Tests place a fixture layout, check room dimensions, and assert collisions and bounds. A golden view is taken. The furniture and the flats are original. Read `spekkr.inputs.json` first. `title` is on the plan. `flat` chooses the rooms. `walk` and `collisions` change the view and the rules. `share_prefix` is used for a URL. ## Out of scope - A real-estate listing, a live catalogue, or a paid furniture store. - Network or a public gallery in the checks. - Structural or electrical plans. ## Requirements Each requirement has an id. Checks name the id they cover. ### R1. Rooms and furniture - Each flat's rooms and sizes are in `fixtures/flats.json`, in metres, and the bounding box of each room matches within 0.01 m. - The fixture layout `fixtures/studio-a.json` places listed pieces at documented poses. Loading it restores those poses within 0.01 m and 0.5 degrees. - The share URL of that layout, under `share_prefix`, round-trips to the same state. Accept when: sizes and poses match, and the URL round-trips. ### R2. Collisions and walk - If `collisions` is on, a move that would overlap a wall or another piece is refused. The cases in `fixtures/apt-collisions.json` hold. - A walk, if on, starts at the documented door and a scripted path ends at the pose in the file, sliding along a wall rather than passing through it. - If `collisions` is off, the refuse cases become allowed; a test covers that too. Accept when: every collision case matches the option, and the walk ends at the documented pose. ### R3. Frames and files - Goldens: the empty plan, the fixture furnished, a first-person view, and a collision-refused overlay. - One command runs sizes, poses, URL, collisions, and the walk, and writes the frames. No network. Accept when: the command passes for both flats, and the frames match the goldens. ### R4. Inputs - The build reads `spekkr.inputs.json`. Settings label the UI, options turn features on or off, and a swap must be one of its choices. - A value outside a stated range, or a swap that is not one of its choices, is refused before the app starts its checks, with a message that names the key. Accept when: the default inputs render, an illegal swap is refused by name, and changing a visible setting (for example the title) shows up in a later check. ## Verification Fixture furniture poses and room dimensions match shipped files. Collision and bounds cases are tested with the option on and off. A scripted walk does not pass through walls. A layout round-trips through a share URL. A golden view is checked. No live catalogue and no network. ## Definition of done - Every acceptance check above runs from one command, and all pass at the person's inputs. - A README says how to furnish, how to share a layout, and how to run the checks.