From c84e269b2197a5d0e32bb2c1334cffb931911124 Mon Sep 17 00:00:00 2001 From: Nevo David <100117126+nevo-david@users.noreply.github.com> Date: Wed, 27 Mar 2024 14:23:37 +0700 Subject: [PATCH 01/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6cd6fffa..1b238457 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@

- +

From 3638af2ac3e771ad878d595430b7853db04d938a Mon Sep 17 00:00:00 2001 From: Nevo David <100117126+nevo-david@users.noreply.github.com> Date: Wed, 27 Mar 2024 19:46:30 +0700 Subject: [PATCH 02/14] Update README.md --- README.md | 40 ++++++++-------------------------------- 1 file changed, 8 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 1b238457..95bc46f0 100644 --- a/README.md +++ b/README.md @@ -64,45 +64,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 From 93ffb3dfbc6cb424e7a054bb45f64d4725fbc5e1 Mon Sep 17 00:00:00 2001 From: Nevo David <100117126+nevo-david@users.noreply.github.com> Date: Wed, 27 Mar 2024 19:47:47 +0700 Subject: [PATCH 03/14] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 95bc46f0..c9d6f003 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,8 @@

Your open-source launch week.

- 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.
+ an alternative to: Buffer.com, Hypefury, Twitter Hunter, Etc...

From 514b8799bb1756c2a5b6f369e39fc8100db81989 Mon Sep 17 00:00:00 2001 From: Nevo David <100117126+nevo-david@users.noreply.github.com> Date: Wed, 27 Mar 2024 19:48:38 +0700 Subject: [PATCH 04/14] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c9d6f003..1ebe62be 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,10 @@

-

Your open-source launch week.

+

Your open-source launch week.


+ 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.
- an alternative to: Buffer.com, Hypefury, Twitter Hunter, Etc...

From e1d229c3d6f98b0ac838392cdb3fdf59adc9bb5a Mon Sep 17 00:00:00 2001 From: Nevo David <100117126+nevo-david@users.noreply.github.com> Date: Wed, 27 Mar 2024 19:49:33 +0700 Subject: [PATCH 05/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1ebe62be..2a2018fc 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@

-

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.
From fde4fcc21cdc89eebd9a359c8570e5a16f659384 Mon Sep 17 00:00:00 2001 From: Nevo David Date: Wed, 10 Apr 2024 18:49:03 +0700 Subject: [PATCH 06/14] feat: fixed modal size + fix safari not showing global edit --- apps/frontend/src/app/global.css | 6 +++--- apps/frontend/src/components/launches/add.edit.model.tsx | 2 +- apps/frontend/src/components/launches/calendar.tsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) 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 1996b360..d5d14ec8 100644 --- a/apps/frontend/src/components/launches/add.edit.model.tsx +++ b/apps/frontend/src/components/launches/add.edit.model.tsx @@ -300,7 +300,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 9d309724..58adbf52 100644 --- a/apps/frontend/src/components/launches/calendar.tsx +++ b/apps/frontend/src/components/launches/calendar.tsx @@ -292,10 +292,10 @@ 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: , - size: '80%', + size: 'auth', // title: `Adding posts for ${getDate.format('DD/MM/YYYY HH:mm')}`, }); }, []); From 0da098b6cf8fc4ac637b787e6f0057ae74959b0e Mon Sep 17 00:00:00 2001 From: Nevo David Date: Wed, 10 Apr 2024 18:54:56 +0700 Subject: [PATCH 07/14] feat: fixed modal size + fix safari not showing global edit --- apps/frontend/src/components/launches/add.edit.model.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/frontend/src/components/launches/add.edit.model.tsx b/apps/frontend/src/components/launches/add.edit.model.tsx index d5d14ec8..d7405cf0 100644 --- a/apps/frontend/src/components/launches/add.edit.model.tsx +++ b/apps/frontend/src/components/launches/add.edit.model.tsx @@ -300,7 +300,7 @@ export const AddEditModal: FC<{ onChange={setSelectedIntegrations} /> )} -
+
{!existingData.integration && !showHide.hideTopEditor ? ( <>
You are in global editing mode
From dc1323429ed941b2fabc0d3557660a027e944eab Mon Sep 17 00:00:00 2001 From: Nevo David Date: Wed, 10 Apr 2024 18:55:02 +0700 Subject: [PATCH 08/14] feat: fixed modal size + fix safari not showing global edit --- apps/frontend/src/components/launches/add.edit.model.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/frontend/src/components/launches/add.edit.model.tsx b/apps/frontend/src/components/launches/add.edit.model.tsx index d7405cf0..d5d14ec8 100644 --- a/apps/frontend/src/components/launches/add.edit.model.tsx +++ b/apps/frontend/src/components/launches/add.edit.model.tsx @@ -300,7 +300,7 @@ export const AddEditModal: FC<{ onChange={setSelectedIntegrations} /> )} -
+
{!existingData.integration && !showHide.hideTopEditor ? ( <>
You are in global editing mode
From ba842d4b0ada80e1c2a0335129cb56339a1595d5 Mon Sep 17 00:00:00 2001 From: Nevo David Date: Wed, 10 Apr 2024 20:08:03 +0700 Subject: [PATCH 09/14] feat: mark draft with grayscale --- apps/frontend/src/components/launches/calendar.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/frontend/src/components/launches/calendar.tsx b/apps/frontend/src/components/launches/calendar.tsx index 58adbf52..1bd86ba9 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'; @@ -331,6 +331,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', @@ -386,10 +388,10 @@ const CalendarItem: FC<{
p.identifier === post.integration?.providerIdentifier )?.name From 26814a39fc7304eebe4de94d4e33d050bed32b3d Mon Sep 17 00:00:00 2001 From: Md Azfar Alam Date: Thu, 2 May 2024 21:17:44 +0530 Subject: [PATCH 10/14] Create CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 128 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 CODE_OF_CONDUCT.md 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. From c04f9378c304bd216904acb7546255b4447d0969 Mon Sep 17 00:00:00 2001 From: Shun Yuan Date: Sat, 4 May 2024 20:15:55 +0800 Subject: [PATCH 11/14] feat: add docker-compose file & update env.example --- .env.example | 4 ++-- docker-compose.dev.yaml | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 docker-compose.dev.yaml 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/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 From 79c4dadc94670ddd15ce8b78b7d8fa355ade217a Mon Sep 17 00:00:00 2001 From: Shun Yuan Date: Sat, 4 May 2024 20:36:18 +0800 Subject: [PATCH 12/14] docs: update quickstart --- apps/docs/quickstart.mdx | 6 ++++++ 1 file changed, 6 insertions(+) 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 From ffaf8f949437d06e22145d82d19b57bd93f02475 Mon Sep 17 00:00:00 2001 From: Nevo David Date: Sun, 5 May 2024 15:40:18 +0700 Subject: [PATCH 13/14] feat: fix permissions --- .../services/auth/permissions/permissions.service.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/backend/src/services/auth/permissions/permissions.service.ts b/apps/backend/src/services/auth/permissions/permissions.service.ts index 7da47600..669bfc9b 100644 --- a/apps/backend/src/services/auth/permissions/permissions.service.ts +++ b/apps/backend/src/services/auth/permissions/permissions.service.ts @@ -61,7 +61,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); From 580bb6b1621ed7da7052b3e346a5374fc181aaf8 Mon Sep 17 00:00:00 2001 From: Nevo David Date: Mon, 6 May 2024 00:13:40 +0700 Subject: [PATCH 14/14] feat: remove billing if not stripe --- apps/frontend/.eslintrc.json | 3 ++- apps/frontend/next.config.js | 3 +++ apps/frontend/src/components/layout/top.menu.tsx | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) 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/components/layout/top.menu.tsx b/apps/frontend/src/components/layout/top.menu.tsx index f9ee9f2a..105988c5 100644 --- a/apps/frontend/src/components/layout/top.menu.tsx +++ b/apps/frontend/src/components/layout/top.menu.tsx @@ -28,6 +28,7 @@ export const menuItems = [ icon: 'billing', path: '/billing', role: ['ADMIN', 'SUPERADMIN'], + requireBilling: true, }, ]; @@ -40,6 +41,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!); }