Skip to content

Commit

Permalink
Add overview file
Browse files Browse the repository at this point in the history
  • Loading branch information
torabian committed Dec 25, 2024
1 parent c3506a2 commit 312c61c
Show file tree
Hide file tree
Showing 9 changed files with 207 additions and 78 deletions.
141 changes: 141 additions & 0 deletions OVERVIEW.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# Fireback core microservice - v1.1.27
Total modules: 11
Modules overview: workspaces, workspaces, workspaces, workspaces, geo, accessibility, widget, commonprofile, currency, licenses, worldtimezone
## Workspaces
Description: This is the fireback core module, which includes everything. In fact you could say workspaces is fireback itself. Maybe in the future that would be changed


### Workspaces Entities
| Name | Usage | Main data |
| --- | --- | --- |
| File | File manager, uploading files and actions related. | Name, DiskPath, Size, VirtualPath, Type, Variations |
| TableViewSizing | Used to store meta data about user tables (in front-end, or apps for example) about the size of the columns | TableName, Sizes |
| AppMenu | Manages the menus in the app, (for example tab views, sidebar items, etc.) | Label, Href, Icon, ActiveMatcher, ApplyType, Capability |
| BackupTableMeta | Keeps information about which tables to be used during backup (mostly internal) | TableNameInDb |
| NotificationConfig | Configuration for the notifications used in the app, such as default gsm number, email senders, and many more | CascadeToSubWorkspaces, ForcedCascadeEmailProvider, GeneralEmailProvider, GeneralGsmProvider, InviteToWorkspaceContent, InviteToWorkspaceContentExcerpt, InviteToWorkspaceContentDefault, InviteToWorkspaceContentDefaultExcerpt, InviteToWorkspaceTitle, InviteToWorkspaceTitleDefault, InviteToWorkspaceSender, AccountCenterEmailSender, ForgetPasswordContent, ForgetPasswordContentExcerpt, ForgetPasswordContentDefault, ForgetPasswordContentDefaultExcerpt, ForgetPasswordTitle, ForgetPasswordTitleDefault, ForgetPasswordSender, AcceptLanguage, ConfirmEmailSender, ConfirmEmailContent, ConfirmEmailContentExcerpt, ConfirmEmailContentDefault, ConfirmEmailContentDefaultExcerpt, ConfirmEmailTitle, ConfirmEmailTitleDefault |
| PassportMethod | Login/Signup methods which are available in the app for different regions (Email, Phone Number, Google, etc) | Name, Type, Region |
| WorkspaceInvite | Active invitations for non-users or already users to join an specific workspace | CoverLetter, TargetUserLocale, Value, Workspace, FirstName, LastName, Used, Role |
| PendingWorkspaceInvite | | Value, Type, CoverLetter, WorkspaceName, Role |
| Preference | | Timezone |
| Token | | User, ValidUntil |
| Person | | FirstName, LastName, Photo, Gender, Title, BirthDate |
| UserWorkspace | Manage the workspaces that user belongs to (either its himselves or adding by invitation) | User, Workspace, UserPermissions, RolePermission, WorkspacePermissions |
| WorkspaceRole | Manage roles assigned to an specific workspace or created by the workspace itself | UserWorkspace, Role |
| User | Manage the users who are in the current app (root only) | Person, Avatar |
| UserProfile | | FirstName, LastName |
| Workspace | Fireback general user role, workspaces services. | Description, Name, Type |
| Role | Manage roles within the workspaces, or root configuration | Name, Capabilities |
| Capability | Manage the capabilities inside the application, both builtin to core and custom defined ones | Name, Description |
| WorkspaceConfig | | DisablePublicWorkspaceCreation, Workspace, ZoomClientId, ZoomClientSecret, AllowPublicToJoinTheWorkspace |
| GsmProvider | | ApiKey, MainSenderNumber, Type, InvokeUrl, InvokeBody |
| WorkspaceType | Defines a type for workspace, and the role which it can have as a whole. In systems with multiple types of services, e.g. student, teachers, schools this is useful to set those default types and limit the access of the users. | Title, Description, Slug, Role |
| EmailProvider | Thirdparty services which will send email, allows each workspace graphically configure their token without the need of restarting servers | Type, ApiKey |
| EmailSender | All emails going from the system need to have a virtual sender (nick name, email address, etc) | FromName, FromEmailAddress, ReplyTo, NickName |
| PhoneConfirmation | | User, Status, PhoneNumber, Key, ExpiresAt |
| PublicJoinKey | Joining to different workspaces using a public link directly | Role, Workspace |
| EmailConfirmation | | User, Status, Email, Key, ExpiresAt |
| Passport | Represent a mean to login in into the system, each user could have multiple passport (email, phone) and authenticate into the system. | Type, User, Value, Password, Confirmed, AccessToken |
| RegionalContent | Email templates, sms templates or other textual content which can be accessed. | Content, Region, Title, LanguageId, KeyGroup |
| ForgetPassword | | User, Passport, Status, ValidUntil, BlockedUntil, SecondsToUnblock, Otp, RecoveryAbsoluteUrl |





