Everyspace

Engineering

직원을 추가하면 자리가 생긴다 — 2D 사무실과 근태를 한 몸으로

2026-08-14 · Everyspace 팀

Everyspace의 첫 화면은 2D 사무실입니다. 예쁘라고 있는 게 아니라, 회사의 상태를 한눈에 보여주는 대시보드입니다. 그러려면 두 가지가 자동이어야 했습니다.

1. 좌석 자동 배치

초기에는 직원을 추가해도 좌석이 없어서 지도에 세울 수 없었습니다. 지금은 직원을 만드는 트랜잭션 안에서 사무실 존의 빈 타일을 찾아 좌석을 만들고 배정합니다. 규칙은 단순합니다: 기존 직원 줄(y좌표)을 먼저 채우되 이웃 좌석과 최소 간격을 지키고, 충돌 검증은 월드 저장소의 기존 트랜잭션 규칙을 그대로 씁니다. 자리가 마음에 안 들면 대표가 자리 배치 모드에서 옮기면 됩니다.

2. 자리는 근태 원장을 따른다

아바타가 항상 자리에 앉아 있으면 그림일 뿐입니다. 지금은 지도가 30초마다 근태 원장에서 파생된 상태(off_duty / working / away / break)를 읽어, 출근하지 않았거나 휴식 중인 직원의 자리를 비워서 그립니다. 출근 버튼을 누르면 자리에 나타나고, 휴게를 누르면 사라집니다 — 사무실을 보면 지금 회사가 보입니다.

중요한 결정 하나: 이 표시용 상태 API는 시간 합계를 주지 않습니다. 동료가 근무 중인지 자리에 있는지는 사무실의 공용 정보지만, 몇 시간 일했는지는 본인과 대표의 정보이기 때문입니다.

덤: 퇴사자의 자리

퇴사 처리를 하면 좌석은 자동 회수되어 다음 직원에게 갑니다. 기록은요? 절대 지우지 않습니다. 로그인만 막히고, 근태·업무·급여 원장은 "과거 기록"으로 남습니다. 자리는 회사의 것이고, 기록은 사실이니까요.

Add an employee, get a desk — wiring a 2D office to the attendance ledger

2026-08-14 · Everyspace team

Everyspace opens on a 2D office. It's not decoration — it's a dashboard of the company's current state. That required two things to be automatic.

1. Automatic seat placement

Early on, adding an employee left them seatless and unplaceable on the map. Now the employee-creation transaction scans the office zone for a free tile and creates their seat in the same commit. The rules are simple: fill existing desk rows first, keep a minimum gap from neighbors, and reuse the world repository's existing collision checks. If the owner doesn't like the spot, seat-arrangement mode moves it.

2. Desks follow the attendance ledger

If avatars always sit at their desks, it's just a picture. The map now polls a presence API every 30 seconds — states derived from the attendance ledger (off_duty / working / away / break) — and renders empty desks for anyone not clocked in or on break. Press clock-in and you appear; take a break and your desk empties. Look at the office and you see the company.

One deliberate choice: the presence API exposes states only, never hour totals. Whether a colleague is at their desk is shared office information; how many hours they worked belongs to them and the owner.

Bonus: when someone leaves

Offboarding reclaims the seat automatically for the next hire. The records? Never deleted. Only their login is revoked — attendance, tasks, and payroll stay in the ledger as history. The desk belongs to the company; the records are facts.