diff --git a/.gitignore b/.gitignore index 30458542..9ad2f651 100644 --- a/.gitignore +++ b/.gitignore @@ -56,4 +56,5 @@ Thumbs.db # ignore Secrets folder .secrets/ -libraries/plugins/src/plugins.ts \ No newline at end of file +libraries/plugins/src/plugins.ts +i18n.cache diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index d3e8fb18..82431625 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community. Examples of behavior that contributes to a positive environment for our community include: -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the +- Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: -* The use of sexualized language or imagery, and sexual attention or +- The use of sexualized language or imagery, and sexual attention or advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an +standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 19fec3db..ef03cee2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,6 +21,7 @@ As a general rule; ## Types of Contributions Contributions can include: + - **Code improvements:** Fixing bugs or adding new features. - **Documentation updates:** Enhancing clarity or adding missing information. - **Feature requests:** Suggesting new capabilities or integrations. @@ -39,17 +40,15 @@ This project follows a Fork/Feature Branch/Pull Request model. If you're not fam ```bash git checkout -b feature/your-feature-name ``` -6. **Make your changes**: Implement the changes you wish to contribute. -7. **Push your changes**: Upload your changes to your fork. +4. **Make your changes**: Implement the changes you wish to contribute. +5. **Push your changes**: Upload your changes to your fork. ```bash git push -u origin feature/your-feature-name ``` -9. **Create a pull request**: Propose your changes **to the main branch**. - +6. **Create a pull request**: Propose your changes **to the main branch**. # Need Help? Again, do check the [developer guide](https://docs.postiz.com/developer-guide). Much of what you probably need to know is in there. If you encounter any issues, please visit our [support page](https://docs.postiz.com/support) or check the community forums. Your contributions help make Postiz better! - diff --git a/README.md b/README.md index 3c9757dc..7159b45e 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,6 @@
-
@@ -28,7 +27,6 @@
Postiz offers everything you need to manage your social media posts,
build an audience, capture leads, and grow your business.
-
@@ -77,7 +75,7 @@
## ✨ Features
|  |  |
-|--------------------------------|--------------------------------|
+| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
|  |  |
# Intro
@@ -98,9 +96,11 @@
- Resend (email notifications)
## Quick Start
+
To have the project up and running, please follow the [Quick Start Guide](https://docs.postiz.com/quickstart)
## Invest in the Postiz Coin :)
+
DMsTbeCfX1crgAse5tver98KAMarPWeP3d6U3Gmmpump
# License
@@ -112,5 +112,3 @@ This repository's source code is available under the [AGPL-3.0 license](LICENSE)
-
-
diff --git a/SECURITY.md b/SECURITY.md
index 79ff527f..e52e5c68 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -8,14 +8,14 @@ The Postiz app is committed to ensuring the security and integrity of our users'
If you discover a security vulnerability in the Postiz app, please report it to us privately via email to one of the maintainers:
-* @nevo-david
-* @egelhaus ([email](mailto:gelhausenno@outlook.de))
+- @nevo-david
+- @egelhaus ([email](mailto:gelhausenno@outlook.de))
When reporting a security vulnerability, please provide as much detail as possible, including:
-* A clear description of the vulnerability
-* Steps to reproduce the vulnerability
-* Any relevant code or configuration files
+- A clear description of the vulnerability
+- Steps to reproduce the vulnerability
+- Any relevant code or configuration files
## Supported Versions
@@ -31,10 +31,10 @@ We will not publicly disclose security vulnerabilities until a patch or fix is a
We take security vulnerabilities seriously and will respond promptly to reports of vulnerabilities. Our response process includes:
-* Investigating the report and verifying the vulnerability.
-* Developing a patch or fix for the vulnerability.
-* Releasing the patch or fix as soon as possible.
-* Notifying users of the vulnerability and the patch or fix.
+- Investigating the report and verifying the vulnerability.
+- Developing a patch or fix for the vulnerability.
+- Releasing the patch or fix as soon as possible.
+- Notifying users of the vulnerability and the patch or fix.
## Template Attribution
diff --git a/apps/backend/package.json b/apps/backend/package.json
index d60484c3..df85cfc8 100644
--- a/apps/backend/package.json
+++ b/apps/backend/package.json
@@ -11,4 +11,4 @@
"keywords": [],
"author": "",
"license": "ISC"
-}
\ No newline at end of file
+}
diff --git a/apps/backend/src/api/api.module.ts b/apps/backend/src/api/api.module.ts
index 85747cda..54b8382a 100644
--- a/apps/backend/src/api/api.module.ts
+++ b/apps/backend/src/api/api.module.ts
@@ -74,7 +74,7 @@ const authenticatedController = [
TrackService,
ShortLinkService,
Nowpayments,
- McpService
+ McpService,
],
get exports() {
return [...this.imports, ...this.providers];
diff --git a/apps/backend/src/api/routes/analytics.controller.ts b/apps/backend/src/api/routes/analytics.controller.ts
index 706be96a..98caae8c 100644
--- a/apps/backend/src/api/routes/analytics.controller.ts
+++ b/apps/backend/src/api/routes/analytics.controller.ts
@@ -21,7 +21,7 @@ import { IntegrationManager } from '@gitroom/nestjs-libraries/integrations/integ
export class AnalyticsController {
constructor(
private _starsService: StarsService,
- private _integrationService: IntegrationService,
+ private _integrationService: IntegrationService
) {}
@Get('/')
async getStars(@GetOrgFromRequest() org: Organization) {
diff --git a/apps/backend/src/api/routes/copilot.controller.ts b/apps/backend/src/api/routes/copilot.controller.ts
index 1e207f18..f28122c1 100644
--- a/apps/backend/src/api/routes/copilot.controller.ts
+++ b/apps/backend/src/api/routes/copilot.controller.ts
@@ -13,9 +13,12 @@ export class CopilotController {
constructor(private _subscriptionService: SubscriptionService) {}
@Post('/chat')
chat(@Req() req: Request, @Res() res: Response) {
- if (process.env.OPENAI_API_KEY === undefined || process.env.OPENAI_API_KEY === '') {
+ if (
+ process.env.OPENAI_API_KEY === undefined ||
+ process.env.OPENAI_API_KEY === ''
+ ) {
Logger.warn('OpenAI API key not set, chat functionality will not work');
- return
+ return;
}
const copilotRuntimeHandler = copilotRuntimeNestEndpoint({
diff --git a/apps/backend/src/api/routes/integrations.controller.ts b/apps/backend/src/api/routes/integrations.controller.ts
index f623162a..8fff7afc 100644
--- a/apps/backend/src/api/routes/integrations.controller.ts
+++ b/apps/backend/src/api/routes/integrations.controller.ts
@@ -87,35 +87,34 @@ export class IntegrationsController {
async getIntegrationList(@GetOrgFromRequest() org: Organization) {
return {
integrations: await Promise.all(
- (await this._integrationService.getIntegrationsList(org.id)).map(
- async (p) => {
- const findIntegration =
- this._integrationManager.getSocialIntegration(
- p.providerIdentifier
- );
- return {
- name: p.name,
- id: p.id,
- internalId: p.internalId,
- disabled: p.disabled,
- picture: p.picture || '/no-picture.jpg',
- identifier: p.providerIdentifier,
- inBetweenSteps: p.inBetweenSteps,
- refreshNeeded: p.refreshNeeded,
- isCustomFields: !!findIntegration.customFields,
- ...(findIntegration.customFields
- ? { customFields: await findIntegration.customFields() }
- : {}),
- display: p.profile,
- type: p.type,
- time: JSON.parse(p.postingTimes),
- changeProfilePicture: !!findIntegration?.changeProfilePicture,
- changeNickName: !!findIntegration?.changeNickname,
- customer: p.customer,
- additionalSettings: p.additionalSettings || '[]',
- };
- }
- )
+ (
+ await this._integrationService.getIntegrationsList(org.id)
+ ).map(async (p) => {
+ const findIntegration = this._integrationManager.getSocialIntegration(
+ p.providerIdentifier
+ );
+ return {
+ name: p.name,
+ id: p.id,
+ internalId: p.internalId,
+ disabled: p.disabled,
+ picture: p.picture || '/no-picture.jpg',
+ identifier: p.providerIdentifier,
+ inBetweenSteps: p.inBetweenSteps,
+ refreshNeeded: p.refreshNeeded,
+ isCustomFields: !!findIntegration.customFields,
+ ...(findIntegration.customFields
+ ? { customFields: await findIntegration.customFields() }
+ : {}),
+ display: p.profile,
+ type: p.type,
+ time: JSON.parse(p.postingTimes),
+ changeProfilePicture: !!findIntegration?.changeProfilePicture,
+ changeNickName: !!findIntegration?.changeNickname,
+ customer: p.customer,
+ additionalSettings: p.additionalSettings || '[]',
+ };
+ })
),
};
}
diff --git a/apps/backend/src/api/routes/mcp.controller.ts b/apps/backend/src/api/routes/mcp.controller.ts
index 6dd649c7..6e466b11 100644
--- a/apps/backend/src/api/routes/mcp.controller.ts
+++ b/apps/backend/src/api/routes/mcp.controller.ts
@@ -1,4 +1,11 @@
-import { Body, Controller, HttpException, Param, Post, Sse } from '@nestjs/common';
+import {
+ Body,
+ Controller,
+ HttpException,
+ Param,
+ Post,
+ Sse,
+} from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { McpService } from '@gitroom/nestjs-libraries/mcp/mcp.service';
import { OrganizationService } from '@gitroom/nestjs-libraries/database/prisma/organizations/organization.service';
diff --git a/apps/backend/src/api/routes/messages.controller.ts b/apps/backend/src/api/routes/messages.controller.ts
index ff894a42..2af0d9b0 100644
--- a/apps/backend/src/api/routes/messages.controller.ts
+++ b/apps/backend/src/api/routes/messages.controller.ts
@@ -26,7 +26,12 @@ export class MessagesController {
@Param('groupId') groupId: string,
@Param('page') page: string
) {
- return this._messagesService.getMessages(user.id, organization.id, groupId, +page);
+ return this._messagesService.getMessages(
+ user.id,
+ organization.id,
+ groupId,
+ +page
+ );
}
@Post('/:groupId')
createMessage(
@@ -35,6 +40,11 @@ export class MessagesController {
@Param('groupId') groupId: string,
@Body() message: AddMessageDto
) {
- return this._messagesService.createMessage(user.id, organization.id, groupId, message);
+ return this._messagesService.createMessage(
+ user.id,
+ organization.id,
+ groupId,
+ message
+ );
}
}
diff --git a/apps/backend/src/api/routes/notifications.controller.ts b/apps/backend/src/api/routes/notifications.controller.ts
index 94c20283..3e1fe3a8 100644
--- a/apps/backend/src/api/routes/notifications.controller.ts
+++ b/apps/backend/src/api/routes/notifications.controller.ts
@@ -3,7 +3,7 @@ import { GetUserFromRequest } from '@gitroom/nestjs-libraries/user/user.from.req
import { Organization, User } from '@prisma/client';
import { GetOrgFromRequest } from '@gitroom/nestjs-libraries/user/org.from.request';
import { NotificationService } from '@gitroom/nestjs-libraries/database/prisma/notifications/notification.service';
-import {ApiTags} from "@nestjs/swagger";
+import { ApiTags } from '@nestjs/swagger';
@ApiTags('Notifications')
@Controller('/notifications')
diff --git a/apps/backend/src/api/routes/settings.controller.ts b/apps/backend/src/api/routes/settings.controller.ts
index e195b242..168a4599 100644
--- a/apps/backend/src/api/routes/settings.controller.ts
+++ b/apps/backend/src/api/routes/settings.controller.ts
@@ -8,8 +8,8 @@ import {
Sections,
} from '@gitroom/backend/services/auth/permissions/permissions.service';
import { OrganizationService } from '@gitroom/nestjs-libraries/database/prisma/organizations/organization.service';
-import {AddTeamMemberDto} from "@gitroom/nestjs-libraries/dtos/settings/add.team.member.dto";
-import {ApiTags} from "@nestjs/swagger";
+import { AddTeamMemberDto } from '@gitroom/nestjs-libraries/dtos/settings/add.team.member.dto';
+import { ApiTags } from '@nestjs/swagger';
@ApiTags('Settings')
@Controller('/settings')
@@ -105,25 +105,34 @@ export class SettingsController {
}
@Get('/team')
- @CheckPolicies([AuthorizationActions.Create, Sections.TEAM_MEMBERS], [AuthorizationActions.Create, Sections.ADMIN])
+ @CheckPolicies(
+ [AuthorizationActions.Create, Sections.TEAM_MEMBERS],
+ [AuthorizationActions.Create, Sections.ADMIN]
+ )
async getTeam(@GetOrgFromRequest() org: Organization) {
return this._organizationService.getTeam(org.id);
}
@Post('/team')
- @CheckPolicies([AuthorizationActions.Create, Sections.TEAM_MEMBERS], [AuthorizationActions.Create, Sections.ADMIN])
+ @CheckPolicies(
+ [AuthorizationActions.Create, Sections.TEAM_MEMBERS],
+ [AuthorizationActions.Create, Sections.ADMIN]
+ )
async inviteTeamMember(
- @GetOrgFromRequest() org: Organization,
- @Body() body: AddTeamMemberDto,
+ @GetOrgFromRequest() org: Organization,
+ @Body() body: AddTeamMemberDto
) {
return this._organizationService.inviteTeamMember(org.id, body);
}
@Delete('/team/:id')
- @CheckPolicies([AuthorizationActions.Create, Sections.TEAM_MEMBERS], [AuthorizationActions.Create, Sections.ADMIN])
+ @CheckPolicies(
+ [AuthorizationActions.Create, Sections.TEAM_MEMBERS],
+ [AuthorizationActions.Create, Sections.ADMIN]
+ )
deleteTeamMember(
- @GetOrgFromRequest() org: Organization,
- @Param('id') id: string
+ @GetOrgFromRequest() org: Organization,
+ @Param('id') id: string
) {
return this._organizationService.deleteTeamMember(org, id);
}
diff --git a/apps/backend/src/api/routes/users.controller.ts b/apps/backend/src/api/routes/users.controller.ts
index 358232ae..448eed14 100644
--- a/apps/backend/src/api/routes/users.controller.ts
+++ b/apps/backend/src/api/routes/users.controller.ts
@@ -62,8 +62,7 @@ export class UsersController {
// @ts-ignore
totalChannels: !process.env.STRIPE_PUBLISHABLE_KEY ? 10000 : organization?.subscription?.totalChannels || pricing.FREE.channel,
// @ts-ignore
- tier: organization?.subscription?.subscriptionTier ||
- (!process.env.STRIPE_PUBLISHABLE_KEY ? 'ULTIMATE' : 'FREE'),
+ tier: organization?.subscription?.subscriptionTier || (!process.env.STRIPE_PUBLISHABLE_KEY ? 'ULTIMATE' : 'FREE'),
// @ts-ignore
role: organization?.users[0]?.role,
// @ts-ignore
@@ -72,7 +71,7 @@ export class UsersController {
impersonate: !!impersonate,
allowTrial: organization?.allowTrial,
// @ts-ignore
- publicApi: organization?.users[0]?.role === 'SUPERADMIN' || organization?.users[0]?.role === 'ADMIN' ? organization?.apiKey : '',
+ publicApi: organization?.users[0]?.role === 'SUPERADMIN' || organization?.users[0]?.role === 'ADMIN' ? organization?.apiKey : '',
};
}
diff --git a/apps/backend/src/public-api/public.api.module.ts b/apps/backend/src/public-api/public.api.module.ts
index ac4389d0..73f85ebd 100644
--- a/apps/backend/src/public-api/public.api.module.ts
+++ b/apps/backend/src/public-api/public.api.module.ts
@@ -11,16 +11,10 @@ import { CodesService } from '@gitroom/nestjs-libraries/services/codes.service';
import { PublicIntegrationsController } from '@gitroom/backend/public-api/routes/v1/public.integrations.controller';
import { PublicAuthMiddleware } from '@gitroom/backend/services/auth/public.auth.middleware';
-const authenticatedController = [
- PublicIntegrationsController
-];
+const authenticatedController = [PublicIntegrationsController];
@Module({
- imports: [
- UploadModule,
- ],
- controllers: [
- ...authenticatedController,
- ],
+ imports: [UploadModule],
+ controllers: [...authenticatedController],
providers: [
AuthService,
StripeService,
diff --git a/apps/backend/src/public-api/routes/v1/public.integrations.controller.ts b/apps/backend/src/public-api/routes/v1/public.integrations.controller.ts
index 05dd16cc..8304e874 100644
--- a/apps/backend/src/public-api/routes/v1/public.integrations.controller.ts
+++ b/apps/backend/src/public-api/routes/v1/public.integrations.controller.ts
@@ -1,5 +1,14 @@
import {
- Body, Controller, Delete, Get, HttpException, Param, Post, Query, UploadedFile, UseInterceptors
+ Body,
+ Controller,
+ Delete,
+ Get,
+ HttpException,
+ Param,
+ Post,
+ Query,
+ UploadedFile,
+ UseInterceptors,
} from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { GetOrgFromRequest } from '@gitroom/nestjs-libraries/user/org.from.request';
diff --git a/apps/backend/src/services/auth/permissions/permissions.ability.ts b/apps/backend/src/services/auth/permissions/permissions.ability.ts
index b2c1a3cf..414a520a 100644
--- a/apps/backend/src/services/auth/permissions/permissions.ability.ts
+++ b/apps/backend/src/services/auth/permissions/permissions.ability.ts
@@ -1,6 +1,10 @@
-import {SetMetadata} from "@nestjs/common";
-import {AuthorizationActions, Sections} from "@gitroom/backend/services/auth/permissions/permissions.service";
+import { SetMetadata } from '@nestjs/common';
+import {
+ AuthorizationActions,
+ Sections,
+} from '@gitroom/backend/services/auth/permissions/permissions.service';
export const CHECK_POLICIES_KEY = 'check_policy';
export type AbilityPolicy = [AuthorizationActions, Sections];
-export const CheckPolicies = (...handlers: AbilityPolicy[]) => SetMetadata(CHECK_POLICIES_KEY, handlers);
+export const CheckPolicies = (...handlers: AbilityPolicy[]) =>
+ SetMetadata(CHECK_POLICIES_KEY, handlers);
diff --git a/apps/backend/src/services/auth/permissions/permissions.guard.ts b/apps/backend/src/services/auth/permissions/permissions.guard.ts
index 648ce13f..20aa7f10 100644
--- a/apps/backend/src/services/auth/permissions/permissions.guard.ts
+++ b/apps/backend/src/services/auth/permissions/permissions.guard.ts
@@ -1,29 +1,37 @@
-import {CanActivate, ExecutionContext, Injectable} from "@nestjs/common";
-import {Reflector} from "@nestjs/core";
-import {AppAbility, PermissionsService} from "@gitroom/backend/services/auth/permissions/permissions.service";
-import {AbilityPolicy, CHECK_POLICIES_KEY} from "@gitroom/backend/services/auth/permissions/permissions.ability";
-import {Organization} from "@prisma/client";
-import {SubscriptionException} from "@gitroom/backend/services/auth/permissions/subscription.exception";
-import {Request} from "express";
-
+import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common';
+import { Reflector } from '@nestjs/core';
+import {
+ AppAbility,
+ PermissionsService,
+} from '@gitroom/backend/services/auth/permissions/permissions.service';
+import {
+ AbilityPolicy,
+ CHECK_POLICIES_KEY,
+} from '@gitroom/backend/services/auth/permissions/permissions.ability';
+import { Organization } from '@prisma/client';
+import { SubscriptionException } from '@gitroom/backend/services/auth/permissions/subscription.exception';
+import { Request } from 'express';
@Injectable()
export class PoliciesGuard implements CanActivate {
constructor(
private _reflector: Reflector,
- private _authorizationService: PermissionsService,
+ private _authorizationService: PermissionsService
) {}
async canActivate(context: ExecutionContext): Promise
- You are being redirected back
+ {t('you_are_being_redirected_back', 'You are being redirected back')}
- Login instead
+
+ {t('login_instead', 'Login instead')}
+