Concept Flow - Why API routes serve data endpoints
Client sends request to API route
API route receives request
API route processes data or logic
API route sends back JSON data
Client receives data and updates UI
This flow shows how a client asks an API route for data, the route processes it, and then sends back data for the client to use.