> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cocobase.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Welcome To Cocobase

> The Backend That Just Works - Build faster, ship sooner, scale effortlessly

# Cocobase - The Backend That Just Works

> **Build faster. Ship sooner. Scale effortlessly.**

Cocobase is a modern Backend-as-a-Service (BaaS) platform that eliminates the complexity of backend development. Focus on creating amazing user experiences while we handle your data, authentication, and infrastructure.

## Why Cocobase?

### **Lightning Fast Setup**

Go from idea to MVP in minutes, not weeks. No server configuration, no database setup, no authentication headaches.

<Tabs>
  <Tab title="JavaScript">
    ```typescript theme={null}
    import { Cocobase } from "cocobase";

    // This is literally all you need to start
    const db = new Cocobase({ 
      apiKey: "YOUR_API_KEY",
      projectId: "YOUR_PROJECT_ID" // Optional
      });

    await db.createDocument("users", {
      name: "John"
    });
    ```
  </Tab>

  <Tab title="Dart">
    ```dart theme={null}
    import 'package:coco_base_flutter/coco_base_flutter.dart';

    void main() async {
      // Create a configuration
      final config = CocobaseConfig(
        apiKey: "YOUR_API_KEY_HERE",
        // baseUrl defaults to https://api.cocobase.cc
      );

      // Initialize the database client
      final db = Cocobase(config);

      // Ready to use!
      await db.createDocument('users', {
        'name': 'John',
      });
    }
    ```
  </Tab>

  <Tab title="Go">
    ```go theme={null}
    import "github.com/cocobase-team/cocobase-go"

    // This is literally all you need to start
    client := cocobase.NewClient(cocobase.Config{
      APIKey: "your-api-key",
    })

    // Create context
    ctx := context.Background()

    doc, err := db.CreateDocument(ctx, "users", map[string]any{
      "name": "John",
    })
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    from cocobase import Cocobase

    # This is literally all you need to start
    db = Cocobase(api_key="YOUR_API_KEY")

    db.create_document("users", {
        "name": "John"
    })
    ```
  </Tab>

  <Tab title="HTTP">
    ```http theme={null}
    POST https://api.cocobase.cc/collections/users
    Authorization: Bearer YOUR_API_KEY
    Content-Type: application/json

    {
      "name": "John"
    }
    ```
  </Tab>
</Tabs>

### **Authentication Made Simple**

Built-in user management that actually works. Registration, login, sessions, and user profiles - all handled seamlessly.

<Tabs>
  <Tab title="JavaScript">
    ```typescript theme={null}
    await db.auth.register({
      email: 'user@example.com',
      password: 'securePassword123',
      data: {
        full_name: "John Doe",
        address: "123 Main Street"
      }
    });
    ```
  </Tab>

  <Tab title="Dart">
    ```dart theme={null}
    await db.auth.register(
      email: 'user@example.com',
      password: 'SecurePassword123!',
    );
    ```
  </Tab>

  <Tab title="Go">
    ```go theme={null}
    err := db.Register(ctx, "user@example.com", "securePassword123", nil)

    if err != nil {
        log.Fatal(err)
    }
    ```
  </Tab>

  <Tab title="HTTP">
    ```http theme={null}
    POST /auth/register
    Authorization: Bearer PROJECT_API_KEY
    Content-Type: application/json

    {
      "projectId": "PROJECT_ID",
      "email": "user@example.com",
      "password": "password",
      "data": {
        "role": "admin"
      }
    }
    ```
  </Tab>
</Tabs>

### **Real-time Data Management**

Store, retrieve, and manage your application data with a clean, intuitive API. No SQL knowledge required.

### **Developer Experience First**

TypeScript-native, excellent error handling, and documentation that doesn't make you cry.

## Perfect For

### **Rapid Prototyping**

Need to validate an idea quickly? Cocobase gets you from concept to working prototype in hours.

### **Mobile & Web Apps**

Build modern applications without worrying about backend complexity. Works seamlessly with React, Vue, Angular, React Native, and Flutter.

### **Startups & MVPs**

Scale from zero to thousands of users without changing a single line of backend code.

### **Solo Developers**

You're a frontend wizard but backend feels like dark magic? We've got you covered.

### **Learning Projects**

Students and bootcamp graduates can focus on learning frontend skills without backend overwhelm.

## Key Features

### **Instant Database**

* **NoSQL Collections**: Store any JSON data structure
* **Real-time Updates**: Changes sync instantly across all clients
* **Automatic Indexing**: Fast queries without database optimization headaches
* **Type Safety**: Full TypeScript support with generic types

### **Complete Authentication System**

* **User Registration & Login**: Email/password authentication out of the box
* **Session Management**: Automatic token handling and refresh
* **User Profiles**: Extensible user data with custom fields
* **Secure by Default**: Industry-standard security practices built-in

### **Developer-Friendly API**

* **Intuitive Methods**: CRUD operations that make sense
* **Error Handling**: Detailed error messages with actionable suggestions
* **Local Storage Integration**: Automatic session persistence
* **Zero Configuration**: Works immediately after installation

### **Built to Scale**

