Design a service for collaboratively planning renovations with contractors, estimates, and changes.
Asked at
AI answer
Architecture
- Web and mobile clients communicate with an API gateway. Core modules include projects and tasks, contractors, estimates and payment milestones, discussions and notifications, files, and audit. Initially, this can be a modular monolith; services should be split out as load and team size grow.
- PostgreSQL stores projects, participants, tasks, estimate versions, and approvals. Files are stored in object storage, while metadata and access permissions are stored in the database. A message queue is used for notifications, file processing, and background tasks.
Changes and approvals
Estimates and work plans are versioned: a new revision does not overwrite an approved one. A change records its author, time, reason, previous and new values, and required approvers. States: draft → pending approval → approved or rejected. Approval is performed transactionally with a version check (optimistic locking) so that concurrent edits are not lost. Once approved, a new baseline version is created rather than changing the history.
Access and reliability
Use a role-based model with scopes: project owner, contractor, and observer; a contractor can see only the projects and data assigned to them. Permissions must be checked server-side for every resource. Changes are audited, and sensitive documents are shared using temporary links. Use TLS, back up the database and files, verify recovery, and monitor error and latency metrics, tracing, and alerts. For reliable event delivery, use a transactional outbox and idempotent handlers.
Also asked at Andersen
- Which company did you work for and what projects did you handle?
- How do you work with Linux at the system administration level?
- What databases do you have experience working with?
- How is a container built and run from a Dockerfile?
- How did you deploy the Kubernetes cluster and how did you manage it? What tools did you use for rollout?
Similar questions
- Design a service for collaboratively planning a wedding, with a budget, guests, vendors, and changes after confirmation.
- Design a service for collaboratively planning family events, with guests, a budget, and changes.
- Design a service for collaboratively planning trips, with bookings and changes.
- Design a service for collaboratively creating and reviewing business plans, with versioning, comments, and roles.
- Design a service for collaborative meal planning with allergies, shopping, and offline lists.