Easy Setup
Create an account, obtain an API Token, and hit the ground running. Just a quick read through Getting Started guide (2 mins read) equips you with all you need.
Zero-config REST Backend. Fully customizable and Type-Safe.
const Collect = new CollectSDK("TOKEN")
// Done ✅
Create an account, obtain an API Token, and hit the ground running. Just a quick read through Getting Started guide (2 mins read) equips you with all you need.
Collect aims to make development completely routine-free. Whether you've just started or are already working on something big, Collect seamlessly integrates into your existing development process. It adapts to your needs through the Dashboard, APIs, and SDKs.
Obtain an API Token through the Dashboard and you're good to go. Optionally, define Models to benefit from automated type inference. Collect is designed to process data of any shape.
// Simple as that
const Collect = new CollectSDK("API_TOKEN")
// Optionally define Models
const UserModel = new CollectModel("USER", {
name: { type: 'string' },
email: { type: 'string', uniq: true },
age: { type: 'number', required: false },
permissions: { type: 'string', multiple: true },
createdAt: {
type: 'datetime',
default: new Date().toISOString
}
})
const UserRepo = Collect.registerModel(UserModel)
Whether you're pushing a single Record or importing thousands of them, do it in milliseconds. Your data’s shape doesn’t constrain you because Collect adapts to it on the fly.
// Create single Record
const user = await UserRepo.create({
email: "paul.schmitz@mail.com",
name: "Paul Schmitz",
age: 47
})
// Create multiple Records at once
const catalog = await Collect.records.createMany(
"CATEGORY",
[
{
title: "Sports and Travel",
sidebarOrder: 5
// Related Records
PRODUCT: [
{
name: "Portable Gas Stove"
price: 65
},
{
name: "Sleeping Bag XL"
price: 29
},
]
}
]
)
Precisely fetch any piece of data regardless of its complexity. Thanks to graph architecture and algos behind. Build complex queries effortlessly using Related Search capabilities, $AND
, $OR
,$NOT
, $XOR
operators and others.
// Basic search
const customers = await CustomerRepo.find({
where: {
createdAt: {
$gte: {
$year: 2021,
$month: 6
}
},
name: {
$startsWith: "P"
}
},
orderBy: { balance: "asc" }
})
// Related search
const orders = await OrderRepo.find({
where: {
sum: { $gt: 641 },
PRODUCT: {
brand: "Apple",
CATEGORY: {
title: "Accessories"
}
}
}
})
Having a CRUD is obvious. For complex changes, Collect's transaction feature safeguards data’s consistency and reliability, making intricate updates straightforward and predictable.
// Start Transaction
const tx = await Collect.tx.begin()
try {
const order = await OrderRepo.create(
{...},
tx // <-- Transaction
)
const merchant = await MerchantRepo.findOne(
{...},
tx // <-- Transaction
)
const { balance } = merchant.data
await merchant.update(
{
balance: balance + order.data.sum
},
tx // <-- Transaction
)
// Commit Transaction
await tx.commit()
} catch (error) {
// Rollback Transaction if error occurred
await tx.rollback()
}
Like most other operations, deletion also relies on the same API. It allows data to be wiped out precisely based on specific criteria.
// Delete Records based on complex criteria
await CommentsRepo.delete({
where: {
text: {
$in: [ "^*%&#", "@#*%&#", "$#@&&%" ]
},
USER: {
email: "rude.troll@mail.com"
}
}
})
New functionalities in Collect are inspired by the real-world needs of our users. Have a suggestion? Let us know. Your input could spark our next big feature.
Read the latest news and product updates from the Collect Blog.
Join our Discord community to chat with other developers and the Collect team.
Stay up to date with the latest news from Collect.
Dive into our GitHub repository to contribute, explore issues, and suggest enhancements.
Choose Collect's cloud platform for a straightforward start to your projects. It's ready to use immediately, eliminating the need for initial configurations and ongoing infrastructure management. Suitable for developers of any skill level, this option allows you to concentrate fully on development, with scalability to match your project's growth. Discover our cloud pricing plans for a solution that simplifies your workflow from the outset.
Forever
Monthly
Contact sales