Real-time group collaboration
PartyKit is optimized for high-performance and offers real-time sharing capabilities through websockets and CloudFlare workers.
Adding Fireproof to your PartyKit setup is straightforward. It requires only a single line of configuration and operates in its own room. This means you can easily integrate it with existing PartyKit applications.
First, install the Fireproof PartyKit connector:
npm install @fireproof/partykit
Second, configure the Fireproof party in your app's `partykit.json`
:
{
"name": "MY_APP_NAME",
"main": "src/partykit/server.ts",
"parties": {
"fireproof": "node_modules/@fireproof/partykit/src/server.ts"
}
}
Now when you launch or deploy your PartyKit app, it will automatically include the Fireproof functionality in a dedicated party.
npx partykit dev
Finally, connect the database to your PartyKit server in the front-end code:
import { fireproof } from 'use-fireproof'
import { connect } from '@fireproof/partykit'
const database = fireproof('poetry-party')
connect.partykit(database, process.env.NEXT_PUBLIC_PARTYKIT_HOST)
That's it! Your Fireproof database will sync across all your PartyKit users. Check out the magnetic poetry app's code and jump to the Fireproof PartyKit connector docs to learn more.
Use your existing cloud
Fireproof works with any storage, and we offer an AWS S3 connector so you can allow uploads via Lambda, from across the web without compromising your security or data integrity.
Check out the S3 connector documentation and jump to the Fireproof AWS S3 bucket SAM template to learn more.
Save money with user-owned data
Fireproof's encrypted immutable data model works with IPFS so you can archive Fireproof snapshots alongside Filecoin data, and use the latest web3.storage APIs to store updates. User-owned storage accounts mean your app can go viral without costing you anything.
Check out the IPFS connector docs and try out a photo upload demo. Watch the video demo to see how it works.