## Geo
Description: Geo location tools, and data set, cities, and provinces2


### Geo Entities
| Name | Usage | Main data |
| --- | --- | --- |
| GeoLocationType | | Name |
| GeoLocation | | Name, Code, Type, Status, Flag, OfficialName |
| GeoCountry | | Status, Flag, CommonName, OfficialName |
| GeoProvince | | Name, Country |
| GeoState | | Name |
| GeoCity | | Name, Province, State, Country |




### Geo actions (0)



## Accessibility


### Accessibility Entities
| Name | Usage | Main data |
| --- | --- | --- |
| KeyboardShortcut | Manage the keyboard shortcuts in web and desktop apps (accessibility) | Os, Host, DefaultCombination, UserCombination, Action, ActionKey |





## Widget


### Widget Entities
| Name | Usage | Main data |
| --- | --- | --- |
| Widget | Widget is an item which can be placed on a widget area, such as weather widget | Name, Family, ProviderKey |
| WidgetArea | Widget areas are groups of widgets, which can be placed on a special place such as dashboard | Name, Layouts, Widgets |





## Commonprofile


### Commonprofile Entities
| Name | Usage | Main data |
| --- | --- | --- |
| CommonProfile | A common profile issues for every user (Set the living address, etc) | FirstName, LastName, PhoneNumber, Email, Company, Street, HouseNumber, ZipCode, City, Gender |





## Currency


### Currency Entities
| Name | Usage | Main data |
| --- | --- | --- |
| Currency | List of all famous currencies, both internal and user defined ones | Symbol, Name, SymbolNative, DecimalDigits, Rounding, Code, NamePlural |
| PriceTag | Price tag is a definition of a price, in different currencies or regions | Variations |





## Licenses


### Licenses Entities
| Name | Usage | Main data |
| --- | --- | --- |
| LicensableProduct | | Name, PrivateKey, PublicKey |
| ProductPlan | | Name, Duration, Product, PriceTag, Permissions |
| ActivationKey | | Series, Used, Plan |
| License | Manage the licenses in the app (either to issue, or to activate current product) | Name, SignedLicense, ValidityStartDate, ValidityEndDate, Permissions |





## Worldtimezone


### Worldtimezone Entities
| Name | Usage | Main data |
| --- | --- | --- |
| TimezoneGroup | World timezone information | Value, Abbr, Offset, Isdst, Text, UtcItems |




