I like to first define the API and then write both at the same time. This is common when using GraphQL because you can use the Schema-first approach to define the GraphQL schema and then work Frontend and Backend at the same time.
With a REST API you could use something like Swagger or just define a README.md with the API endpoints.
re: Backend or Frontend First? VIEW POST
FULL DISCUSSIONI like to first define the API and then write both at the same time. This is common when using GraphQL because you can use the Schema-first approach to define the GraphQL schema and then work Frontend and Backend at the same time.
With a REST API you could use something like Swagger or just define a README.md with the API endpoints.