.cursor/docs/references/codebase-map.md
This document provides a comprehensive overview of the Appsmith codebase structure to help Cursor AI better understand the organization and relationships between different components.
Appsmith is a low-code platform that allows developers to build internal tools and dashboards by connecting to databases, APIs, and other data sources. The application consists of:
The codebase is organized into the following main directories:
app/ - Contains the main application code
client/ - Frontend application (React)server/ - Backend application (Java Spring Boot)util/ - Shared utilitiesmonitoring/ - Monitoring and metricsThe frontend is built with React, Redux, and TypeScript. Key directories include:
actions/ - Redux actionsreducers/ - Redux reducerssagas/ - Redux sagas for side effects and async operationsselectors/ - Redux selectorsstore.ts - Redux store configurationcomponents/ - Reusable UI componentspages/ - Page-level componentswidgets/ - Draggable widgets for the page buildertheme/ - Styling and theme definitionsicons/ - SVG icons and icon componentsapi/ - API client and service functionsconstants/ - Application constants and configurationutils/ - Utility functionsentities/ - Data models and entity definitionsee/ - Enterprise Edition specific codece/ - Community Edition specific codetest/ - Test utilities and mockscypress/ - End-to-end testing with CypressThe backend is built with Java Spring Boot and MongoDB. Key packages include:
ServerApplication.java - Main application entry pointcontrollers/ - REST API controllersdtos/ - Data Transfer Objectsexceptions/ - Custom exception classesservices/ - Business logic and service implementationshelpers/ - Helper classes and utilitiesdomains/ - Domain modelsrepositories/ - Data access repositoriesconfigurations/ - Database and application configurationapplications/ - Application managementpages/ - Page managementactions/ - Action management (API, DB queries)plugins/ - Plugin system for external integrationsdatasources/ - Data source managementauthentication/ - Authentication and authorizationorganization/ - Organization managementappsmith-plugins/ - Plugin implementationsappsmith-git/ - Git integration featuresappsmith-interfaces/ - Core interfacesappsmith-ai/ - AI features implementationRedux for State Management:
Component Structure:
API Communication:
Spring Boot Architecture:
Security:
Database:
actions/reducers/sagas/components/ or pages/dtos/domains/repositories/services/controllers/The codebase is separated into:
ee/ - Enterprise featuresce/ - Community featuresKey differences:
client/src/index.tsx - Application entry pointclient/src/store.ts - Redux store configurationclient/src/App.tsx - Main application componentserver/appsmith-server/src/main/java/com/appsmith/server/ServerApplication.java - Main entry pointserver/appsmith-server/src/main/resources/application.yml - Application configurationThis map should help Cursor better understand the Appsmith codebase structure and provide more contextual assistance when working with the code.