Skip to content

Commit

Permalink
Update the documentation and changes to Dtos (#90)
Browse files Browse the repository at this point in the history
* Modify the dto names

* Remove queries, because they are not implemented

* Document the tasks and a bit modify them

* Comment more the QueryDSL

* Update the documentation to real content
  • Loading branch information
torabian authored Jan 27, 2025
1 parent 12aa1bd commit bc8a29f
Show file tree
Hide file tree
Showing 119 changed files with 649 additions and 480 deletions.
16 changes: 0 additions & 16 deletions docs/docs/building-your-project-and-deploying-to-vps.mdx

This file was deleted.

14 changes: 0 additions & 14 deletions docs/docs/capabilities.mdx

This file was deleted.

4 changes: 4 additions & 0 deletions docs/docs/clients/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Clients",
"position": 222
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Introduction to Fireback React Native
sidebar_position: 20
---

Fireback react native is a raw project to create React native projects.
React and React native SDKs are not the same as Fireback React Native Boilerplate,
This is only a starter app that you might use for your projects.

Fireback React Native is not a complete boilerplate unlike React.js version.
There is not much planned to add features to it at the moment.
4 changes: 4 additions & 0 deletions docs/docs/codegen/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Code generation",
"position": 222
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ Now fireback comes with a react.js project on https://github.com/torabian/fireba
and similarly a react native project: https://github.com/torabian/fireback/tree/main/modules/workspaces/codegen/react-native-new

But **SDKs** we are talking about here is a different part of framework. In Fireback and every app created with it,
there is a section called `gen` which would give you few options, which is discussed in [Codegen in depth](./fireback-workspaces/codegen-in-depth.mdx)
and and `fireback gen react` is responsible for exporting the SDKs for both react.js and react native.
there is a section called `gen` which would give you few options, and `fireback gen react` is responsible for exporting the SDKs for both react.js and react native.

## What is SDK and it's content

Expand Down Expand Up @@ -79,9 +78,6 @@ export default App;
```


## RemoteQueryProvider in depth

# **IRemoteQueryProvider Interface**

The `IRemoteQueryProvider` interface defines the structure and options for integrating the Fireback SDK with React Query. Below is a detailed explanation of its properties:
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/custom-sql-queries-in-fireback.mdx

This file was deleted.

4 changes: 4 additions & 0 deletions docs/docs/deeper/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Deeper",
"position": 222
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ author: Ali Torabi
excerpt: Have you ever had problem with translating an Angular application, and always end up with problems with keys, adding extra pipes, hardcoded translations? Get in this tutorial with me and we will solve this problem for once.
og_image: /content/angular_translate_logo.png
lang: en
sidebar_position: 100
---

## Critical problems with ng translate, i18n and others
Expand Down
File renamed without changes.
66 changes: 66 additions & 0 deletions docs/docs/deeper/fireback-structure-and-sub-projects.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: Fireback structure and sub projects
sidebar_position: 43
---

Fireback original project (and subsequent projects built using Fireback) all follow a the same or very similar
structure.

**Note:** This document might be useful for developers who want to understand Fireback more deeper,
you don't need it for building your apps using Fireback.

Fireback is simple, and in fact doesn't contain so many folders anyway.

## .github

This folder contains github actions build for Fireback framework.
Might be present in projects created via Fireback. Delete it if your project
does not being deployed via Github or hosted there, also you can modify
your own apps version to your needs.

## .jsonschemas (ignored)

Fireback and Fireback projects generate jsonschemas out of Module3.yml files.
This is because, I wanted to have more sophisticated generated autocompletion
per each module, but not used yet. This folder will be generated
on Fireback and Fireback projects, and can be removed via Makefile of the project.

**Reminder** You need to install Redhat Yaml VSCode extension to see autocompletion
for Module3 files.

## .vscode

This is also present in both new projects and Fireback itself, which contains
a set of tasks, settings for working on Fireback projects. Feel free
to extend or modify it based on your needs.

## artifacts (ignored)

Fireback makefiles are configured to create artifacts for different operating
systems inside this folder. It's ignored and will be auto generated.

## cmd

A command golang community convention for having application entry points.
Check the `main.go` to see further configurations.

By default, might be only a single app, but you can add new folders here and make
multiple application by combining different modules, just as you would with any
golang application.

## docs

Documents related to Fireback.

## e2e

Tests, and some scripts needed for Fireback project itself. It doesn't
exist on child projects

## modules

This folder is the most imporant folder in Fireback projects, and you
can create your `Module3.yml` modules here. In VSCode, CMD+SHIFT+P and `Run task`
will suggest `Generate new module` to create them easier.

It exists on Fireback and child projects.
File renamed without changes.
75 changes: 75 additions & 0 deletions docs/docs/deeper/missing-docs.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: Missing documentations
sidebar_position: 10000
---

Here there is a list of content which needs to be documented, both in docs and code comments.
Please check each feature if 100% is compatible with the docs, mention the known issues
and plans.


## Macros
Macros are a Fireback Module3 definition feature, which would add extra
features into a definition, by just using them.

## Migration and databases
Fireback or Projects generated by fireback, they need database. Fireback is based on Gorm,
and only supports What gorm supports. Code generated, or SQL queries, are only
optimized or even generated for SQLite and MySQL, since I do not build anything
outside of these 2 databases.

You might be able to connect your golang project to another type of database,
since fireback is pure go, there is not conflict, but you won't gen benefit of
entities or migration out of the box.

## React.js Client

## Testing in Fireback

## Using Fireback independently in other backend technologies such as Node.js or Java

## Working on Fireback Source Code

## Possibility of creating Fireback modules and use in pure go projects

## Issues in Fireback

## Importing and Exporting

## Guide to choose technologies for projects

## FirebackApp application lifecycle

## Fireback Shipment

In this document we are going to discuss how the fireback is delivered as a product.
Most commonly, Github actions builds the entire project, installers and binaries
and they will be available as a part of releases.


## Error handling and IError

## Building your project and deploying to a VPS

## Capabilities (Permissions)

## Explain following modules

accessibility
currency
geo
licenses
timezon

## Workspaces features

codegen-in-depth
concurrent-update
fireback-workspaces-module
json-query-vs-query
lsp-language-server
pdf-tools
querydsl
security-life-cycle

## fireback-react
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ author: Ali Torabi
excerpt: Have you ever had problem with translating an React or React Native application, and always end up with problems with keys, adding extra pipes, hardcoded translations? Get in this tutorial with me and we will solve this problem for once.
og_image: /content/react-react-native-translation-fireback.png
lang: en
sidebar_position: 100
---

## Critical problems with usual react translation libraries, i18n and others
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ the import/export performance or custom query strategies.
## Translating errors and other strings in backend

Fireback for backend uses concept of `messages` for translating in backend. Basically, any string
which might need translation is a message, and it's discussed in it's own document [Messages](./messages.mdx)
which might need translation is a message, and it's discussed in it's own document [Messages](../messages.mdx)

Simply, you put all strings and translations into the yaml file, and use them in your go code. Fireback helps
to use the correct translation based on locale by default.
Expand Down
File renamed without changes.
37 changes: 34 additions & 3 deletions docs/docs/dtos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,39 @@ title: DTOs
sidebar_position: 7
---

Dtos, (Data transfer objects) simply are a struct (or json) representation of
data moving between two external services, or even internal.
The `Module3Dto` struct represents a Data Transfer Object (DTO) in an application. DTOs are versatile and can be used for various purposes, such as request and response objects for actions or even internally within the application. Fireback generates a variety of helper functions for each DTO, making it beneficial to define them in `Module3` instead of as pure Go structs.

Fireback allows you to define dtos in module3 yaml files.
Example in Module3 yaml.

```yaml
dtos:
- name: userRoleWorkspacePermission
fields:
- name: workspaceId
type: string
- name: userId
type: string
- name: roleId
type: string
- name: capabilityId
type: string
- name: type
type: string
```
## Fields
### `Name`
- **Type:** `string`
- **Description:**
The name of the DTO in camel case. Fireback generates all related code for the DTO based on this name.

---

### `Fields`
- **Type:** `[]*Module3Field`
- **Description:**
Defines the list of fields and body structure for the DTO. Each field represents a specific part of the data contained within the DTO.

---
6 changes: 0 additions & 6 deletions docs/docs/error-handling-and-ierror.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions docs/docs/fireback-administration/_category_.json

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions docs/docs/fireback-react/_category_.json

This file was deleted.

12 changes: 0 additions & 12 deletions docs/docs/fireback-react/fireback-module.mdx

This file was deleted.

4 changes: 0 additions & 4 deletions docs/docs/fireback-react/fireback-react-folder-structure.mdx

This file was deleted.

8 changes: 0 additions & 8 deletions docs/docs/fireback-react/fireback-react-strategy.mdx

This file was deleted.

4 changes: 0 additions & 4 deletions docs/docs/fireback-react/goal-of-fireback-react copy.mdx

This file was deleted.

8 changes: 0 additions & 8 deletions docs/docs/fireback-shipment.mdx

This file was deleted.

4 changes: 0 additions & 4 deletions docs/docs/fireback-structure-and-sub-projects.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions docs/docs/fireback-workspaces/_category_.json

This file was deleted.

Loading

0 comments on commit bc8a29f

Please sign in to comment.