Client-Driven Projections
Lesan's signature feature: the client decides the shape of the response. Every act returns whatever the client asked for in details.get, and Lesan builds the correct MongoDB query โ including $lookup, $unwind, and $project stages for nested relations โ automatically.
Relations in Depth
This page collects the advanced relationship options โ limit, sort, excludes, multiple relatedRelations, and cascading deletes with hardCascade. For the conceptual background, see What Is the Relationship Really?.
Request Lifecycle & Hooks
Every request to a Lesan server flows through a strict, small pipeline. Understanding it lets you hook in auth, validation, logging, and side-effects at exactly the right moment.
Aggregation Pipelines with Client Projections
Lesan's aggregation method lets you run a raw MongoDB pipeline and then appends the projection stages needed to satisfy the client's get. You write the hard logic ($match, $sort, $group, $skip/$limit); Lesan writes the $lookup, $unwind, and $project.
Filtering with MongoDB Operators
Lesan's filters (and filter) options accept raw MongoDB filters. Everything you can put in a MongoDB find works here โ comparison operators, logical operators, regex, $text, and more. Plus, because relations are embedded snapshots, you can filter on related data with dot-notation without any join.
Pagination
Lesan's find returns a MongoDB cursor, and its aggregation accepts raw pipeline stages โ so you have full control over how you paginate. There's no built-in pagination API; you compose it from the primitives.
Microservices: Service-as-URL Forwarding
Lesan lets you split a backend into multiple applications and route requests between them. A service in Lesan is either: