{"id":"anthony0br/documentservice","name":"documentservice","scope":"anthony0br","platform":"roblox","description":"DataStores with full type checking, hooks, +more","version":"1.2.2","latest":"1.2.2","versions":["1.0.0-rc.7","1.0.0-rc.8","1.0.0-rc.9","1.0.0-rc.10","1.0.0-rc.11","1.0.0-rc.12","1.0.0","1.1.0","1.1.1","1.1.2","1.1.3","1.2.0","1.2.1","1.2.2"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{},"integrity":"79cb530ef64ba24dffbe68429852e8a33263a245be424a7819e57e77cf65d3a1","likes":0,"downloads":0,"install":"forest install anthony0br/documentservice","url":"https://forest.dev/p/roblox/anthony0br/documentservice","files":"https://api.forest.dev/ai/package/roblox/anthony0br/documentservice/files","readme":"# DocumentService - A powerful, schematised Roblox datastore library\n\nDocumentService is a strictly typed Luau library for saving data with Roblox DataStores.\nIt can be used for sesssion-locked data, such as player data, or for non-session-locked data, like\nshared groups or houses.\n\nSee the [docs](https://anthony0br.github.io/DocumentService/docs/intro) for more information.\n\n## Features\n- Fully typed API. This means you get full intellisense and typechecking on your data,\nand on every API method, including possible errors for each method.\n- Superior Rust-inspired error handling (Result types).\n- Immutable cache - preventing bugs caused by updates interfering with eachother.\n- Does auto-saves and BindToClose saves for you.\n- Migrations, inspired by nezuo's Lapis.\n- Validate your data with support for runtime and static typechecking.\n- Documents can be session-locked, or not (to allow multi-server editing).\n- Signals & hooks to 'tap in' to when operations start & finish.\n- Automatic retries with exponential backoff.\n- Migrate from no library, or another library if you're brave.\n- Checks your data can be stored in JSON to avoid silent errors.\n- Supports DataStore dependency injection - use any Mock DataStore you like.\n- Internally, completely strictly typed (Luau \"--!strict\" mode), and high\ncode quality standards with high test coverage.\n\n## Ready for production\n\nDocumentService is currently used in production in [Croydon: The London Transport Game](https://www.roblox.com/games/8265622251/V1-3-2-Croydon-The-London-Transport-Game). It powers both player data and the custom companies feature\n(these are complex shared social groups). In its first few hours it flawlessly handled over 300,000 data updates and performed tens of thousands of migrations, migrating from no library (the game originally used a different, fragile system).\n\n## Installation\n\n### Method 1: Wally\nAdd `DocumentService = \"anthony0br/documentservice@LATEST_VERSION\"` to your `wally.toml`.\n\n### Method 2: Manual\nDocumentService has no dependencies so you can just copy and paste the contents of\n`target/roblox` into your project.\n\n## Long-term goals\n- ACID transactions involving multiple Documents. Please get in touch if you can help with this!\n- See the [issues](https://github.com/anthony0br/DocumentService/issues) page to discuss ways to make DocumentService better!\n\n## Inspiration\nThis library takes inspiration from Lapis, ProfileService, keyForm, and kampfkarren's blog.\nThese are all great projects but didn't meet my needs in some way.\n\n## Contributing\nContributions are accepted. Please follow the Roblox Lua Style Guide and write unit tests.\n\nTo build for Roblox (this process is automated through a GitHub action, but in case you need it):\n1. Install necessary tools (see rokit.toml).\n2. Run `rojo sourcemap source.project.json -o sourcemap.json`. It is necessary to generate a sourcemap of the src folder so darklua can convert our requires.\n3. Run `darklua process src target/roblox`.\n\n## Contact\nMost discussions relating to this project happen on the [Roblox OSS Discord Server](https://discord.gg/rhwQFJksJD) (go to the DocumentService thread under projects).","readmeTruncated":false}