Both folders are required:
src/CometChat reads its configuration from src/builder.
This split is new in React UI Kit v7. If you are upgrading from
v6,
CometChatApp.tsx,
CometChatSettings.ts, CometChat/context/CometChatContext.tsx and
CometChat/utils/utils.ts no longer exist — see
Integration for the replacements.Project Structure Overview
1. src/CometChat/ — the CometChat sample app
The chat experience itself, built on the CometChat UI Kit. Treat this folder as vendored: read it, but make your changes through src/builder/ and your builder settings instead.
1.1 assets/
Icons and images used by the sample app’s components.
1.2 components/
Each subfolder is one screen or feature, with its .tsx and .css files:
1.3 config/ — settings plumbing
Connects your builder settings to the components:
settings.types.ts— theCometChatSettingsInterfacetype and its sub-types.defaultSettings.ts— the fallbacks, plusresolveSettings(), which merges yours over them. This is why a partial settings file is safe. It exports two sets, and the difference matters:storedSettingsDefaultsfills the gaps whenever a settings file is present, which is always in an exported app, and is what the Default column on UI Kit Builder Settings documents.defaultSettingsturns every feature on and applies only with noSettingsProviderat all — the sample app run bare.SettingsContext.tsx—SettingsProviderand theuseSettings()hook.useFeatureProps.ts— turns settings into the UI Kit component props that switch features on and off.
1.4 context/
AppContext.tsx— app-wide state such as the selected conversation, user or group.appReducer.ts— the reducer behindAppContext.
1.5 hooks/
useIsMobile.ts— switches to the single-pane layout when the chat area is narrow. It measures the app’s own container, so it works when the chat is embedded in a smaller part of your page, not only when the browser window is small.
1.6 locales/
Translation files for the sample app’s own text, one JSON file per language, collected by index.ts.
1.7 styles/
App.css— layout styles for the whole app. Imported once, fromApp.tsx.
1.8 utils/
assetUrl.ts— returns the URL of an imported image whichever bundler built it. Next.js imports images as objects rather than URLs, and this smooths that over.
1.9 decl.d.ts
TypeScript declarations that let components import .svg and .png files.
2. src/builder/ — your configuration
Owned by you. This is where the choices you made in the UI Kit Builder live.
3. src/ entry files
index.tsx— entry point. Holds your app credentials (COMETCHAT_CONSTANTS), initializes the UI Kit, and rendersAppinsideSettingsProvider.App.tsx— the app shell. Applies the theme, handles login and logout, and rendersCometChatHomeorCometChatLogin. This replaces v6’sCometChatAppcomponent and is yours to edit.
4. Root files
Where to make a change
UI Kit Builder Settings
Every setting in the JSON file, with its default.
Customizations
Go further than the settings file.