Project types
TanStack Start is the default framework for Base44 apps. Older apps use React Router. Both project types support the same Base44 features, but their project structure and server capabilities differ. Your project type depends on which of these packages appears in thedependencies of your package.json file:
- React Router:
react-router-dom - TanStack Start:
@tanstack/react-start
Project structure
In the Code Tab and when you connect to GitHub, you’ll see your complete project structure. Select the tab that matches your project type.- TanStack Start
- React Router
src
routes
__root.jsx
index.jsx
api
components
api
hooks
lib
index.css
router.jsx
routeTree.gen.ts
start.js
base44
components.json
package.json
vite.config.js
wrangler.jsonc
tailwind.config.js
AGENTS.md
CLAUDE.md
Project directories
Your project contains the following directories:-
src/: Frontend and server code for your app, organized into these directories:routes: The pages in your app. Each file is a route.api: Server routes, which are HTTP endpoints. Use them to implement backend logic, such as webhooks and workflows.
components: Reusable UI elements.api: Base44 SDK client configuration.hooks: Custom React hooks.lib: Base44 integration and shared app code, including your server functions. Theserver-fns.jsfile defines the server functions your app calls.index.css: Global styles for your app.router.jsx: Creates the router for your app.routeTree.gen.ts: The route tree that TanStack Router generates from the files inroutes. Don’t edit this file.start.js: TanStack Start configuration for your app.
-
base44/: Your Base44 project resources, with one directory for each resource. See backend project structure for more details.
Configuration files
The root directory includes all the configuration needed to run independently:package.json: Dependencies and scripts, including@base44/sdkand the TanStack Start packages.vite.config.js: Build configuration with the Base44 plugin and the TanStack Start plugin.wrangler.jsonc: Configuration for the server that runs your app.tailwind.config.js: Styling configuration.components.json: Configuration for the pre-built UI components.AGENTS.mdandCLAUDE.md: Instructions for AI coding assistants that work on your project.
Backend functions
You can run server code in your TanStack Start app instead of using Base44 backend functions. Use one of the following:- Server function: A function that runs on the server and that your frontend code calls like any other function.
- Server route: A URL path that handles HTTP requests on the server.
Run locally
Runbase44 dev from your project’s root folder to start your app together with a local backend.