Skip to content

Commit cc8242e

Browse files
committed
updates to readme
1 parent af0255a commit cc8242e

File tree

1 file changed

+25
-16
lines changed

1 file changed

+25
-16
lines changed

README.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,32 @@ You can use it in two ways:
99

1010
## Installation
1111

12-
Install the SDK via npm:
12+
**Inside Base44 apps**: The SDK is already available. No installation needed.
13+
14+
**External apps**: Install the SDK via npm:
1315

1416
```bash
1517
npm install @base44/sdk
1618
```
1719

18-
> **Note**: In Base44-generated apps, the SDK is already installed for you.
19-
2020
## Modules
2121

2222
The SDK provides access to Base44's functionality through the following modules:
2323

2424
- **[`agents`](https://docs.base44.com/developers/references/sdk/docs/interfaces/agents)**: Interact with AI agents and manage conversations.
25+
- **[`analytics`](https://docs.base44.com/developers/references/sdk/docs/interfaces/analytics)**: Track custom events in your app.
2526
- **[`app-logs`](https://docs.base44.com/developers/references/sdk/docs/interfaces/app-logs)**: Access and query app logs.
2627
- **[`auth`](https://docs.base44.com/developers/references/sdk/docs/interfaces/auth)**: Manage user authentication, registration, and session handling.
2728
- **[`connectors`](https://docs.base44.com/developers/references/sdk/docs/interfaces/connectors)**: Manage OAuth connections and access tokens for third-party services.
2829
- **[`entities`](https://docs.base44.com/developers/references/sdk/docs/interfaces/entities)**: Work with your app's data entities using CRUD operations.
2930
- **[`functions`](https://docs.base44.com/developers/references/sdk/docs/interfaces/functions)**: Execute backend functions.
30-
- **[`integrations`](https://docs.base44.com/developers/references/sdk/docs/type-aliases/integrations)**: Pre-built integrations for external services.
31+
- **[`integrations`](https://docs.base44.com/developers/references/sdk/docs/type-aliases/integrations)**: Access pre-built and third-party integrations.
3132

32-
## Quick starts
33+
## Quickstarts
3334

34-
How you get started depends on your context:
35+
How you get started depends on whether you're working inside a Base44-generated app or building your own.
3536

36-
### Inside a Base44 app
37+
### Inside Base44 apps
3738

3839
In Base44-generated apps, the client is pre-configured. Just import and use it:
3940

@@ -58,32 +59,32 @@ const tasks = await base44.entities.Task.list();
5859

5960
### External apps
6061

61-
When using Base44 as a backend for your own app, create and configure the client yourself:
62+
When using Base44 as a backend for your own app, install the SDK and create the client yourself:
6263

6364
```typescript
64-
import { createClient } from '@base44/sdk';
65+
import { createClient } from "@base44/sdk";
6566

6667
// Create a client for your Base44 app
6768
const base44 = createClient({
68-
appId: 'your-app-id' // Find this in the Base44 editor URL
69+
appId: "your-app-id", // Find this in the Base44 editor URL
6970
});
7071

71-
// Read public data (anonymous access)
72+
// Read public data
7273
const products = await base44.entities.Products.list();
7374

7475
// Authenticate a user (token is automatically set)
75-
await base44.auth.loginViaEmailPassword('user@example.com', 'password');
76+
await base44.auth.loginViaEmailPassword("user@example.com", "password");
7677

77-
// Now operations use the authenticated user's permissions
78+
// Access user's data
7879
const userOrders = await base44.entities.Orders.list();
7980
```
8081

8182
### Service role
8283

83-
For backend code that needs admin-level access, use the service role. Service role is only available in Base44-hosted backend functions:
84+
By default, the client operates with user-level permissions, limiting access to what the current user can see and do. The service role provides elevated permissions for backend operations and is only available in Base44-hosted backend functions. External backends can't use service role permissions.
8485

8586
```typescript
86-
import { createClientFromRequest } from 'npm:@base44/sdk';
87+
import { createClientFromRequest } from "npm:@base44/sdk";
8788

8889
Deno.serve(async (req) => {
8990
const base44 = createClientFromRequest(req);
@@ -97,7 +98,15 @@ Deno.serve(async (req) => {
9798

9899
## Learn more
99100

100-
For complete documentation, guides, and API reference, visit the **[Base44 SDK Documentation](https://docs.base44.com/developers/landing)**.
101+
The best way to get started with the JavaScript SDK is to have Base44 build an app for you. Once you have an app, you can explore the generated code and experiment with the SDK to see how it works in practice. You can also ask Base44 to demonstrate specific features of the SDK.
102+
103+
For a deeper understanding, check out these guides:
104+
105+
1. [Base44 client](https://docs.base44.com/developers/references/sdk/getting-started/client) - Work with the client in frontend, backend, and external app contexts.
106+
2. [Work with data](https://docs.base44.com/developers/references/sdk/getting-started/work-with-data) - Create, read, update, and delete data.
107+
3. [Common SDK patterns](https://docs.base44.com/developers/references/sdk/getting-started/work-with-sdk) - Authentication, integrations, functions, and error handling.
108+
109+
For the complete documentation and API reference, visit the **[Base44 Developer Docs](https://docs.base44.com/developers/home)**.
101110

102111
## Development
103112

0 commit comments

Comments
 (0)