# Project structure Each integration is a directory. Each executable file default-exports one definition. ```text browserlayer.config.ts integrations/travel/ browserlayer.json endpoints/ cancel-booking.ts syncs/ bookings.ts connector/ references/ booking.ts flows/ authenticate.ts reauthenticate.ts list-bookings.ts site/ login.ts bookings.ts models/ booking.ts tests/ fixtures/ bookings.test.ts ``` ## Register the source directory `browserlayer.config.ts`: ```ts export default { integrations: { travel: { source: "integrations/travel", tests: ["tests"] }, }, }; ``` This selects integration directories. Functions inside them are discovered automatically. ## Connection state `integrations/travel/browserlayer.json`: ```json { "connectionStateVersion": 1 } ``` Required when `authenticate.ts` exists. Increment for an incompatible change to saved connection data. This file contains no function registry. | Directory | Export | Responsibility | | ------------------ | ------------------ | --------------------------------------- | | `endpoints/` | `createEndpoint` | App input/output and on-demand behavior | | `syncs/` | `createSync` | Model mapping, publication and schedule | | `connector/flows/` | `createFlow` | Reusable, resumable website work | | `connector/site/` | Ordinary functions | Selectors, HTTP requests, parsing | | `models/` | Zod schemas | App-facing records | Function directories are flat. Use kebab-case filenames. Renaming an endpoint or sync changes its public identity. Helpers do not need to become flows. Use [typed references](/docs/references) when public records need stable IDs for later operations. Models remain ordinary Zod schemas.