For single-page applications there is a pretty clear-cut distinction between frontend and backend. The presentation and interaction aspects are handled entirely by the frontend, while the backend takes care of the logic: reading the data passed to it by the frontend, processing that data and returning the results.