Skip to content

Commit

Permalink
Merge pull request #979 from AmruthPillai/feature/turbo
Browse files Browse the repository at this point in the history
Implement Turbo Workspaces, add ARM64 support, fix Google OAuth etc.
  • Loading branch information
AmruthPillai authored Aug 22, 2022
2 parents 99ddeb2 + 5b6f6b7 commit 4a1c007
Show file tree
Hide file tree
Showing 48 changed files with 1,199 additions and 51,305 deletions.
8 changes: 7 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Build Artifacts
dist
.next
.turbo

# IDEs
.vscode

# Project Metadata
.crowdin.yml

# Documentation
README.md
SECURITY.md
CHANGELOG.md
CODE_OF_CONDUCT.md

# Project Dependencies
node_modules
Expand All @@ -18,4 +24,4 @@ Dockerfile
docker-compose.yml

# Android App
/app
/app
18 changes: 12 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Turbo Cache (Optional)
TURBO_TEAM=
TURBO_TOKEN=

# Server + Client
TZ=UTC
PUBLIC_URL=http://localhost:3000
PUBLIC_SERVER_URL=http://localhost:3000/api
PUBLIC_URL=http://client:3000
PUBLIC_SERVER_URL=http://server:3100
PUBLIC_GOOGLE_CLIENT_ID=

# Server + Database
Expand All @@ -18,10 +22,12 @@ JWT_SECRET=
JWT_EXPIRY_TIME=604800
GOOGLE_CLIENT_SECRET=
GOOGLE_API_KEY=
SENDGRID_API_KEY=
SENDGRID_FORGOT_PASSWORD_TEMPLATE_ID=
SENDGRID_FROM_NAME=
SENDGRID_FROM_EMAIL=
MAIL_FROM_NAME=
MAIL_FROM_EMAIL=
MAIL_HOST=
MAIL_PORT=
MAIL_USERNAME=
MAIL_PASSWORD=
STORAGE_BUCKET=
STORAGE_REGION=
STORAGE_ENDPOINT=
Expand Down
22 changes: 11 additions & 11 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@
"extends": ["plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
"plugins": ["@typescript-eslint/eslint-plugin", "simple-import-sort", "unused-imports"],
"rules": {
// TypeScript ESLint
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
// Unused Imports
"no-unused-vars": "off",
// Simple Import Sort
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
// Unused Imports
"no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "none",
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}
]
],
"unused-imports/no-unused-imports": "error",
// TypeScript ESLint
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"
},
"overrides": [
{
Expand Down
17 changes: 12 additions & 5 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,43 @@
---
name: Bug Report
about: Create a report to help improve
title: "[BUG] "
title: '[BUG] '
labels: bug
assignees: ''

---

**Describe the bug**

<!-- A clear and concise description of what the bug is. -->

**Product Flavor**

- [ ] Managed (https://rxresu.me)
- [ ] Self Hosted

**To Reproduce**

<!-- Steps to reproduce the behavior: -->

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**

<!-- A clear and concise description of what you expected to happen. -->

**Screenshots**

<!-- If applicable, add screenshots to help explain your problem. -->

**Desktop (please complete the following information):**
- OS: <!--[e.g. iOS]-->
- Browser <!--[e.g. chrome, safari]-->
- Version <!--[e.g. 22]-->

- OS: <!--[e.g. iOS]-->
- Browser <!--[e.g. chrome, safari]-->
- Version <!--[e.g. 22]-->

**Additional context**

<!-- Add any other context about the problem here. -->
7 changes: 5 additions & 2 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
---
name: Feature Request
about: Suggest an idea for this project
title: "[FEATURE] "
title: '[FEATURE] '
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**

<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

**Describe the solution you'd like**

<!-- A clear and concise description of what you want to happen. -->

**Describe alternatives you've considered**

<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Additional context**

<!-- Add any other context or screenshots about the feature request here. -->
12 changes: 12 additions & 0 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@ jobs:
name: Client
runs-on: ubuntu-latest

env:
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}

steps:
- name: Checkout the repository
uses: actions/checkout@v3.0.2
with:
fetch-depth: 2

- id: version
name: Get Version
Expand Down Expand Up @@ -46,9 +52,15 @@ jobs:
name: Server
runs-on: ubuntu-latest

env:
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}

steps:
- name: Checkout the repository
uses: actions/checkout@v3.0.2
with:
fetch-depth: 2

- id: version
name: Get Version
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Build Docker Image

on: pull_request

jobs:
client:
name: Client
runs-on: ubuntu-latest

env:
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}