* **Global CDN**: Fast response times worldwide
* **Auto-scaling Infrastructure**: Handles traffic spikes automatically
* **99.9% Uptime**: Reliable infrastructure you can count on
* **Performance Monitoring**: Built-in analytics and monitoring

## Use Cases

### **Content Management**

Build blogs, portfolios, or documentation sites with dynamic content management.

```typescript theme={null}
// Create a blog post
await db.createDocument("posts", {
  title: "My Amazing Post",
  content: "...",
  author: currentUser.id,
  published: true,
});
```

### **E-commerce Applications**

Manage products, orders, and customer data effortlessly.

```typescript theme={null}
// Add product to cart
await db.createDocument("cart", {
  userId: user.id,
  productId: "prod-123",
  quantity: 2,
});
```

### **Social Applications**

Build social features like user profiles, posts, comments, and messaging.

```typescript theme={null}
// Create a social post
await db.createDocument("posts", {
  content: "Just shipped a new feature! 🚀",
  author: user.id,
  likes: 0,
  timestamp: new Date(),
});
```

### **Analytics Dashboards**

Store and visualize application metrics and user data.

<Tabs>
  <Tab title="JavaScript">
    ```ts theme={null}
    // Track user events
    await db.createDocument("events", {
      userId: user.id,
      event: "button_click",
      metadata: { button: "signup", page: "landing" },
    });
    ```
  </Tab>

  <Tab title="Dart">
    ```dart theme={null}
    // Track user events 
    await db.createDocument("events", { 
      "userId": user.id, 
      "event": "button_click", 
      "metadata": {
        "button": "signup", 
        "page": "landing"
      } 
    }); 
    ```
  </Tab>

  <Tab title="Go">
    ```go theme={null}
    // Track user events
    db.CreateDocument("events", 
      map[string]any{ 
        "userId": user.ID, 
        "event": "button_click", 
        "metadata": map[string]any{
          "button": "signup", 
          "page": "landing",
        }, 
      }) 
    ```
  </Tab>

  <Tab title="HTTP">
    ```http theme={null}
    POST /collections/events
    Authorization: Bearer YOUR_TOKEN
    Content-Type: application/json

    {
      "userId": "USER_ID",
      "event": "button_click",
      "metadata": {
        "button": "signup",
        "page": "landing"
      }
    }
    ```
  </Tab>
</Tabs>

## How We Compare

| Feature                  | Cocobase    | Custom Backend |
| ------------------------ | ----------- | -------------- |
| **Setup Time**           | 2 minutes   | Weeks/Months   |
| **TypeScript Support**   | Native      | DIY            |
| **Learning Curve**       | Minimal     | Very Steep     |
| **Authentication**       | Built-in    | Build it       |
| **Developer Experience** | Excellent   | Varies         |
| **Pricing**              | Transparent | Unpredictable  |

## Framework Integration

Cocobase works beautifully with all modern frameworks:

### **React/Next.js**

```typescript theme={null}
const [posts, setPosts] = useState([]);

useEffect(() => {
  db.listDocuments("posts").then(setPosts);
}, []);
```

### **Vue/Nuxt**

```typescript theme={null}
const posts = ref([]);

onMounted(async () => {
  posts.value = await db.listDocuments("posts");
});
```

### **React Native**

```typescript theme={null}
// Same API, works everywhere
const posts = await db.listDocuments("posts");
```

## Success Stories

> *"Cocobase saved us 3 months of backend development. We launched our MVP in 2 weeks and now serve 10,000+ users."*\
> **- Sarah Chen, Startup Founder**

> *"As a frontend developer, I was always intimidated by backend work. Cocobase made it feel natural and intuitive."*\
> **- Marcus Rodriguez, Full-stack Developer**

> *"We migrated from a custom Node.js backend to Cocobase and reduced our infrastructure costs by 60% while improving reliability."*\
> **- Alex Thompson, CTO**

## Getting Started

Ready to build something amazing? Here's how to get started:

1. **Visit** [cocobase.cc](https://cocobase.cc)
2. **Sign up** for a free account
3. **Create** your first project
4. **Install** the SDK: `npm install cocobase`
5. **Start building** awesome things!

```typescript theme={null}
import { Cocobase } from "cocobase";

const db = new Cocobase({ apiKey: "your-api-key" });

// You're ready to build!
```

## Resources

* **[Documentation](https://docs.cocobase.cc)** - Comprehensive guides and API reference
* **[Examples](https://github.com/cocobase-team/examples)** - Sample projects and tutorials
* **[SDK List](https://cocobase.cc/sdk)** - All Official SDK repositories
* **[Community](https://discord.gg/cocobase)** - Join our developer community

## Community & Support

* **Discord**: Join our community for real-time help
* **Twitter**: [@CocobaseHQ](https://twitter.com/cocobasehq) for updates
* **Email**: [hello@cocobase.cc](mailto:hello@cocobase.cc) for direct support
* **Issues**: Report bugs on GitHub

## Built With Love

Cocobase is crafted by developers, for developers. We understand the pain of backend complexity because we've lived it. Our mission is to make backend development as enjoyable as frontend development.

**Join thousands of developers who've already made the switch to Cocobase.**

***

## Ready to eliminate backend complexity forever?

**[Start Building Now →](https://cocobase.cc)**

*Free tier available. No credit card required.*
