API roadmap for notes app:
š Collections API
Retrieval ā¢ GET /collections ā Get all collections (preload nested collections) ā¢ GET /collections/:id/notes ā Get notes by collection ID
Modification ā¢ POST /collections ā Create a collection ā¢ PATCH /collections/:id ā Update a collection ā¢ DELETE /collections/:id ā Delete a collection
š Notes API
Retrieval ā¢ GET /notes ā Get all notes (pre populate tag and status objects in each note) ā¢ GET /notes/:id ā Get a single note
Modification ā¢ POST /collections/:collectionId/notes ā Create a note within a collection ā¢ PATCH /notes/:id ā Update a note ā¢ DELETE /notes/:id ā Delete a note ā¢ PATCH /notes/:id/archive ā Archive a note
š· Tags API
Retrieval ā¢ GET /tags ā Get all tags
Modification ā¢ POST /tags ā Create a tag ā¢ PATCH /tags/:id ā Update a tag ā¢ DELETE /tags/:id ā Delete a tag
š Status API
Retrieval ā¢ GET /statuses ā Get all statuses
Modification ā¢ POST /statuses ā Create a status ā¢ PATCH /statuses/:id ā Update a status ā¢ DELETE /statuses/:id ā Delete a status (except default ones)
š¹ Additional Considerations ā¢ Ensure default statuses (todo, in-progress, pending, done) cannot be deleted. ā¢ Use soft deletion (isArchived, isDeleted) instead of hard deletion where necessary. ā¢ Implement pagination for GET /notes if the dataset grows large.