steps:
- name: Checkout the repository
uses: actions/checkout@v3.0.2
with:
fetch-depth: 2

- id: vars
name: Get Short SHA
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"

- name: Set up QEMU
uses: docker/setup-qemu-action@v2.0.0

- id: buildx
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.0.0
with:
install: true

- id: version
name: Get Version
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}

- name: Build Client Image
uses: docker/build-push-action@v3.1.1
with:
context: .
push: false
file: client/Dockerfile
platforms: linux/amd64,linux/arm64
tags: |
amruthpillai/reactive-resume:client-latest
amruthpillai/reactive-resume:client-${{ steps.vars.outputs.sha_short }}
ghcr.io/amruthpillai/reactive-resume:client-latest
ghcr.io/amruthpillai/reactive-resume:client-${{ steps.vars.outputs.sha_short }}
server:
name: Server
runs-on: ubuntu-latest

env:
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}

steps:
- name: Checkout the repository
uses: actions/checkout@v3.0.2
with:
fetch-depth: 2

- name: Set up QEMU
uses: docker/setup-qemu-action@v2.0.0

- id: buildx
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.0.0
with:
install: true

- id: version
name: Get Version
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}

- name: Build Server Image
uses: docker/build-push-action@v3.1.1
with:
context: .
push: false
file: server/Dockerfile
platforms: linux/amd64,linux/arm64
tags: |
amruthpillai/reactive-resume:server-latest
amruthpillai/reactive-resume:server-${{ steps.vars.outputs.sha_short }}
ghcr.io/amruthpillai/reactive-resume:server-latest
ghcr.io/amruthpillai/reactive-resume:server-${{ steps.vars.outputs.sha_short }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@
node_modules

# macOS
.DS_Store
.DS_Store

# Turbo
.turbo
6 changes: 0 additions & 6 deletions .husky/pre-commit

This file was deleted.

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ CHANGELOG.md

# Project Dependencies
node_modules
pnpm-lock.yaml

# Docker
Dockerfile
Expand Down
8 changes: 6 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "lokalise.i18n-ally"]
}
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"lokalise.i18n-ally"
]
}
12 changes: 6 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Debug: Server",
"port": 9229,
"request": "attach",
"restart": true,
"stopOnEntry": false,
"protocol": "inspector"
"protocol": "inspector",
"stopOnEntry": false
},
{
"name": "Debug: Client",
Expand All @@ -17,10 +17,10 @@
"command": "pnpm run dev:client",
"console": "integratedTerminal",
"serverReadyAction": {
"action": "debugWithChrome",
"pattern": "started server on .+, url: (https?://.+)",
"uriFormat": "%s",
"action": "debugWithChrome"
"uriFormat": "%s"
}
}
]
}
}
19 changes: 5 additions & 14 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
{
"css.validate": false,
"scss.validate": false,
"editor.wordWrap": "on",
"npm.packageManager": "pnpm",
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.wordWrap": "on",
"eslint.workingDirectories": [
"schema",
"client",
"server"
],
"i18n-ally.enabledFrameworks": [
"react"
],
"i18n-ally.keystyle": "nested",
"i18n-ally.localesPaths": [
"client/public/locales"
],
"i18n-ally.namespace": true,
"i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}",
"i18n-ally.sortKeys": true,
"scss.validate": false,
"conventionalCommits.scopes": [
"client",
"server",
Expand Down
Loading

0 comments on commit 4a1c007

Please sign in to comment.