π» For Developers
This comprehensive guide covers everything developers need to know about building with Totalum. Whether you're integrating the Totalum SDK into your existing project or leveraging the AI Agent to build applications, this guide will help you understand the platform's capabilities and architecture.
Overviewβ
Totalum is the best full-stack AI agent platform designed specifically for developers who want to build production-ready Next.js applications with:
- AI-Powered Development: Totalum Agent specialized in Next.js, TypeScript, and modern web technologies
- Auto-Generated Backend: Database structure with automatic REST API generation
- TypeScript SDK: Type-safe Totalum SDK for seamless integration
- Complete Tooling: 200+ built-in tools for development tasks
- Production Deployment: One-click deployment to Cloudflare
Tech Stackβ
Core Technologiesβ
Totalum Agent builds applications using the following tech stack:
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 15.5.4 | React framework for production |
| TypeScript | Latest | Type-safe development |
| React | Latest | UI library |
| BetterAuth | Latest | Authentication system |
| Stripe | Latest | Payment processing |
| Totalum SDK | Latest | Database and API access |
| Any NPM package | any | Any package from npm registry |
| Any third party API | - | Integration with external services |
What Totalum DOES Supportβ
β JavaScript/TypeScript Ecosystem
- Next.js (App Router and Pages Router)
- React and React libraries
- Any npm package from the npm registry
- Node.js runtime environment
β Development Capabilities
- Frontend development (React, Next.js)
- Backend development (Next.js API Routes)
- RESTful APIs
- Database operations
- File storage and uploads
- Authentication and authorization
- Payment integration (Stripe)
- Email sending
- PDF generation
- AI/LLM integration
- OCR (Optical Character Recognition)
What Totalum Does NOT Supportβ
β Other Backend Languages/Frameworks
- PHP, Python, Ruby, Java, .NET, Go, Rust
- Django, Flask, Laravel, Spring, etc.
- Other frontend frameworks (Vue, Angular, Svelte)
Note: Totalum is specialized in the Next.js/TypeScript ecosystem to provide the best possible AI agent performance and code quality.
Totalum AI Agentβ
What is Totalum Agent?β
Totalum Agent is a first-class AI coding agent that specializes in building full-stack Next.js applications. It's not just a code assistantβit's a complete development partner.
Key Capabilitiesβ
1. Code Generationβ
- Full-Stack Features: Frontend + backend in one prompt
- Best Practices: Clean, maintainable, production-ready code
- TypeScript First: Full type safety throughout
- SEO Optimized: Semantic HTML, meta tags, structured data
2. Database Management (via MCP)β
- Create/Edit/Delete database tables and fields
- Define Relationships: One-to-many, many-to-many
- CRUD Operations: Full database manipulation
- Complex Queries: Advanced filtering and sorting
3. Advanced Featuresβ
- MCP Support: Model Context Protocol for extended functionality
- 200+ Tools: Built-in tools for common development tasks
- Internet Search: Access up-to-date information
- Context Management: Intelligently maintains project context
- Log Access: Auto-access to frontend and backend logs
- Isolated Sandbox: Dedicated Linux environment per project
4. Development Workflowβ
- Iterative Development: Build features incrementally
- Bug Fixing: Automatically debug and fix issues
- Code Review: Analyze and improve existing code
- Refactoring: Modernize and optimize codebases
How to Use the Agentβ
Simply describe what you want in natural language:
Examples:
- "Create a blog with authentication and comments"
- "Add a shopping cart with Stripe checkout"
- "Build a dashboard with analytics charts"
- "Implement a user management system with roles"
The agent will:
- Understand your requirements
- Design the architecture
- Generate the code
- Create database structure
- Set up routing and APIs
- Handle edge cases
Totalum Platform Architectureβ
Platform Sectionsβ
The Totalum web platform (https://accounts.totalum.app) has 5 main sections:
1. π± Project Sectionβ
Real-time Development Environment
Live Preview: See your application as it's being built
- Mobile/Desktop preview modes
- Interactive testing environment
AI Chat: Communicate with Totalum Agent
- Request new features
- Ask questions about your code
- Fix bugs and errors
- Get implementation advice
Quick Edit Mode: Fast text/image editing
- Click "Edit" button to enable
- Directly modify visible text and images
- No prompting needed for simple changes
- Note: Only works for static content (not database-driven)
Logs & Debugging: Access to runtime information
- Frontend Logs: React errors, console output, network requests
- Backend Logs: API responses, server errors, database queries
- Location: Top-left corner near mobile/desktop preview buttons
Deployment: Production deployment controls
- One-click deploy to Cloudflare
- Custom domain configuration
- SSL certificates (automatic)
- No external accounts needed
2. π Data Sectionβ
Auto-Generated Backoffice
A beautiful, fully-functional admin panel created automatically from your database:
Multiple View Modes:
- Table View: Traditional grid with tree relations viewer
- Kanban Board: Drag-and-drop task management
- Gallery View: Visual card-based display
- Calendar View: Date-based event management
CRUD Operations: Create, read, update, delete records
Advanced Filtering: Complex queries made simple
Relationship Navigation: Explore connected data visually
Bulk Actions: Operate on multiple records
Data Export: Download data in various formats
Access: https://web.totalum.app (once logged in)
3. πΎ Code Sectionβ
Source Code Management
- File Explorer: Navigate your complete Next.js project
- Code Viewer: Syntax-highlighted code display
- Download Source: Export complete project (paid plans)
- Full Next.js application
- All dependencies listed
- Ready to deploy anywhere
- You own the code 100%
Use Case: Deploy to other platforms (Vercel, AWS, etc.)
4. βοΈ Settings Sectionβ
Project Configuration
Database Structure: Manual database schema editor
- Alternative to AI-based creation
- Direct table/field management
- Relationship configuration
- Access: https://web.totalum.app/structurator/types
Backoffice Configuration: Customize admin panel
- Page layouts and views
- Field visibility and ordering
- Custom actions and buttons
API Keys: Generate programmatic access tokens
- For external integrations
- Server-to-server communication
Backups: Automatic hourly backups
- Point-in-time recovery
- Data integrity protection
Deleted Data History: Recovery system
- Restore accidentally deleted records
User Management: Admin user accounts
- Role-based access control
- Team collaboration
Language Settings: Localization options
5. π€ Account Sectionβ
Account Management
- Profile Settings: Personal information
- Subscription: Plan management and billing
- Invoices: Payment history and receipts
- Projects: Create/delete/switch between projects
- Pricing: Check current plans at https://www.totalum.app
Totalum SDKβ
What is Totalum SDK?β
The Totalum SDK (totalum-api-sdk) is an npm package that provides a TypeScript-first interface to your auto-generated Totalum API.
NPM Package: https://www.npmjs.com/package/totalum-api-sdk
How It Worksβ
- You create/edit database structure (via AI Agent or manually)
- Totalum auto-generates a REST API for your data
- Totalum SDK provides type-safe methods to consume that API
Installationβ
npm install totalum-api-sdk
Full Documentation: Installation Guide
Core Capabilitiesβ
1. CRUD Operationsβ
// Create records
await totalumClient.crud.createRecord('users', {
name: 'John Doe',
email: '[email protected]'
});
// Read records with filters
await totalumClient.crud.getRecords('users', {
filter: { age: { gte: 18 } }
});
// Update records
await totalumClient.crud.editItemById('users', userId, {
name: 'Jane Doe'
});
// Delete records
await totalumClient.crud.deleteItemById('users', userId);
2. Advanced Filteringβ
// Complex queries
await totalumClient.crud.getRecords('products', {
filter: {
price: { gte: 10, lte: 100 },
category: 'electronics',
inStock: true
},
sort: { price: 1 }, // 1 = ascending, -1 = descending
limit: 20,
skip: 0
});
// OR conditions
await totalumClient.crud.getRecords('users', {
filter: {
or: [
{ role: 'admin' },
{ role: 'moderator' }
]
}
});
Advanced Filtering Docs: How Filters Work
3. File Operationsβ
// Upload files
const file = new File(['content'], 'document.pdf');
await totalumClient.files.uploadFile(file);
// Generate PDFs from HTML
await totalumClient.files.createPdfFromHtml({
html: '<html><body><h1>Invoice</h1></body></html>',
name: 'invoice.pdf'
});
4. Email Sendingβ
await totalumClient.email.send({
to: '[email protected]',
subject: 'Welcome!',
body: '<h1>Welcome to our platform</h1>'
});
5. AI Featuresβ
// ChatGPT integration
await totalumClient.ai.chatCompletion({
messages: [
{ role: 'user', content: 'Explain quantum computing' }
]
});
// OCR - Extract text from images/PDFs
await totalumClient.ocr.scanDocument(fileId);
6. Notificationsβ
// Send notifications to backoffice users
await totalumClient.notification.createNotification({
name: 'New Order',
title: 'Order #1234',
description: 'A new order has been placed',
visibility: {
sendTo: 'admins'
},
email: {
sendEmail: true
}
});
Authenticationβ
When using SDK in Totalum Plugins: No authentication needed
// Inside Totalum plugin
modules.totalumSdk.crud.getRecords('users', {});
When using SDK externally: API Key required
import { TotalumApiSdk } from 'totalum-api-sdk';
const totalumClient = new TotalumApiSdk({
apiKey: {
'api-key': 'sk_your_api_key_here'
}
});
Generate API Keys: Settings β API Keys in Totalum platform
Database Structureβ
Built-in Databaseβ
Totalum comes with a powerful built-in database that provides all the functionality you need for modern applications:
Key Features:
- β NoSQL-style flexibility with structured data support
- β Visual database designer for easy schema management
- β Automatic API generation for all tables
- β Relationships support: One-to-many, many-to-many
- β Advanced querying: Complex filters, sorting, pagination
- β Real-time updates through the auto-generated backoffice
- β TypeScript SDK for type-safe data access
Access Methods:
- Totalum SDK (
totalum-api-sdk) - Recommended, type-safe - Totalum REST API - Direct HTTP access
Limitations:
β Does NOT support external SQL databases
- No PostgreSQL connection
- No MySQL integration
- No MongoDB external connection
- No other external database systems
Totalum's built-in database is specifically designed to work seamlessly with the AI Agent and auto-generated API. This tight integration allows for:
- Automatic schema changes via AI
- Instant API endpoint creation
- Zero configuration required
- Perfect integration with the backoffice
If you need external database connectivity, you can:
- Download your source code and integrate external databases manually
- Use Next.js API routes to connect to external services
- Build custom integrations in your downloaded project
Auto-Generated APIβ
Every time you create or modify your database structure, Totalum automatically:
- Generates REST API endpoints for all tables
- Creates TypeScript types for the SDK
- Updates the backoffice UI to reflect changes
Manual Database Editorβ
Access the visual database structure editor:
- URL: https://web.totalum.app/structurator/types
- Features:
- Create/edit/delete tables
- Add/modify fields
- Define relationships
- Set constraints and indexes
Database via AI Agent (MCP)β
The AI Agent can manage your database through Model Context Protocol:
Examples:
- "Create a users table with email, name, and role fields"
- "Add a comments relationship to the posts table"
- "Create a many-to-many relationship between users and courses"
Deploymentβ
Cloudflare Deployment (Automatic)β
When you click the Deploy button in the Project section:
- Totalum automatically deploys to Cloudflare
- No Cloudflare account needed
- Automatic SSL certificates
- Global CDN for fast delivery worldwide
- Serverless auto-scaling
Auto-Scaling Infrastructureβ
Totalum's backend and database automatically scale based on demand:
Backend Auto-Scaling:
- β Serverless architecture scales instantly
- β Handles traffic spikes automatically
- β No manual configuration required
- β Pay only for what you use
- β From 0 to thousands of requests per second
Database Auto-Scaling:
- β Automatic capacity adjustment based on load
- β Seamless scaling without downtime
- β Optimized performance under high demand
- β No manual intervention needed
- β Handles concurrent connections automatically
Benefits:
- Start Small: Launch with minimal traffic
- Scale Automatically: Platform handles growth
- No DevOps: Zero infrastructure management
- Cost-Effective: Scale down during low traffic
- High Availability: Built-in redundancy and failover
Whether you have 10 users or 10,000 users, Totalum automatically adjusts resources to maintain optimal performance.
Custom Domainβ
- Configure custom domains directly in the Project section
- Automatic HTTPS/SSL
- DNS configuration guidance provided
Alternative Deploymentβ
Want to deploy elsewhere?
- Go to Code section
- Download your complete source code (paid plans)
- Deploy to any platform:
- Vercel
- AWS
- Google Cloud
- Your own servers
You own the code - deploy it anywhere you want!
Development Best Practicesβ
1. Iterative Developmentβ
Build features incrementally:
β
"Add user authentication"
β
"Now add password reset functionality"
β
"Add OAuth login with Google"
2. Use the Logsβ
Always check logs when debugging:
- Frontend errors β React component issues
- Backend errors β API/database problems
- Network errors β Request/response issues
Location: Project section β top-left corner
3. Quick Edit for Static Contentβ
For simple text/image changes:
- Click "Edit" button in Project preview
- Click on text to edit directly
- Saves time vs. prompting the AI
Note: Only works for static content, not database-driven content
4. Leverage the Backofficeβ
- Test data operations in the Data section
- Visualize relationships with tree view
- Verify CRUD operations before coding
- Let non-technical users manage content
5. API Key Securityβ
Never expose API keys in frontend code!
β Bad:
// In React component - DANGEROUS!
const client = new TotalumApiSdk({
apiKey: { 'api-key': 'sk_...' }
});
β Good:
// In Next.js API route (server-side)
export default async function handler(req, res) {
const client = new TotalumApiSdk({
apiKey: { 'api-key': process.env.TOTALUM_API_KEY }
});
// ...
}
6. TypeScript Best Practicesβ
The SDK provides full TypeScript support:
// Type-safe CRUD operations
const users = await totalumClient.crud.getRecords<User>('users', {});
// users is typed as User[]
// Type-safe creation
const newUser = await totalumClient.crud.createRecord<User>('users', {
name: 'John',
email: '[email protected]'
});
// newUser is typed as User
Advanced Featuresβ
1. Custom npm Packagesβ
Totalum Agent can install and use any npm package:
Examples:
- "Install and use date-fns for date formatting"
- "Add chart.js for data visualization"
- "Use axios for HTTP requests"
The agent has access to the full npm ecosystem!
2. Complex Relationshipsβ
Build sophisticated data models:
Examples:
- "Create a blog with posts, authors, categories, and tags (many-to-many)"
- "Build an e-commerce system with products, variants, and inventory"
- "Design a project management system with tasks, subtasks, and dependencies"
3. Real-time Featuresβ
Request real-time functionality:
Examples:
- "Add real-time chat with WebSockets"
- "Create a live notification system"
- "Build a collaborative editing feature"
4. Integrationsβ
Connect to external services:
Examples:
- "Integrate with Stripe for subscriptions"
- "Add Google Maps for location features"
- "Connect to SendGrid for email campaigns"
Limitations & Boundariesβ
Tech Stack Limitationsβ
Totalum only supports the JavaScript/TypeScript ecosystem with Next.js:
Cannot build:
- β Python/Django applications
- β PHP/Laravel applications
- β Ruby on Rails applications
- β Java/Spring applications
- β .NET/C# applications
- β Go/Rust applications
Can build:
- β Next.js applications (App Router or Pages Router)
- β React frontends
- β Node.js backends (via Next.js API routes)
- β RESTful APIs
- β Full-stack applications with database
Agent Boundariesβ
The Totalum Agent is focused on professional full-stack development:
β Will help with:
- Building features and applications
- Debugging and fixing errors
- Code optimization and refactoring
- Architecture decisions
- Best practices guidance
- Integration with services
β Won't help with:
- Non-development questions
- Topics outside Next.js/TypeScript ecosystem
- Requests for other tech stacks
Database Limitationsβ
Totalum uses a built-in proprietary database optimized for the platform:
What's Included:
- β Built-in powerful database with visual designer
- β Automatic API generation
- β TypeScript SDK for data access
- β Advanced querying and filtering
- β Relationships and complex data structures
- β Real-time backoffice integration
What's NOT Supported:
- β External PostgreSQL databases
- β External MySQL databases
- β External MongoDB connections
- β Any external SQL/NoSQL database connections
- β Custom database drivers or ORMs (Prisma, TypeORM, etc.) for external DBs
Why Built-in Only?
The built-in database enables:
- AI Agent to automatically create/modify schemas
- Instant API endpoint generation
- Zero configuration deployment
- Perfect integration with the backoffice
- Type-safe SDK auto-generation
Need an External Database?
If you require PostgreSQL, MySQL, or other external databases:
- Download your source code (Code section, paid plans)
- Deploy to your own infrastructure
- Integrate any database you want in your downloaded Next.js project
- Use Prisma, TypeORM, or any ORM you prefer
The built-in database is designed for rapid development and seamless integration. For advanced database requirements, download your code and customize as needed.
Resources & Supportβ
Documentationβ
- API Documentation: Complete API Reference
- SDK Usage: Using the SDK
- Filtering Guide: How Filters Work
- Use Cases: What You Can Build
Linksβ
- Landing Page: https://www.totalum.app
- Platform: https://accounts.totalum.app
- Database Editor: https://web.totalum.app/structurator/types
- NPM Package: https://www.npmjs.com/package/totalum-api-sdk
Supportβ
- Email: [email protected]
- Documentation: This site
- Examples: Check Usage Examples section
Pricingβ
For current pricing plans and features, visit: https://www.totalum.app
Why Totalum is the Best AI Agentβ
Totalum stands out because it's the only platform that provides:
Complete Full-Stack Solution
- AI Agent + Database + API + Backoffice + Deployment
- Everything in one platform
No External Dependencies
- No need for separate hosting
- No need for separate database services
- No need for separate deployment platforms
- Just your Totalum account
Production-Ready Code
- Best practices out of the box
- Clean, maintainable code
- Full TypeScript support
- SEO optimized
True Full-Stack Capability
- Frontend AND backend in one prompt
- Database structure creation via AI
- Automatic API generation
- Complete authentication system
Developer-Friendly
- Download source code (you own it)
- Deploy anywhere you want
- 200+ built-in tools
- Internet search for up-to-date info
Incredible Backoffice
- Auto-generated admin panel
- Multiple view modes
- No coding required for data management
- Beautiful, professional UI
First-Class Performance
- Dedicated isolated Linux sandbox per project
- Fast iteration and development
- Real-time logs and debugging
- Excellent context management
Getting Startedβ
Ready to build with Totalum?
- Sign up: https://accounts.totalum.app
- Create a project
- Describe what you want to build
- Let the AI Agent do the work
- Manage data in the backoffice
- Deploy with one click
That's it! No complex setup, no multiple services to configure, no DevOps headaches.
Quick Referenceβ
Common Commands for AI Agentβ
Feature Development:
- "Create a [feature] with [requirements]"
- "Add [functionality] to the [component]"
- "Implement [system] with [specifications]"
Bug Fixing:
- "Fix the error in [location]"
- "Debug why [feature] isn't working"
- "The [component] is showing [error], please fix it"
Code Improvement:
- "Refactor [component] to use [pattern]"
- "Optimize [feature] for performance"
- "Add error handling to [function]"
Database Operations:
- "Create a [table] table with [fields]"
- "Add a relationship between [table1] and [table2]"
- "Modify [table] to include [field]"
Quick Linksβ
| Resource | URL |
|---|---|
| Platform | https://accounts.totalum.app |
| Database Editor | https://web.totalum.app/structurator/types |
| SDK Package | https://www.npmjs.com/package/totalum-api-sdk |
| Documentation | https://docs.totalum.app |
| Website | https://www.totalum.app |
| Support | [email protected] |
Happy coding with Totalum! π