Skip to content

Commit

Permalink
develop into main (#83)
Browse files Browse the repository at this point in the history
* chore(ci): Made pipeline fixes (#60)

* Adding PR title and es lint, prettier, unit test and e2e test checks

* Adding commands based on package.json

* added husky

* order checks

* folder updates

* folder updates

* eslint check

* replaced

* Add pnpm

* refactored installation for pnpm

* push diff validate pr yml

* deleted commitlintrc file

* added makefile

* update working directory of ci

* update .gitignore

* update ci

* update ci

---------

Co-authored-by: Bhavya Jain <[email protected]>
Co-authored-by: Ben <[email protected]>

* improve workflow

* fixing pr title validation identation issue

* update readme (#62)

* test(api): Added cleanup test to user module (#61)

* added afterALl in user test

* update CI

* Update README.md

* Update README.md

* added redis (#63)

* refactor: Moved items of backend folder to root (#65)

* refactored backend folder

* fixed tests

* fixed tests

* fix: Migrate to ioredis package (#70)

* migrate to ioredis

* update lockfile

* fixed tests

* update CI workflow

* Update README.md

* Update README-backend.md

* feat: write-review-page (#71)

* Add joined at date for searched user

* Update user search query to respect respect http standards

* Enable cors

* minor fixes

* Correct relations

* Check if users are connected when doing an user search

* fix db structure

* fix namings

* feat: auth flow changes (#73)

* Add joined at date for searched user

* Update user search query to respect respect http standards

* Enable cors

* minor fixes

* Correct relations

* Check if users are connected when doing an user search

* fix db structure

* fix namings

* Use passwordless signup

* Return props needed for signin redirection

* feat: Added feature to search by social profile (#77)

* added feature to search by social profile

* add linkedin profile fetching functionality

* finishing touches

* delete user controller test file

* fixed inconsistencies in e2e tests

* made search user endpoint public

* feat: Emails are stored in lowercase (#82)

* feat: Emails are stored in lowercase

* organized code

* fix: dashboard various fixes (#78)

* Add joined at date for searched user

* Update user search query to respect respect http standards

* Correct relations

* Check if users are connected when doing an user search

* fix db structure

* Fix: is connection should be true when userId is in the followers

* Do not use mutler for uploading profile pics
* Context: React native web sends base64 images that cannot be parsed by mutler

* update review properties

* add get user endpoint

* use headline insted of jobtitle

* remove console logs

* remove console log

* Move reviwes in dedicated controller.
* Rename ratings to reviews
* Use ratings only for professionalism/communication/reliability
* Create reviews controller and service
* Remove route with */self.

* enable swagger plugin

* review db structure changes:
* change id from int to string
* add state
* add favorite review model

* Add ability to like/unlike reviews and review state

* add ability to modify and update own review

* feat: add connections controller and move specific endpoints from user controller here

* fix: review annonymous property

* fix: add isEmailVerified to connection

* fix rebase errors

* Move search by profile url in connections.
* Add authType property on connectionDto
* remove jobTitle property. Use headline everywhere

* Return transformed user when social account is already existen

* add logging

* fix reviews issues

* rename dto folder

* rename methods

* make only one DB query for craeting a connection

* change DTO folder to a random name (because gh is not case sensitive and doesn't see lowering the case of the file as an actual change)

* rename dto folder

* squash migrations

* fix tests

* feat: implement user settings endpoints (#84)

* feat: user profile  (#85)

* fix: Docker builds were not running due to module errors (#86)

* feat: implement push notifications (#87)

* feat: implement push notifications

* fix tests

---------

Co-authored-by: Rajdip Bhattacharya <[email protected]>
Co-authored-by: Bhavya Jain <[email protected]>
Co-authored-by: Ben <[email protected]>
Co-authored-by: Adelina Enache <[email protected]>
  • Loading branch information
5 people authored May 30, 2024
1 parent 42d4438 commit 66071b1
Show file tree
Hide file tree
Showing 137 changed files with 8,240 additions and 4,941 deletions.
47 changes: 47 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_CALLBACK_URL=

FACEBOOK_OAUTH_CLIENT_ID=
FACEBOOK_OAUTH_CLIENT_SECRET=
FACEBOOK_OAUTH_CALLBACK_URL=

FACEBOOK_SOCIAL_ACCOUNT_LINK_CLIENT_ID=
FACEBOOK_SOCIAL_ACCOUNT_LINK_CLIENT_SECRET=
FACEBOOK_SOCIAL_ACCOUNT_LINK_CALLBACK_URL=

APPLE_CLIENT_ID=
APPLE_CALLBACK_URL=
APPLE_TEAM_ID=
APPLE_KEY_ID=
APPLE_KEY_CONTENTS=

LINKEDIN_OAUTH_CLIENT_ID=
LINKEDIN_OAUTH_CLIENT_SECRET=
LINKEDIN_OAUTH_CALLBACK_URL=

LINKEDIN_SOCIAL_ACCOUNT_LINK_CLIENT_ID=
LINKEDIN_SOCIAL_ACCOUNT_LINK_CLIENT_SECRET=
LINKEDIN_SOCIAL_ACCOUNT_LINK_CALLBACK_URL=

FLY_ACCESS_TOKEN=
DATABASE_URL=postgresql://postgres:[email protected]:5432/culero
JWT_SECRET=secret

SMTP_HOST=
SMTP_PORT=
SMTP_EMAIL_ADDRESS=
SMTP_PASSWORD=
FROM_EMAIL=

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_S3_BUCKET_NAME=
AWS_REGION=
DOMAIN=https://culero.com/
PROFILES_DIRECTORY=

REDIS_URL=redis://localhost:6379

LINKEDIN_PROFILE_FETCHER_API_KEY=
LINKEDIN_PROFILE_FETCHER_HOST=
File renamed without changes.
10 changes: 4 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- '!main'
- '!develop'
- '*'
pull_request:

jobs:
lint:
Expand All @@ -19,14 +20,14 @@ jobs:
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
working-directory: ./packages
run: pnpm install
- name: Run Prettier (Pre-commit or in workflow)
working-directory: ./packages
- name: Run ESLint
run: pnpm lint

test:
runs-on: ubuntu-latest
env:
REDIS_URL: redis://localhost:6379
steps:
- uses: actions/checkout@v3
- name: Use Node.js 20
Expand All @@ -38,11 +39,8 @@ jobs:
- name: Install dependencies
run: pnpm install
- name: Run ESLint
working-directory: ./packages
run: pnpm lint
- name: Run unit tests
working-directory: ./packages
run: pnpm run test:unit
- name: Run e2e tests
working-directory: ./packages
run: pnpm run test:e2e
15 changes: 12 additions & 3 deletions .github/workflows/prod-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@ on:
push:
branches:
- main
paths: ['backend/**', '.github/workflows/prod-backend.yml']
paths:
[
'src/**',
'.github/workflows/prod-backend.yml',
'Dockerfile',
'package.json',
'fly.backend.toml',
]

env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
DATABASE_URL: ${{ secrets.DB_PROD_URL }}

jobs:
deploy-backend-prod:
Expand All @@ -19,6 +26,8 @@ jobs:
- name: Install fly CLI
run: |
curl -L https://fly.io/install.sh | sh
- name: Install pnpm
run: npm install -g pnpm
- name: pnpm install
run: pnpm install
- name: Deploy migrations
Expand All @@ -27,6 +36,6 @@ jobs:
run: |
~/.fly/bin/fly deploy \
--config fly.backend.toml \
--dockerfile ./backend/Dockerfile \
--dockerfile Dockerfile \
--app culero-stage-api \
--access-token ${{ secrets.FLY_ACCESS_TOKEN }}
15 changes: 12 additions & 3 deletions .github/workflows/stage-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@ on:
push:
branches:
- develop
paths: ['backend/**', '.github/workflows/stage-backend.yml']
paths:
[
'src/**',
'.github/workflows/prod-backend.yml',
'Dockerfile',
'package.json',
'fly.backend.toml',
]

env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
DATABASE_URL: ${{ secrets.DB_STAGE_URL }}

jobs:
deploy-backend-stage:
Expand All @@ -19,6 +26,8 @@ jobs:
- name: Install fly CLI
run: |
curl -L https://fly.io/install.sh | sh
- name: Install pnpm
run: npm install -g pnpm
- name: pnpm install
run: pnpm install
- name: Deploy migrations
Expand All @@ -27,6 +36,6 @@ jobs:
run: |
~/.fly/bin/fly deploy \
--config fly.backend.toml \
--dockerfile ./backend/Dockerfile \
--dockerfile Dockerfile \
--app culero-stage-api \
--access-token ${{ secrets.FLY_ACCESS_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/validate-pr-title.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Lint PR"
name: 'Lint PR'

on:
pull_request:
Expand All @@ -18,6 +18,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Lint PR
uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
181 changes: 29 additions & 152 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,165 +1,42 @@
# ---- macOS ----
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# compiled output
/dist
/node_modules

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# ---- Node ----
# Logs
logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz
# OS
.DS_Store

# Yarn Integrity file
.yarn-integrity
# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

.vscode/
.idea/
.env.prod
.env.stage

**/coverage-e2e/
data
coverage-e2e/
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions backend/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ WORKDIR /app

RUN npm i -g pnpm

COPY backend/package.json .
COPY backend/tsconfig.json .
COPY package.json .
COPY tsconfig.json .

RUN pnpm install

COPY backend .
COPY . .

RUN pnpm db:generate-types
RUN pnpm build
Expand Down
Loading

0 comments on commit 66071b1

Please sign in to comment.