You don't have to use Atomic-Server and ditch your existing projects or apps, if you want to adhere to Atomic Data specs.
As the Atomic Data spec is modular, you can start out simply and conform to more specs as needed:
- Map your JSON keys to new or existing Atomic Data properties
@idfields to your resources, make sure these URLs resolve using HTTP
- Implement parts of the Extended spec
There's a couple of levels you can go to, when adhering to the Atomic Data spec.
If you want to make your existing project compatible with Atomic Data, you probably don't have to get rid of your existing storage / DB implementation. The only thing that matters, is how you make the data accessible to others: the serialization. You can keep your existing software and logic, but simply change the last little part of your API.
In short, this is what you'll have to do:
Map all properties of resources to Atomic Properties.
Either use existing ones, or create new ones.
This means: take your JSON objects, and change things like
That's it, you've done the most important step!
Now your data is already more interoperable:
- Every field has a clear semantic meaning and datatype
- Your data can now be easily imported by Atomic Data systems
Make sure that when the user requests some URL, that you return that resource as a JSON-AD object (at the very least if the user requests it using an HTTP
Accept: application/ad+json header).
- Your data can now be linked to by external data sources, it can become part of a web of data!
You can go all out, and implement Commits, Hierarchies, Authentication, Collections and more. I'd suggest starting with Commits, as these allow users to modify data whilst maintaining versioning and auditability. Check out the Atomic-Server source code to get inspired on how to do this.
If you need any help, join our Discord.
Also, share your thoughts on creating Atomic Data in this issue on github.