Data & Backend
Working with Data
Webase apps store real data using built-in data models backed by MongoDB. Once your app has data models defined, you can create, read, update, and delete records — plus upload images, import data from files, and attach documents.
CRUD Operations
Every data model supports standard create, read, update, and delete operations. Your generated app interacts with data through the DataService, which the AI sets up automatically when you describe data-driven features.
- Create — Add new records through forms, modals, or inline inputs in your app's UI.
- Read — Display records in tables, lists, cards, or any layout. Data is fetched from the API and rendered in real-time.
- Update — Edit existing records through edit forms or inline editing. Changes are saved to the database immediately.
- Delete — Remove records with confirmation dialogs to prevent accidental deletion.
Tip: You can ask the AI to add any of these operations through chat. For example, "Add an edit button to each row in the contacts table that opens an edit form" or "Add a delete button with a confirmation dialog."
Uploading Images
Data models can include Image fields that support two methods of adding images:
Direct Upload
Upload images from your device using a file picker. Supported formats include JPEG, PNG, GIF, and WebP. Images are stored and served through Webase's infrastructure.
Unsplash Integration
Search and select high-quality stock photos from Unsplash directly within your app. The selected image URL is saved to the Image field without needing to download and re-upload.
CSV and Excel File Uploads
You can bulk-import data into your data models by uploading CSV or Excel files. This is useful for migrating existing data or populating your app with initial records.
- CSV files — Upload a
.csvfile and map its columns to your data model's fields. - Excel files — Upload
.xlsxfiles with the same column-mapping workflow. - Column matching — Webase automatically matches column headers to field names where possible. You can adjust mappings before confirming the import.
Note: Imported data follows the same validation rules as manually created records. Any rows that don't match the expected field types will be skipped with an error summary.
File Attachments
Data models can also include Attachment fields for storing documents and files of any type. This is useful for apps that need to manage PDFs, spreadsheets, presentations, or other documents alongside structured data.
- Upload files using a standard file picker in your app's forms.
- Attached files are stored securely and accessible via download links.
- Each record can have multiple attachment fields if your data model requires it.
Data Field Types
When defining data models, you can use these field types to structure your data:
- String — Short text (names, titles, labels).
- Text — Long-form text (descriptions, notes, comments).
- Number — Numeric values (prices, quantities, scores).
- Boolean — True/false values (completed, active, published).
- Date — Date values (due dates, birthdays, created dates).
- URL — Web addresses (websites, social links).
- Image — Image uploads with direct and Unsplash support.
- Attachment — File uploads for documents and other files.
- Single Select — Dropdown with predefined options (status, category, priority).