start with api.php, rename Document class to DocumentStorage class