9 changes: 9 additions & 0 deletions modules/workspaces/EmailProviderEntity.dyno.go
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ var EmailProviderWipeCmd cli.Command = cli.Command{
Action: func(c *cli.Context) error {
query := CommonCliQueryDSLBuilderAuthorize(c, &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_EMAIL_PROVIDER_DELETE},
AllowOnRoot: true,
})
count, _ := EmailProviderActionWipeClean(query)
fmt.Println("Removed", count, "of entities")
Expand Down Expand Up @@ -666,6 +667,7 @@ var EmailProviderCreateInteractiveCmd cli.Command = cli.Command{
Action: func(c *cli.Context) {
query := CommonCliQueryDSLBuilderAuthorize(c, &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_EMAIL_PROVIDER_CREATE},
AllowOnRoot: true,
})
entity := &EmailProviderEntity{}
PopulateInteractively(entity, c, EmailProviderCommonInteractiveCliFlags)
Expand All @@ -685,6 +687,7 @@ var EmailProviderUpdateCmd cli.Command = cli.Command{
Action: func(c *cli.Context) error {
query := CommonCliQueryDSLBuilderAuthorize(c, &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_EMAIL_PROVIDER_UPDATE},
AllowOnRoot: true,
})
entity := CastEmailProviderFromCli(c)
if entity, err := EmailProviderActionUpdate(query, entity); err != nil {
Expand Down Expand Up @@ -801,6 +804,7 @@ var EmailProviderImportExportCommands = []cli.Command{
Action: func(c *cli.Context) error {
query := CommonCliQueryDSLBuilderAuthorize(c, &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_EMAIL_PROVIDER_CREATE},
AllowOnRoot: true,
})
if c.Bool("batch") {
EmailProviderActionSeederMultiple(query, c.Int("count"))
Expand Down Expand Up @@ -955,6 +959,7 @@ var EmailProviderImportExportCommands = []cli.Command{
c.String("file"),
&SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_EMAIL_PROVIDER_CREATE},
AllowOnRoot: true,
},
func() EmailProviderEntity {
v := CastEmailProviderFromCli(c)
Expand Down Expand Up @@ -1087,6 +1092,7 @@ var EMAIL_PROVIDER_ACTION_POST_ONE = Module2Action{
Url: "/email-provider",
SecurityModel: &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_EMAIL_PROVIDER_CREATE},
AllowOnRoot: true,
},
Group: "emailProvider",
Handlers: []gin.HandlerFunc{
Expand Down Expand Up @@ -1118,6 +1124,7 @@ var EMAIL_PROVIDER_ACTION_PATCH = Module2Action{
Url: "/email-provider",
SecurityModel: &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_EMAIL_PROVIDER_UPDATE},
AllowOnRoot: true,
},
Group: "emailProvider",
Handlers: []gin.HandlerFunc{
Expand All @@ -1141,6 +1148,7 @@ var EMAIL_PROVIDER_ACTION_PATCH_BULK = Module2Action{
Url: "/email-providers",
SecurityModel: &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_EMAIL_PROVIDER_UPDATE},
AllowOnRoot: true,
},
Group: "emailProvider",
Handlers: []gin.HandlerFunc{
Expand All @@ -1165,6 +1173,7 @@ var EMAIL_PROVIDER_ACTION_DELETE = Module2Action{
Format: "DELETE_DSL",
SecurityModel: &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_EMAIL_PROVIDER_DELETE},
AllowOnRoot: true,
},
Group: "emailProvider",
Handlers: []gin.HandlerFunc{
Expand Down
9 changes: 9 additions & 0 deletions modules/workspaces/EmailSenderEntity.dyno.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ var EmailSenderWipeCmd cli.Command = cli.Command{
Action: func(c *cli.Context) error {
query := CommonCliQueryDSLBuilderAuthorize(c, &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_EMAIL_SENDER_DELETE},
AllowOnRoot: true,
})
count, _ := EmailSenderActionWipeClean(query)
fmt.Println("Removed", count, "of entities")
Expand Down Expand Up @@ -712,6 +713,7 @@ var EmailSenderCreateInteractiveCmd cli.Command = cli.Command{
Action: func(c *cli.Context) {
query := CommonCliQueryDSLBuilderAuthorize(c, &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_EMAIL_SENDER_CREATE},
AllowOnRoot: true,
})
entity := &EmailSenderEntity{}
PopulateInteractively(entity, c, EmailSenderCommonInteractiveCliFlags)
Expand All @@ -731,6 +733,7 @@ var EmailSenderUpdateCmd cli.Command = cli.Command{
Action: func(c *cli.Context) error {
query := CommonCliQueryDSLBuilderAuthorize(c, &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_EMAIL_SENDER_UPDATE},
AllowOnRoot: true,
})
entity := CastEmailSenderFromCli(c)
if entity, err := EmailSenderActionUpdate(query, entity); err != nil {
Expand Down Expand Up @@ -855,6 +858,7 @@ var EmailSenderImportExportCommands = []cli.Command{
Action: func(c *cli.Context) error {
query := CommonCliQueryDSLBuilderAuthorize(c, &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_EMAIL_SENDER_CREATE},
AllowOnRoot: true,
})
if c.Bool("batch") {
EmailSenderActionSeederMultiple(query, c.Int("count"))
Expand Down Expand Up @@ -1009,6 +1013,7 @@ var EmailSenderImportExportCommands = []cli.Command{
c.String("file"),
&SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_EMAIL_SENDER_CREATE},
AllowOnRoot: true,
},
func() EmailSenderEntity {
v := CastEmailSenderFromCli(c)
Expand Down Expand Up @@ -1141,6 +1146,7 @@ var EMAIL_SENDER_ACTION_POST_ONE = Module2Action{
Url: "/email-sender",
SecurityModel: &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_EMAIL_SENDER_CREATE},
AllowOnRoot: true,
},
Group: "emailSender",
Handlers: []gin.HandlerFunc{
Expand Down Expand Up @@ -1172,6 +1178,7 @@ var EMAIL_SENDER_ACTION_PATCH = Module2Action{
Url: "/email-sender",
SecurityModel: &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_EMAIL_SENDER_UPDATE},
AllowOnRoot: true,
},
Group: "emailSender",
Handlers: []gin.HandlerFunc{
Expand All @@ -1195,6 +1202,7 @@ var EMAIL_SENDER_ACTION_PATCH_BULK = Module2Action{
Url: "/email-senders",
SecurityModel: &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_EMAIL_SENDER_UPDATE},
AllowOnRoot: true,
},
Group: "emailSender",
Handlers: []gin.HandlerFunc{
Expand All @@ -1219,6 +1227,7 @@ var EMAIL_SENDER_ACTION_DELETE = Module2Action{
Format: "DELETE_DSL",
SecurityModel: &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_EMAIL_SENDER_DELETE},
AllowOnRoot: true,
},
Group: "emailSender",
Handlers: []gin.HandlerFunc{
Expand Down
10 changes: 10 additions & 0 deletions modules/workspaces/NotificationConfigEntity.dyno.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ var NotificationConfigWipeCmd cli.Command = cli.Command{
Action: func(c *cli.Context) error {
query := CommonCliQueryDSLBuilderAuthorize(c, &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_NOTIFICATION_CONFIG_DELETE},
AllowOnRoot: true,
})
count, _ := NotificationConfigActionWipeClean(query)
fmt.Println("Removed", count, "of entities")
Expand Down Expand Up @@ -1176,6 +1177,7 @@ var NotificationConfigCreateInteractiveCmd cli.Command = cli.Command{
Action: func(c *cli.Context) {
query := CommonCliQueryDSLBuilderAuthorize(c, &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_NOTIFICATION_CONFIG_CREATE},
AllowOnRoot: true,
})
entity := &NotificationConfigEntity{}
PopulateInteractively(entity, c, NotificationConfigCommonInteractiveCliFlags)
Expand All @@ -1195,6 +1197,7 @@ var NotificationConfigUpdateCmd cli.Command = cli.Command{
Action: func(c *cli.Context) error {
query := CommonCliQueryDSLBuilderAuthorize(c, &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_NOTIFICATION_CONFIG_UPDATE},
AllowOnRoot: true,
})
entity := CastNotificationConfigFromCli(c)
if entity, err := NotificationConfigActionUpdate(query, entity); err != nil {
Expand Down Expand Up @@ -1403,6 +1406,7 @@ var NotificationConfigImportExportCommands = []cli.Command{
Action: func(c *cli.Context) error {
query := CommonCliQueryDSLBuilderAuthorize(c, &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_NOTIFICATION_CONFIG_CREATE},
AllowOnRoot: true,
})
if c.Bool("batch") {
NotificationConfigActionSeederMultiple(query, c.Int("count"))
Expand Down Expand Up @@ -1557,6 +1561,7 @@ var NotificationConfigImportExportCommands = []cli.Command{
c.String("file"),
&SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_NOTIFICATION_CONFIG_CREATE},
AllowOnRoot: true,
},
func() NotificationConfigEntity {
v := CastNotificationConfigFromCli(c)
Expand Down Expand Up @@ -1690,6 +1695,7 @@ var NOTIFICATION_CONFIG_ACTION_POST_ONE = Module2Action{
Url: "/notification-config",
SecurityModel: &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_NOTIFICATION_CONFIG_CREATE},
AllowOnRoot: true,
},
Group: "notificationConfig",
Handlers: []gin.HandlerFunc{
Expand Down Expand Up @@ -1721,6 +1727,7 @@ var NOTIFICATION_CONFIG_ACTION_PATCH = Module2Action{
Url: "/notification-config",
SecurityModel: &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_NOTIFICATION_CONFIG_UPDATE},
AllowOnRoot: true,
},
Group: "notificationConfig",
Handlers: []gin.HandlerFunc{
Expand All @@ -1744,6 +1751,7 @@ var NOTIFICATION_CONFIG_ACTION_PATCH_BULK = Module2Action{
Url: "/notification-configs",
SecurityModel: &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_NOTIFICATION_CONFIG_UPDATE},
AllowOnRoot: true,
},
Group: "notificationConfig",
Handlers: []gin.HandlerFunc{
Expand All @@ -1768,6 +1776,7 @@ var NOTIFICATION_CONFIG_ACTION_DELETE = Module2Action{
Format: "DELETE_DSL",
SecurityModel: &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_NOTIFICATION_CONFIG_DELETE},
AllowOnRoot: true,
},
Group: "notificationConfig",
Handlers: []gin.HandlerFunc{
Expand All @@ -1785,6 +1794,7 @@ var NOTIFICATION_CONFIG_ACTION_DISTINCT_PATCH_ONE = Module2Action{
Url: "/notification-config/distinct",
SecurityModel: &SecurityModel{
ActionRequires: []PermissionInfo{PERM_ROOT_NOTIFICATION_CONFIG_UPDATE_DISTINCT_WORKSPACE},
AllowOnRoot: true,
},
Group: "notificationConfig",
Handlers: []gin.HandlerFunc{
Expand Down
Loading

0 comments on commit 312c61c

Please sign in to comment.