Backend
Admin Dashboard
Manage CSV importers through the web interface
Overview
The admin dashboard provides a web interface for creating and managing CSV importers. Each importer configuration is stored in the database and can be used by your frontend applications.
Creating an Importer
Basic Configuration
- Navigate to Importers: Sign in and go to the Importers section
- Create New: Click "New Importer"
- Name Your Importer: Provide a descriptive name (e.g., "Customer Data Import")
Adding Columns
Click "Add Column" to define each field in your CSV:
Column Properties
- Name: The column identifier (e.g.,
customer_id
) - Label: Display name shown to users (e.g., "Customer ID")
- Type: Data type for the column
text
: Default text fieldemail
: Email validationnumber
: Numeric valuesdate
: Date fieldsselect
: Dropdown with predefined options
Validation Rules
Add validators to ensure data quality:
- Required: Field must have a value
- Unique: No duplicate values allowed
- Min/Max Length: Text length constraints
- Min/Max Value: Numeric range constraints
- Regex: Custom pattern matching
Example validation configuration:
{
"type": "required",
"message": "Customer ID is required"
}
Transformations
Apply automatic data transformations:
- trim: Remove leading/trailing whitespace
- uppercase: Convert to uppercase
- lowercase: Convert to lowercase
- normalizePhone: Format phone numbers
- normalizeDate: Standardize date formats
Webhook Configuration
Enable webhooks to receive notifications when imports complete:
- Toggle Webhook: Enable the webhook option
- Enter URL: Provide your webhook endpoint
- Events: Webhooks are triggered on:
- Import started
- Import completed
- Import failed
Webhook payload example:
{
"event": "import.completed",
"importer_id": "uuid",
"import_id": "uuid",
"num_rows": 100,
"timestamp": "2024-01-01T00:00:00Z"
}
Managing Importers
Viewing Importers
The main dashboard shows all your importers with:
- Name and creation date
- Number of columns configured
- Webhook status
- Unique importer key
Editing Configuration
- Click on an importer to view details
- Modify columns, validation, or webhook settings
- Save changes to update the configuration
Testing with Preview
Use the preview feature to test your importer:
- Click "Preview" on any importer
- Upload a sample CSV file
- See how columns are mapped
- Test validation rules
- Verify transformations work correctly
Getting the Importer Key
Each importer has a unique key for use in your frontend:
- View the importer details
- Copy the importer key
- Use in your React application:
<CSVImporter
importerKey="your-importer-key"
apiUrl="http://your-backend-url"
onComplete={(data) => console.log(data)}
/>
Column Types Reference
Type | Description | Validation Support |
---|---|---|
text | General text input | Required, min/max length, regex |
Email addresses | Required, email format | |
number | Numeric values | Required, min/max value |
date | Date fields | Required, date format |
select | Dropdown selection | Required, predefined options |
Best Practices
- Use Clear Names: Column names should match your database schema
- Add Descriptions: Help users understand what data goes where
- Test Thoroughly: Use preview with real sample data
- Set Validation: Prevent bad data from entering your system
- Monitor Webhooks: Check webhook logs for failed deliveries