Skip to the content.

The Server Side

Server and Browser interaction

Approach

This architecture provides the most elegant and advanced solution to achieve performance without braking the modularity of UI and The State. below are techniques to to do this on the server side of application

Folder Structure

.
├── ui
├── state
├── pages
│   ├── Home.js
│   ├── Services.js
│   ├── About.js
│   └── Contact.js
├── containers
│   ├── HeaderContainer.js
│   ├── FooterContainer.js
│   ├── CarouselContainer.js
│   └── TodoListContainer.js
├── constants
├── utils
│   ├── providers
│   └── services
│       └── api.js
├── App.js
├── sw.js
└── index.js

The image you provided represents a typical Frontend Server folder structure. It organizes the application into logical modules, making it easier to manage and scale. Below is an explanation of the structure and its components:

1. ui

2. state

3. pages

4. containers

5. constants

6. utils

7. Root Files

Architecture

server system diagram

The diagram represents the architecture of a web application, with a focus on modular design and the separation of backend and frontend components.

Backend Side

  1. Providers:
    • Forms / Links / Image Localization Module: Handles content-related functionalities like forms, links, and localized images.
    • Route Provider: Manages routing within the application.
    • Auth Provider: Responsible for authentication and security mechanisms.
    • Common Provider: Acts as a shared utility or service layer connecting other providers.
  2. Renderers:
    • SSR Module (Server-Side Rendering): Generates pages dynamically on the server for improved performance and SEO.
    • SSG Module (Static Site Generation): Pre-generates static pages for faster delivery.
  3. Services:
    • API Services: Facilitates communication between the frontend and backend via APIs.
    • Session Management: Handles user sessions and authentication states.
  4. Proxy Config:
    • for routing requests, load balancing, or API gateway functionality.
  5. Container: It acts as a bridge between the data layer (e.g., backend services, APIs) and the presentation layer (React components that render UI). Containers typically do not include presentational markup themselves but instead pass data and event handlers (via props) to child components.

Frontend Side

  1. Headers:
    • PWA (Progressive Web App): Ensures offline capabilities, responsiveness, and app-like features.
    • SEO (Search Engine Optimization): Optimizes content for search engines.
    • Protocol / Security: Implements security measures like HTTPS protocols.
  2. App Shell:
    • A lightweight framework responsible for rendering the core structure of the application and managing dynamic updates.
  3. Index File:
    • Serves as the entry point for the frontend application, loading the app shell and initializing components.

Containers & Pages

Key Concept 1:

Containers

  1. Container components (HeaderContainer, FooterContainer, etc.) fetch data from APIs or global state and pass it down to presentational components in the ui folder or directly to pages in the pages folder.
  2. For example:
    • The TodoListContainer.js fetch a list of tasks from an API (services/api.js) and pass this data as props to a presentational component in the ui folder that renders the tasks visually.
Key Concept 2:

App Shell

Key Concept 3:

Rendering and Services

Key Concept 4:

Optimization

Switch between skeletons from pre defined organism to container lazy imports Module federation for MFE PWA Strategies Preload SSR with State management