react-starter icon indicating copy to clipboard operation
react-starter copied to clipboard

[DX] Backend mock

Open DorijanH opened this issue 1 year ago • 0 comments

Currently

When developing an application with CRUD features and an external API, we don't have the clearest way of mocking that communication before the API is ready.

Most of the time we would resort to manually creating mock data in our application and manually returning it in the repository layer after some delay.

This could be fine for GET requests, but the PUT, POST and DELETE would require additional logic just for making it work correctly.

Proposed

We could change this approach by using json server alongside mockaroo.

Json server would give us a fake REST API with full CRUD support and mockaroo would generate mock database data in the shape we define.

Also, we can create custom routes alongside these CRUD autogenerated ones for defining logic that is not a simple CRUD.


What do you think? Could this be of use to us?

DorijanH avatar Jan 20 '24 08:01 DorijanH