erquhartE
Convex Community7mo ago
19 replies
erquhart

Looks similar to Sara's solution, but a

Looks similar to Sara's solution, but a bit different:
├── convex/
│   ├── db                    # No endpoints (Convex functions) in this directory, "helpers" only
│   │   ├── index.ts          # Barrel export, so the db object can be used across endpoints
│   │   ├── [tableName].ts    # Simple table, everything in one file
│   │   ├── [tableName]       # Table with a lot of operations, use a directory
│   │   │   ├── index.ts      # Table schema, indexes, authorization stuff
│   │   │   ├── read.ts
│   │   │   ├── write.ts      # Writes have a lot going on, worked well in a dedicated file
│   │   │   ├── delete.ts     # Some tables with cascading deletes were busy enough for a dedicated deletes file
Was this page helpful?