codegasms / flux

A complete file management utility
https://flux.codegasms.com
5 stars 2 forks source link

General Architechture Proposal (Ejs) #9

Closed aahnik closed 6 months ago

aahnik commented 6 months ago

ejs can be used in two ways:

  1. the backend injects data into ejs templates and sends fully rendered HTML to client. only a single process runs.
  2. the backend responds only with json (lets call this server backend server). there is a separate server (lets call it frontend server) which serves ejs files. these files has fetch logic, which fetches data from backend server, and renders it. thus two processes run.

Examples of type 1

Example of type 2

I could not find any direct example on the internet, but it may be possible.

aahnik commented 6 months ago

I am closing this issue, as the team decided to go with type-2 usage.

let the backend respond with JSON... let us talk JSON, then in the future, any Android app or other tech stack clients can connect with our API

exposing an API, for smooth integrability and developer experience is a plus point (as far as writing this project in our resume is concerned)

Finalized folder structure: (for complete separation of concerns)

client/
server/