Skip to content

Commit

Permalink
Merge branch 'main' into fix/hidden-menu-affects-settings-layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Khaan25 authored Oct 18, 2024
2 parents fa7c1ef + f6c094a commit e85cbd7
Show file tree
Hide file tree
Showing 483 changed files with 29,348 additions and 24,449 deletions.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/oss-gg-hack-submission.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: oss.gg hack submission 🕹️
description: "Submit your contribution for the for the oss.gg hackathon"
title: "[🕹️]"
labels: 🕹️ oss.gg, player submission, hacktoberfest
assignees: []
body:
- type: textarea
id: contribution-name
attributes:
label: What side quest or challenge are you solving?
description: Add the name of the side quest or challenge.
validations:
required: true
- type: textarea
id: points
attributes:
label: Points
description: How many points are assigned to this contribution?
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: What's the task your performed?
validations:
- type: textarea
id: proof
attributes:
label: Provide proof that you've completed the task
description: Screenshots, loom recordings, links to the content you shared or interacted with.
validations:
required: true
28 changes: 28 additions & 0 deletions .github/workflows/ci-front.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,33 @@ jobs:
run: npx nx storybook:build twenty-front
front-sb-test:
runs-on: ci-8-cores
timeout-minutes: 60
needs: front-sb-build
strategy:
matrix:
storybook_scope: [pages, modules]
env:
REACT_APP_SERVER_BASE_URL: http://localhost:3000
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
steps:
- name: Fetch local actions
uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/workflows/actions/yarn-install
- name: Install Playwright
run: cd packages/twenty-front && npx playwright install
- name: Front / Restore Storybook Task Cache
uses: ./.github/workflows/actions/task-cache
with:
tag: scope:frontend
tasks: storybook:build
- name: Front / Write .env
run: npx nx reset:env twenty-front
- name: Run storybook tests
run: npx nx storybook:serve-and-test:static twenty-front --configuration=${{ matrix.storybook_scope }}
front-sb-test-shipfox:
runs-on: shipfox-8vcpu-ubuntu-2204
timeout-minutes: 60
needs: front-sb-build
strategy:
matrix:
Expand All @@ -69,6 +96,7 @@ jobs:
run: npx nx storybook:serve-and-test:static twenty-front --configuration=${{ matrix.storybook_scope }}
front-sb-test-performance:
runs-on: ci-8-cores
timeout-minutes: 60
env:
REACT_APP_SERVER_BASE_URL: http://localhost:3000
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
Expand Down
36 changes: 11 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
docker-dev-build:
make -C packages/twenty-docker dev-build

docker-dev-up:
make -C packages/twenty-docker dev-up

docker-dev-start:
make -C packages/twenty-docker dev-start

docker-dev-stop:
make -C packages/twenty-docker dev-stop

docker-dev-sh:
make -C packages/twenty-docker dev-sh

postgres-on-docker:
make -C packages/twenty-postgres provision-on-docker

postgres-on-macos-arm:
make -C packages/twenty-postgres provision-on-macos-arm

postgres-on-macos-intel:
make -C packages/twenty-postgres provision-on-macos-intel

postgres-on-linux:
make -C packages/twenty-postgres provision-on-linux
docker run \
--name twenty_postgres \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=default \
-v twenty_db_data:/var/lib/postgresql/data \
-p 5432:5432 \
twentycrm/twenty-postgres:latest

redis-on-docker:
docker run -d --name twenty_redis -p 6379:6379 redis/redis-stack-server:latest
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@ Your turn 👇

