|
| 1 | +--- |
| 2 | +name: project-guide |
| 3 | +description: Project structure, dependency graph, and guide for finding the right project to work in. Use when starting a task and unsure which project owns the relevant code, or when you need to understand cross-project dependencies. |
| 4 | +--- |
| 5 | + |
| 6 | +# Project Guide |
| 7 | + |
| 8 | +## Project Structure |
| 9 | + |
| 10 | +| Project | Purpose | |
| 11 | +| --- | --- | |
| 12 | +| `bson` | BSON library (core serialization) | |
| 13 | +| `bson-kotlin` | Kotlin BSON extensions | |
| 14 | +| `bson-kotlinx` | Kotlin serialization BSON codec | |
| 15 | +| `bson-record-codec` | Java record codec support | |
| 16 | +| `bson-scala` | Scala BSON extensions | |
| 17 | +| `driver-core` | Core driver internals (connections, protocol, operations) | |
| 18 | +| `driver-sync` | Synchronous Java driver | |
| 19 | +| `driver-legacy` | Legacy MongoDB Java driver API | |
| 20 | +| `driver-reactive-streams` | Reactive Streams driver | |
| 21 | +| `driver-kotlin-coroutine` | Kotlin Coroutines driver | |
| 22 | +| `driver-kotlin-extensions` | Kotlin driver extensions | |
| 23 | +| `driver-kotlin-sync` | Kotlin synchronous driver | |
| 24 | +| `driver-scala` | Scala driver | |
| 25 | +| `mongodb-crypt` | Client-side field-level encryption | |
| 26 | +| `bom` | Bill of Materials for dependency management | |
| 27 | +| `testing` | Shared test resources and MongoDB specifications | |
| 28 | +| `buildSrc` | Gradle convention plugins and build infrastructure | |
| 29 | +| `driver-benchmarks` | JMH and custom performance benchmarks (not published) | |
| 30 | +| `driver-lambda` | AWS Lambda test application (not published) | |
| 31 | +| `graalvm-native-image-app` | GraalVM Native Image compatibility testing (not published) | |
| 32 | + |
| 33 | +## Dependency Graph (simplified) |
| 34 | + |
| 35 | +``` |
| 36 | +bson |
| 37 | + ├── bson-kotlin |
| 38 | + ├── bson-kotlinx |
| 39 | + ├── bson-record-codec |
| 40 | + ├── bson-scala |
| 41 | + └── driver-core |
| 42 | + ├── driver-sync |
| 43 | + │ ├── driver-legacy |
| 44 | + │ ├── driver-kotlin-sync |
| 45 | + │ └── driver-lambda |
| 46 | + ├── driver-reactive-streams |
| 47 | + │ ├── driver-kotlin-coroutine |
| 48 | + │ └── driver-scala |
| 49 | + └── driver-kotlin-extensions |
| 50 | +``` |
| 51 | + |
| 52 | +## Finding the Right Module |
| 53 | + |
| 54 | +- **BSON serialization/codecs:** `bson` (or `bson-kotlin`/`bson-kotlinx`/`bson-scala` for language-specific) |
| 55 | +- **Query builders, filters, aggregates:** `driver-core` (`com.mongodb.client.model`) |
| 56 | +- **Sync Java API:** `driver-sync` |
| 57 | +- **Reactive API:** `driver-reactive-streams` |
| 58 | +- **Kotlin coroutines:** `driver-kotlin-coroutine` |
| 59 | +- **Kotlin DSL builders:** `driver-kotlin-extensions` |
| 60 | +- **Scala driver:** `driver-scala` |
| 61 | +- **Connection, protocol, auth internals:** `driver-core` (`com.mongodb.internal.*`) |
| 62 | +- **Build plugins, formatting, test infra:** `buildSrc` |
| 63 | + |
| 64 | +Each module has its own `AGENTS.md` with module-specific packages, patterns, and notes. |
0 commit comments