← Navan Interview Insights

Navan·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
May 2026

Summary

Navan system design round focused entirely on OOD for a booking comments feature. Pretty deep dive, more nuanced than I expected for what sounds like a simple CRUD problem.

Questions Asked (1)

Q1

Design a system that supports storing auxiliary comments (like 'room should be quiet') during a booking flow. Comments can be attached to a specific booking or to a recurring entity like a room or listing. Regular users can add comments to their own bookings; admins can update existing comments. How would you model the entities, handle permissions, manage persistence, and support efficient bulk updates by admins across many bookings or rooms at once?

System DesignData ModelingTechnical Trade-offs
Author's notes

I started with the entity model and got through the basics fine, polymorphic association between Comment and either a Booking or a Room/Listing.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then propose a polymorphic data model that links comments to either bookings or recurring entities. Outline permission rules for regular users and admins, and describe persistence and bulk update strategies with trade-offs.

Pro tip: Emphasize idempotency and auditability for bulk admin updates, and discuss how to avoid N+1 queries when fetching comments for many bookings or rooms.

1. Clarify requirements and scale

Ask about expected read/write volume, comment size limits, and whether comments need versioning or soft deletes. Confirm if bulk updates should be atomic or can be eventually consistent.

2. Design the data model

Propose a comments table with a polymorphic association (entity_type, entity_id) to support both bookings and recurring entities like rooms/listings. Include fields for author, content, timestamps, and status.

3. Define permissions and access control

Regular users can create comments only on their own bookings; admins can update any comment. Consider role-based access control and ownership checks at the API layer.

4. Plan persistence and query efficiency

Use indexes on (entity_type, entity_id) and author_id. For bulk reads, batch fetch comments by entity IDs to avoid N+1 queries. Consider caching frequently accessed comments.

5. Handle bulk updates by admins

Design a bulk update endpoint that accepts a filter (e.g., all bookings for a room) and a comment update. Use batch processing, transactions, and idempotency keys to ensure reliability.

Key Points to Mention

  • Polymorphic association for comments to support multiple entity types
  • Indexing strategy for efficient lookups by entity and author
  • Role-based permissions with ownership checks for regular users
  • Bulk update patterns: batch processing, transactions, and idempotency
  • Audit trail and soft deletes for compliance and recovery
  • Trade-offs between normalized vs. denormalized storage for read performance

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.