Angular Quickstart
Use this pre-built prompt to get started faster with Angular.
Alternatively, follow these steps to manually add ExpressCSV to an Angular app and relay imports to your existing backend.
-
Install the SDK
-
On your backend: create a session endpoint 🔒
Create a small backend route that:
- Exchanges your ExpressCSV secret key for a short-lived session token
- Is called from your frontend right before the importer opens
For example, in a Hono backend:
-
On your frontend: define your import schema
Describe the columns you want to accept:
- Field types control parsing and validation
- Labels and rules shape the importer experience
-
On your frontend: open the importer
The example below shows how to open the importer from the client and send validated rows in chunks.
-
Render the component from your app shell
Saving imported rows
How you save imported rows on the backend is up to you. A recommended pattern:
- Add an import chunk staging table with
sessionId,deliveryId, andchunkIndexcolumns plus a JSON column for the chunk payload (e.g.records), separate from your business tables:
- On each chunk POST, upsert a staging row keyed by
(sessionId, deliveryId, chunkIndex)from the request body and storerecordsin the JSON column. Retries update the same row instead of inserting a duplicate:
- Wait for the last chunk before writing to your business tables:
onError: delete staged chunks for thedeliveryIdwhen delivery fails partway through.onCancel: delete staged chunks for thesessionIdwhen the user cancels.
See Delivery for the import chunk staging table, writing the uploaded records to your target table(s) from staged JSON, and idempotent chunk writes.
What's Next
- Session tokens: keep your secret key on the backend and return fresh importer tokens
- Delivery: store chunk JSON, write uploaded records to target tables when the ledger is complete, clean up aborted sessions
- Types: define field types, validation rules, and inferred row types
- Column matching: map messy CSV headers to your schema fields
- Prompted edits: let users clean imported values with prompts