Skip to content

Commit 6598efc

Browse files
Merge pull request #79 from ravijar/isurudeshan420-documentation-v2
Isurudeshan420 documentation v2
2 parents fc63a69 + 7b9e7b3 commit 6598efc

File tree

2 files changed

+30
-22
lines changed

2 files changed

+30
-22
lines changed

README.md

+30-22
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Welcome to the **Automatic Frontend Generation Framework**! This project aims to
99

1010
This framework is specifically designed for backend developers and teams who need a functional, customizable frontend without diving deep into frontend technologies. By using configuration files such as the **Page Configuration File** and **User Customization Files**, along side with the **OpenAPI Specification**, the framework ensures that the frontend is always in sync with the backend while allowing flexibility in styling and structure.
1111

12+
![generated-frontend.gif](docs/resources/documentation/generated-frontend.gif)
13+
1214
### Key Features
1315
- **Automatic React Frontend Generation**: Quickly generate fully functional React frontends from your API definitions.
1416
- **Customizable Components and Pages**: Modify predefined styles or create custom page-specific styles with ease.
@@ -77,7 +79,7 @@ iv. `pages.xml` File:
7779

7880

7981
### 2: Add Input Files
80-
#### i. OpenAPI Specification
82+
#### I. OpenAPI Specification
8183
The framework requires specific custom extensions in the OpenAPI Specification for it to function correctly and leverage its full capabilities. Below is an explanation of each required extension, where it must be included, and its purpose:
8284

8385

@@ -134,7 +136,7 @@ The framework does not support defining schemas directly inside the paths object
134136
**Example Open API Specification:**
135137
[Petstore OpenAPI Specification](samples/petstore/openapi.yaml)
136138
137-
#### ii. Pages Configuration File
139+
#### II. Pages Configuration File
138140
The Pages Configuration File defines the structure and layout of the frontend pages to be generated. This includes support for components, routes, and navigation bars, offering greater flexibility and customization.
139141
140142
#### Structure
@@ -275,6 +277,7 @@ The configuration file is an XML document containing <pages> as the root element
275277
- A form based on URL parameters and schema properties defined in an OpenAPI Specification (OAS) resource.
276278
- **Functionality:**
277279
- Uses `<resource>` to define the API endpoint for form submission.
280+
- Uses `<text>` to define the form title
278281
- Uses `<submit>` to specify the button label for submitting the form.
279282
- Can define a `<result>` component to display responses.
280283
@@ -391,30 +394,35 @@ The configuration file is an XML document containing <pages> as the root element
391394
![table-gif.gif](docs/resources/documentation/table-gif.gif)
392395
393396
4. Properties Tags
394-
i. `<resource>` : Defines an API resource to be accessed by the component.
395-
- **Attributes**:
396-
- `method`: HTTP method (e.g., `GET`, `POST`).
397-
ii. `<route>` : Defines frontend routing for navigation.
398-
iii. `<result>` : Defines the data fetched by an API call and specifies the component used to display the data.
399-
- The `CardSection` component is used to display the fetched data.
400-
iv. `<image>` : Defines an image URL for a visual element within a component.
401-
v. `<submit>` : Defines the label for a form submission button.
402-
vi. `<text>` : Defines the textual content for a component.
403-
vii. `<assign>` : Assigns the fields to display in a CardSection or Card Component.
404-
viii. `<localStorage>`: Defines an interaction with the browser's Local Storage to store, retrieve, or remove data persistently across sessions.
405-
- **Attributes**:
406-
- `action`: Defines the operation to perform.
407-
- `save` → Saves data to Local Storage.
408-
- `load` → Loads data to Local Storage.
409-
- `remove` → Removes data to Local Storage.
397+
398+
i. `<resource>` : Defines an API resource to be accessed by the component.
399+
- **Attributes**:
400+
- `method`: HTTP method (e.g., `GET`, `POST`).
401+
402+
ii. `<route>` : Defines frontend routing for navigation.
403+
404+
iii. `<result>` : Defines the data fetched by an API call and specifies the component used to display the data.
405+
- The `CardSection` component is used to display the fetched data.
406+
407+
iv. `<image>` : Defines an image URL for a visual element within a component.
408+
409+
v. `<submit>` : Defines the label for a form submission button.
410+
411+
vi. `<text>` : Defines the textual content for a component.
412+
413+
vii. `<assign>` : Assigns the fields to display in a `CardSection` or `Card` component.
414+
415+
viii. `<localStorage>` : Defines an interaction with the browser's Local Storage to store, retrieve, or remove data persistently across sessions.
416+
- **Attributes**:
417+
- `action`: Defines the operation to perform.
418+
- **`save`** → Saves data to Local Storage.
419+
- **`load`** → Loads data to Local Storage.
420+
- **`remove`** → Removes data from Local Storage.
410421
411422
**Example Page Configuration File:**
412423
[Petstore Page Configuration File](samples/petstore/pages.xml)
413424
414-
**Example Generated Homepage:**
415-
![generated-homepage.jpg](docs/resources/documentation/generated-homepage.jpg)
416-
417-
#### iii. User Customization Files
425+
#### III. User Customization Files
418426
The User Customization Files allows users to customize the appearance and behavior of the generated frontend. These files are part of the `styles` folder, which is created after running the initialization command.
419427
The styles folder is organized as follows:
420428
```
Loading

0 commit comments

Comments
 (0)