» 11-October-2024 by [thefool76](https://oss.gg/thefool76) poster Link: [poster](https://drive.google.com/file/d/1cIC1eitvY6zKVTXKq2LnVrS_2Ho9H8-P/view?usp=sharing)

» 12-October-2024 by [Ionfinisher](https://oss.gg/Ionfinisher) poster Link: [poster](https://x.com/ion_finisher/status/1845168965963628802)

» 14-October-2024 by [AliYar-Khan](https://oss.gg/AliYar-Khan) poster Link: [poster](https://x.com/Mr_Programmer14/status/1845888855183884352)

» 16-October-2024 by [Harsh BHat](https://oss.gg/harshsbhat) poster Link: [poster](https://x.com/HarshBhatX/status/1846233330435477531)

» 17-October-2024 by [Atharva Deshmukh](https://oss.gg/Atharva-3000) poster Link: [poster](https://x.com/0x_atharva/status/1846915861191577697)

---
10 changes: 9 additions & 1 deletion oss-gg/twenty-design-challenges/2-design-new-logo-twenty.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**Side Quest**: Design/Create new Twenty logo, tweet your design, and mention @twentycrm.
**Points**: 300 Points
**Proof**: Create a logo uploade it on any of the platform and add your oss handle and logo link to the list below.
**Proof**: Create a logo upload it on any of the platform and add your oss handle and logo link to the list below.

Please follow the following schema:

Expand All @@ -20,5 +20,13 @@ Your turn 👇

» 11-October-2024 by [thefool76](https://oss.gg/thefool76) Logo Link: [logo](https://drive.google.com/file/d/1DxSwNY_i90kGgWzPQj5SxScBz_6r02l4/view?usp=sharing) » tweet Link: [tweet](https://x.com/thefool1135/status/1844693487067034008)

» 13-October-2024 by [Atharva_404](https://oss.gg/Atharva-3000) Logo Link: [logo](https://drive.google.com/drive/folders/1XB7ELR7kPA4x7Fx5RQr8wo5etdZAZgcs?usp=drive_link) » tweet Link: [tweet](https://x.com/0x_atharva/status/1845421218914095453)

» 13-October-2024 by [Ionfinisher](https://oss.gg/Ionfinisher) Logo Link: [logo](https://drive.google.com/file/d/1l9vE8CIjW9KfdioI5WKzxrdmvO8LR4j7/view?usp=drive_link) » tweet Link: [tweet](https://x.com/ion_finisher/status/1845466470429442163)

» 16-October-2024 by [harshsbhat](https://oss.gg/harshsbhat) Logo Link: [logo](https://drive.google.com/file/d/1jmqwNvlSyWSY1-pCG63TAtDvCoVa8xg-/view?usp=sharing) » tweet Link: [tweet](https://x.com/HarshBhatX/status/1846234658712772977)

» 17-October-2024 by [shlok-py](https://oss.gg/shlok-py) Logo Link: [logo](https://drive.google.com/file/d/1BakHRLJul6DcNbLyeOXgJO9Ap4DpUxO9/view?usp=sharing) » tweet Link: [tweet](https://x.com/koirala_shlok/status/1846910669658247201)


---
18 changes: 18 additions & 0 deletions oss-gg/twenty-side-quest/1-quote-tweet-20-oss-gg-launch.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ Your turn 👇

////////////////////////////

» 13-October-2024 by Vanshika Dargan
» Link to Tweet: https://x.com/VanshikaDargan/status/1845467453108949123

» 13-October-2024 by Utsav Bhattarai
» Link to Tweet: https://x.com/utsavdotdev/status/1845417863462649900

» 10-October-2024 by Devansh Baghel
» Link to Tweet: https://x.com/DevanshBaghel5/status/1844359648037748954

Expand All @@ -28,3 +34,15 @@ Your turn 👇

» 11-October-2024 by Aritra Sadhukhan
» Link to Tweet: https://x.com/AritraDevelops/status/1844670236512878646

» 13-October-2024 by Nabhag Motivaras
» Link to Tweet: https://x.com/NabhagMotivaras/status/1845449144695218357

» 13-October-2024 by Ali Yar Khan
» Link to Tweet: https://x.com/Mr_Programmer14/status/1845527862549577860

» 13-October-2024 by Yash Parmar
» Link to Tweet: https://x.com/yashp3020/status/1845720834716959009

» 16-October-2024 by Harsh Bhat
» Link to Tweet: https://x.com/HarshBhatX/status/1846252536241508392
5 changes: 5 additions & 0 deletions oss-gg/twenty-side-quest/2-tweet-about-fav-twenty-feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ Your turn 👇
» 11-October-2024 by Bhavesh Mishra
» Link to Tweet: https://x.com/thefool1135/status/1844456500380696969

» 13-October-2024 by Ali Yar Khan
» Link to Tweet: https://x.com/Mr_Programmer14/status/1845530448245711197

» 16-October-2024 by Harsh Bhat
» Link to Tweet: https://x.com/HarshBhatX/status/1846075312691413066
---
11 changes: 11 additions & 0 deletions oss-gg/twenty-side-quest/4-meme-magic.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,15 @@ Your turn 👇
» 11-October-2024 by Bhavesh Mishra
» Link to Tweet: https://x.com/thefool1135/status/1844458836402503931

» 12-October-2024 by Chirag Arora
» Link to Tweet: https://x.com/Chirag8023/status/1845108226527994222

» 13-October-2024 by Ali Yar Khan
» Link to Tweet: https://x.com/Mr_Programmer14/status/1845537662587072697

» 14-October-2024 by Yash Parmar
» Link to Tweet: [https://x.com/yashp3020/status/1845108226527994222](https://x.com/yashp3020/status/1845720142702842093)

» 16-October-2024 by Harsh Bhat
» Link to Tweet: https://x.com/HarshBhatX/status/1844698253104709899
---
11 changes: 11 additions & 0 deletions oss-gg/twenty-side-quest/5-gif-magic.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,15 @@ Your turn 👇
» 11-October-2024 by Bhavesh Mishra
» Link to gif: https://shorturl.at/yln9H

» 12-October-2024 by Chirag Arora
» Link to gif: https://giphy.com/gifs/yCJIS2MGbBdifbnuj0

» 13-October-2024 by Nabhag Motivaras
» Link to gif: https://giphy.com/gifs/twenty-twentycrm-opensourcecrm-wCcsmnJuzzzGrfuf9B

» 15-October-2024 by Ali Yar Khan
» Link to gif: https://giphy.com/gifs/Q3f7T107wSsMJlT7aj

» 16-October-2024 by Harsh Bhat
» Link to gif: https://giphy.com/gifs/oss-twentycrm-mgoYSDrjIalUL7XJzm
---
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import styled from '@emotion/styled';
import React, { useId } from 'react';

interface TextInputProps {
label?: string;
Expand All @@ -18,7 +18,7 @@ const StyledContainer = styled.div<{ fullWidth?: boolean }>`
margin-bottom: ${({ theme }) => theme.spacing(4)};
`;

const StyledLabel = styled.span`
const StyledLabel = styled.label`
color: ${({ theme }) => theme.font.color.light};
font-size: ${({ theme }) => theme.font.size.xs};
font-weight: ${({ theme }) => theme.font.weight.semiBold};
Expand Down Expand Up @@ -65,12 +65,15 @@ const TextInput: React.FC<TextInputProps> = ({
placeholder,
icon,
}) => {
const inputId = useId();

return (
<StyledContainer fullWidth={fullWidth}>
{label && <StyledLabel>{label}</StyledLabel>}
{label && <StyledLabel htmlFor={inputId}>{label}</StyledLabel>}
<StyledInputContainer>
{icon && <StyledIcon>{icon}</StyledIcon>}
<StyledInput
id={inputId}
type="text"
value={value}
onChange={(e) => onChange(e.target.value)}
Expand Down
3 changes: 1 addition & 2 deletions packages/twenty-docker/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ TAG=latest
# POSTGRES_ADMIN_PASSWORD=replace_me_with_a_strong_password

PG_DATABASE_HOST=db:5432
REDIS_URL=redis://redis:6379

SERVER_URL=http://localhost:3000
# REDIS_HOST=redis
# REDIS_PORT=6379

# Use openssl rand -base64 32 for each secret
# ACCESS_TOKEN_SECRET=replace_me_with_a_random_string_access
Expand Down
25 changes: 0 additions & 25 deletions packages/twenty-docker/Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
dev-build:
@docker compose -f dev/docker-compose.yml down -v
@docker compose -f dev/docker-compose.yml build

dev-up:
@docker compose -f dev/docker-compose.yml up -d

dev-start:
@docker compose -f dev/docker-compose.yml start

dev-stop:
@docker compose -f dev/docker-compose.yml stop

dev-down:
@docker compose -f dev/docker-compose.yml down -v

dev-sh:
@docker compose -f dev/docker-compose.yml exec twenty-dev sh

dev-postgres-build:
@docker stop twenty_postgres || true
@docker rm twenty_postgres || true
@docker volume rm twenty_db_data || true
@docker compose -f dev/docker-compose.yml up --build postgres -d

prod-build:
@cd ../.. && docker build -f ./packages/twenty-docker/twenty/Dockerfile --tag twenty . && cd -

Expand Down
6 changes: 2 additions & 4 deletions packages/twenty-docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ services:
PG_DATABASE_URL: postgres://twenty:twenty@${PG_DATABASE_HOST}/default
SERVER_URL: ${SERVER_URL}
FRONT_BASE_URL: ${FRONT_BASE_URL:-$SERVER_URL}
REDIS_PORT: ${REDIS_PORT:-6379}
REDIS_HOST: ${REDIS_HOST:-redis}
REDIS_URL: ${REDIS_URL:-redis://localhost:6379}

ENABLE_DB_MIGRATIONS: "true"

Expand Down Expand Up @@ -59,8 +58,7 @@ services:
PG_DATABASE_URL: postgres://twenty:twenty@${PG_DATABASE_HOST}/default
SERVER_URL: ${SERVER_URL}
FRONT_BASE_URL: ${FRONT_BASE_URL:-$SERVER_URL}
REDIS_PORT: ${REDIS_PORT:-6379}
REDIS_HOST: ${REDIS_HOST:-redis}
REDIS_URL: ${REDIS_URL:-redis://localhost:6379}

ENABLE_DB_MIGRATIONS: "false" # it already runs on the server

Expand Down
6 changes: 2 additions & 4 deletions packages/twenty-docker/k8s/manifests/deployment-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ spec:
value: "https://crm.example.com:443"
- name: "PG_DATABASE_URL"
value: "postgres://twenty:[email protected]/default"
- name: "REDIS_HOST"
value: "twentycrm-redis.twentycrm.svc.cluster.local"
- name: "REDIS_PORT"
value: 6379
- name: "REDIS_URL"
value: "redis://twentycrm-redis.twentycrm.svc.cluster.local:6379"
- name: ENABLE_DB_MIGRATIONS
value: "true"
- name: SIGN_IN_PREFILLED
Expand Down
6 changes: 2 additions & 4 deletions packages/twenty-docker/k8s/manifests/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ spec:
value: "bull-mq"
- name: "CACHE_STORAGE_TYPE"
value: "redis"
- name: "REDIS_HOST"
value: "twentycrm-redis.twentycrm.svc.cluster.local"
- name: "REDIS_PORT"
value: 6379
- name: "REDIS_URL"
value: "redis://twentycrm-redis.twentycrm.svc.cluster.local:6379"
- name: ACCESS_TOKEN_SECRET
valueFrom:
secretKeyRef:
Expand Down
8 changes: 2 additions & 6 deletions packages/twenty-docker/k8s/terraform/deployment-server.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,8 @@ resource "kubernetes_deployment" "twentycrm_server" {
value = "postgres://twenty:${var.twentycrm_pgdb_admin_password}@${kubernetes_service.twentycrm_db.metadata.0.name}.${kubernetes_namespace.twentycrm.metadata.0.name}.svc.cluster.local/default"
}
env {
name = "REDIS_HOST"
value = "${kubernetes_service.twentycrm_redis.metadata.0.name}.${kubernetes_namespace.twentycrm.metadata.0.name}.svc.cluster.local"
}
env {
name = "REDIS_PORT"
value = 6379
name = "REDIS_URL"
value = "redis://${kubernetes_service.twentycrm_redis.metadata.0.name}.${kubernetes_namespace.twentycrm.metadata.0.name}.svc.cluster.local:6379"
}
env {
name = "ENABLE_DB_MIGRATIONS"
Expand Down
9 changes: 2 additions & 7 deletions packages/twenty-docker/k8s/terraform/deployment-worker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,8 @@ resource "kubernetes_deployment" "twentycrm_worker" {
}

env {
name = "REDIS_HOST"
value = "${kubernetes_service.twentycrm_redis.metadata.0.name}.${kubernetes_namespace.twentycrm.metadata.0.name}.svc.cluster.local"
}

env {
name = "REDIS_PORT"
value = 6379
name = "REDIS_URL"
value = "redis://${kubernetes_service.twentycrm_redis.metadata.0.name}.${kubernetes_namespace.twentycrm.metadata.0.name}.svc.cluster.local:6379"
}

env {
Expand Down
Loading

0 comments on commit e85cbd7

Please sign in to comment.