diff --git a/.env.example b/.env.example
index 3679a62b..4a475d7f 100644
--- a/.env.example
+++ b/.env.example
@@ -1,5 +1,5 @@
-DATABASE_URL=""
-REDIS_URL=""
+DATABASE_URL="postgres://:@:/"
+REDIS_URL="redis://:"
UPLOAD_DIRECTORY=""
NEXT_PUBLIC_UPLOAD_STATIC_DIRECTORY=""
STRIPE_PUBLISHABLE_KEY=""
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 00000000..d3e8fb18
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,128 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+We as members, contributors, and leaders pledge to make participation in our
+community a harassment-free experience for everyone, regardless of age, body
+size, visible or invisible disability, ethnicity, sex characteristics, gender
+identity and expression, level of experience, education, socio-economic status,
+nationality, personal appearance, race, religion, or sexual identity
+and orientation.
+
+We pledge to act and interact in ways that contribute to an open, welcoming,
+diverse, inclusive, and healthy community.
+
+## Our Standards
+
+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,
+ and learning from the experience
+* 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
+ 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
+ address, without their explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Enforcement Responsibilities
+
+Community leaders are responsible for clarifying and enforcing our standards of
+acceptable behavior and will take appropriate and fair corrective action in
+response to any behavior that they deem inappropriate, threatening, offensive,
+or harmful.
+
+Community leaders have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are
+not aligned to this Code of Conduct, and will communicate reasons for moderation
+decisions when appropriate.
+
+## Scope
+
+This Code of Conduct applies within all community spaces, and also applies when
+an individual is officially representing the community in public spaces.
+Examples of representing our community include using an official e-mail address,
+posting via an official social media account, or acting as an appointed
+representative at an online or offline event.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported to the community leaders responsible for enforcement at
+nevo@gitroom.com.
+All complaints will be reviewed and investigated promptly and fairly.
+
+All community leaders are obligated to respect the privacy and security of the
+reporter of any incident.
+
+## Enforcement Guidelines
+
+Community leaders will follow these Community Impact Guidelines in determining
+the consequences for any action they deem in violation of this Code of Conduct:
+
+### 1. Correction
+
+**Community Impact**: Use of inappropriate language or other behavior deemed
+unprofessional or unwelcome in the community.
+
+**Consequence**: A private, written warning from community leaders, providing
+clarity around the nature of the violation and an explanation of why the
+behavior was inappropriate. A public apology may be requested.
+
+### 2. Warning
+
+**Community Impact**: A violation through a single incident or series
+of actions.
+
+**Consequence**: A warning with consequences for continued behavior. No
+interaction with the people involved, including unsolicited interaction with
+those enforcing the Code of Conduct, for a specified period of time. This
+includes avoiding interactions in community spaces as well as external channels
+like social media. Violating these terms may lead to a temporary or
+permanent ban.
+
+### 3. Temporary Ban
+
+**Community Impact**: A serious violation of community standards, including
+sustained inappropriate behavior.
+
+**Consequence**: A temporary ban from any sort of interaction or public
+communication with the community for a specified period of time. No public or
+private interaction with the people involved, including unsolicited interaction
+with those enforcing the Code of Conduct, is allowed during this period.
+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
+individual, or aggression toward or disparagement of classes of individuals.
+
+**Consequence**: A permanent ban from any sort of public interaction within
+the community.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage],
+version 2.0, available at
+https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
+
+Community Impact Guidelines were inspired by [Mozilla's code of conduct
+enforcement ladder](https://github.com/mozilla/diversity).
+
+[homepage]: https://www.contributor-covenant.org
+
+For answers to common questions about this code of conduct, see the FAQ at
+https://www.contributor-covenant.org/faq. Translations are available at
+https://www.contributor-covenant.org/translations.
diff --git a/README.md b/README.md
index 6cd6fffa..2a2018fc 100644
--- a/README.md
+++ b/README.md
@@ -16,9 +16,10 @@
- Your open-source launch week.
+ Maximize your launch.
+ An alternative to: Buffer.com, Hypefury, Twitter Hunter, Etc...
- Schedule social media and articles.
Exchange or buy posts from other members.
Monitor your GitHub trending, and so much more.
+ Schedule social media and articles.
Exchange or buy posts from other members.
Monitor your GitHub trending, and so much more.
@@ -41,7 +42,7 @@
-
+
@@ -64,45 +65,21 @@
-## Intro
+# Intro
-Become a content machine - you might have heard it before; if you want to promote your stuff, you must release content.
+- Schedule all your social media posts and articles beforehand.
-To become consistent with your content, you have to set up everything before and take 1-2 weeks of a buffer (at least) so you can launch your stuff.
+- Plan your launch around GitHub trending changes
-You want to be relaxed about the following content and not to make split-second mistakes.
+- Collaborate with other team members to exchange or buy posts
-Today, for open-source tools, that's impossible.
+- Invite your team members to collaborate, comment, and schedule posts
-Why?
+- Post to uncommon platforms such as Reddit, DEV.to, and Hashnode.
-Because you must do everything manually, even existing scheduling tools let you schedule only Social Media posts (and ignore essential platforms such as Reddit).
+- Offer your open-source deals to the entire community
-But how can you make your social media post if you still need to release your article?
-
-How do you release all your articles at the same time - without copy-pasting them between platforms?
-
-How do you know when is the best time to post?
-
-That's where Gitroom shines; you can do all of it beforehand.
-
----
-
-## Problem - Solution ✅
-
-🚀 Schedule all your social media posts and articles beforehand.
-
-🔥 Plan your launch around GitHub trending changes
-
-🎉 Collaborate with other team members to exchange or buy posts
-
-✨ Invite your team members to collaborate, comment and schedule posts
-
-🥇 Post to uncommon platforms such as Reddit, DEV.to, and Hashnode.
-
-💥 Offer your open-source deals to the entire community
-
-🎈 Be a part of the Gitroom friends - APIs to exchange content between members
+- Be a part of the Gitroom friends - APIs to exchange content between members
## Tech Stack
diff --git a/apps/backend/src/services/auth/permissions/permissions.service.ts b/apps/backend/src/services/auth/permissions/permissions.service.ts
index 2e164756..54ccfcfc 100644
--- a/apps/backend/src/services/auth/permissions/permissions.service.ts
+++ b/apps/backend/src/services/auth/permissions/permissions.service.ts
@@ -65,7 +65,15 @@ export class PermissionsService {
requestedPermission.length === 0 ||
!process.env.STRIPE_PUBLISHABLE_KEY
) {
- return build();
+ for (const [action, section] of requestedPermission) {
+ can(action, section);
+ }
+ return build({
+ detectSubjectType: (item) =>
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-ignore
+ item.constructor,
+ });
}
const { subscription, options } = await this.getPackageOptions(orgId);
diff --git a/apps/docs/quickstart.mdx b/apps/docs/quickstart.mdx
index a27c64ef..f139f860 100644
--- a/apps/docs/quickstart.mdx
+++ b/apps/docs/quickstart.mdx
@@ -87,6 +87,12 @@ npm run prisma-db-push
```
+
+```bash Terminal
+docker compose -f "docker-compose.dev.yaml" up
+```
+
+
```bash Terminal
npm run dev
diff --git a/apps/frontend/.eslintrc.json b/apps/frontend/.eslintrc.json
index e6b03601..6cfcf667 100644
--- a/apps/frontend/.eslintrc.json
+++ b/apps/frontend/.eslintrc.json
@@ -10,7 +10,8 @@
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
- "@next/next/no-html-link-for-pages": ["error", "apps/frontend/pages"]
+ "@next/next/no-html-link-for-pages": ["error", "apps/frontend/pages"],
+ "no-extra-boolean-cast": "off"
}
},
{
diff --git a/apps/frontend/next.config.js b/apps/frontend/next.config.js
index 007b2aa5..c79aae74 100644
--- a/apps/frontend/next.config.js
+++ b/apps/frontend/next.config.js
@@ -12,6 +12,9 @@ const nextConfig = {
// See: https://github.com/gregberge/svgr
svgr: false,
},
+ env: {
+ isBillingEnabled: String(!!process.env.STRIPE_PUBLISHABLE_KEY),
+ }
};
const plugins = [
diff --git a/apps/frontend/src/app/global.css b/apps/frontend/src/app/global.css
index 3322af2c..49c36cb4 100644
--- a/apps/frontend/src/app/global.css
+++ b/apps/frontend/src/app/global.css
@@ -252,9 +252,9 @@ html {
background-color: #ffdd00;
}
-#renderEditor:not(:has(:first-child)) {
- display: none;
-}
+/*#renderEditor:not(:has(:first-child)) {*/
+/* display: none;*/
+/*}*/
.w-md-editor {
background-color: #131B2C !important;
border: 0 !important;
diff --git a/apps/frontend/src/components/launches/add.edit.model.tsx b/apps/frontend/src/components/launches/add.edit.model.tsx
index 0722d6c4..1417b187 100644
--- a/apps/frontend/src/components/launches/add.edit.model.tsx
+++ b/apps/frontend/src/components/launches/add.edit.model.tsx
@@ -346,7 +346,7 @@ export const AddEditModal: FC<{
onChange={setSelectedIntegrations}
/>
)}
-
+
{!existingData.integration && !showHide.hideTopEditor ? (
<>
You are in global editing mode
diff --git a/apps/frontend/src/components/launches/calendar.tsx b/apps/frontend/src/components/launches/calendar.tsx
index 4f860f16..7f5a02a3 100644
--- a/apps/frontend/src/components/launches/calendar.tsx
+++ b/apps/frontend/src/components/launches/calendar.tsx
@@ -13,7 +13,7 @@ import { useFetch } from '@gitroom/helpers/utils/custom.fetch';
import { ExistingDataContextProvider } from '@gitroom/frontend/components/launches/helpers/use.existing.data';
import { useDrag, useDrop } from 'react-dnd';
import { DNDProvider } from '@gitroom/frontend/components/launches/helpers/dnd.provider';
-import { Integration, Post } from '@prisma/client';
+import { Integration, Post, State } from '@prisma/client';
import { useAddProvider } from '@gitroom/frontend/components/launches/add.provider.component';
import { CommentComponent } from '@gitroom/frontend/components/launches/comments/comment.component';
import { useSWRConfig } from 'swr';
@@ -301,15 +301,9 @@ const CalendarColumnRender: FC<{ day: number; hour: string }> = (props) => {
closeOnEscape: false,
withCloseButton: false,
classNames: {
- modal: 'bg-transparent text-white',
+ modal: 'w-[100%] max-w-[1400px] bg-transparent text-white',
},
- children: (
- ({})}
- integrations={integrations}
- date={getDate}
- />
- ),
+ children: ({})} />,
size: '80%',
// title: `Adding posts for ${getDate.format('DD/MM/YYYY HH:mm')}`,
});
@@ -346,6 +340,7 @@ const CalendarColumnRender: FC<{ day: number; hour: string }> = (props) => {
void;
integrations: Integrations[];
+ state: State;
post: Post & { integration: Integration };
}> = (props) => {
- const { editPost, post, date, integrations } = props;
+ const { editPost, post, date, integrations, state } = props;
const [{ opacity }, dragRef] = useDrag(
() => ({
type: 'post',
@@ -401,10 +397,10 @@ const CalendarItem: FC<{
p.identifier === post.integration?.providerIdentifier
)?.name
diff --git a/apps/frontend/src/components/layout/top.menu.tsx b/apps/frontend/src/components/layout/top.menu.tsx
index 7d4d0dea..e0f586cc 100644
--- a/apps/frontend/src/components/layout/top.menu.tsx
+++ b/apps/frontend/src/components/layout/top.menu.tsx
@@ -38,6 +38,7 @@ export const menuItems = [
icon: 'billing',
path: '/billing',
role: ['ADMIN', 'SUPERADMIN'],
+ requireBilling: true,
},
];
@@ -50,6 +51,9 @@ export const TopMenu: FC = () => {
{menuItems
.filter((f) => {
+ if (f.requireBilling && process.env.isBillingEnabled === 'false') {
+ return false;
+ }
if (f.role) {
return f.role.includes(user?.role!);
}
diff --git a/docker-compose.dev.yaml b/docker-compose.dev.yaml
new file mode 100644
index 00000000..5948c53f
--- /dev/null
+++ b/docker-compose.dev.yaml
@@ -0,0 +1,26 @@
+version: '3.9'
+
+services:
+ gitroom-postgres:
+ image: postgres:14.5
+ container_name: gitroom-postgres
+ restart: always
+ environment:
+ POSTGRES_PASSWORD: gitroom-local-pwd
+ POSTGRES_USER: gitroom-local
+ POSTGRES_DB: gitroom-db-local
+ volumes:
+ - postgres-volume:/var/lib/postgresql/data
+ ports:
+ - 5432:5432
+ gitroom-redis:
+ image: redis:7.2
+ container_name: gitroom-redis
+ restart: always
+ ports:
+ - 6379:6379
+
+
+volumes:
+ postgres-volume:
+ external: false