Is there any example to show REST api that with backend & frontend structures?

Hi, I'm new to REST api, I've seen the example here https://docs.phalconphp.com/en/3.2/tutorial-rest

And is there any example to show REST api that with backend & frontend structures? OR what's directory structure looks like?

edited 24d ago

Well, backend should be separate - so you only have one structure for that REST backend part. Frontend could be anything or anywhere. Mobile app, Hybrid app, AngularJS, you name it.

But sure, you can have your self hosted FE app on same server with REST API as backend. Only views are different then as REST API does not render/produce any views per se, but only data layer.



8.8k
edited 24d ago

I want to build an app with phalcon+vuejs. My "backend" means admin-part that administrators can manage the robots data (as an example), and the "frontend" means users can list or search the robots data. Both of them hosted on same server.

What's the best practice and the directory structrue?

You can try to use my lib or look at how I made the rest api system
https://github.com/corentin-begne/phalconTool



8.8k

Thanks!

But I'm not sure whether your case suitable for me

You can try to use my lib or look at how I made the rest api system
https://github.com/corentin-begne/phalconTool