Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remix migration #3789

Open
wants to merge 149 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
c39bbb5
refactor: remix migration
mariojsnunes Jul 22, 2024
9c1363d
fix: map not loading
mariojsnunes Jul 22, 2024
bcc67cd
fix: cypress
mariojsnunes Jul 22, 2024
f4d6879
fix: lint
mariojsnunes Jul 22, 2024
325896a
chore: cleanup
mariojsnunes Jul 22, 2024
3b4b927
chore: added sample tags endpoint
mariojsnunes Jul 22, 2024
fb63c32
chore: rename tags api route
mariojsnunes Jul 22, 2024
e13a3cc
fix: prod & dev builds scripts
mariojsnunes Jul 25, 2024
0aed9b0
Merge branch 'master' into feat/remix
mariojsnunes Jul 28, 2024
d9914e9
fix: unsubscribe route
mariojsnunes Jul 28, 2024
a0df909
fix: settings routes
mariojsnunes Jul 28, 2024
3839e02
fix: edit user route
mariojsnunes Jul 28, 2024
89963a7
fix: common.spec
mariojsnunes Jul 28, 2024
88f23f5
fix: signup.spec
mariojsnunes Jul 28, 2024
6cbf63d
fix: research seo
mariojsnunes Jul 28, 2024
9040e9f
Merge branch 'master' into feat/remix
mariojsnunes Aug 4, 2024
9307ae8
feat: routes reuse common layout (header and footer)
mariojsnunes Aug 4, 2024
c1e7d69
feat: use layout routes
mariojsnunes Aug 4, 2024
fa24279
fix: package tests
mariojsnunes Aug 11, 2024
6388ae6
fix: storybook components
mariojsnunes Aug 11, 2024
ddef9d7
Merge branch 'master' into feat/remix
mariojsnunes Aug 11, 2024
76485d2
fix: unit tests
mariojsnunes Aug 11, 2024
aaf126f
fix: howto tests
mariojsnunes Aug 11, 2024
20a5144
fix: server.js
mariojsnunes Aug 11, 2024
fb434d2
fix: lint?
mariojsnunes Aug 11, 2024
47e0f8d
fix: lint
mariojsnunes Aug 11, 2024
5e59a5d
fix: lint
mariojsnunes Aug 11, 2024
921aaae
fix: build
mariojsnunes Aug 11, 2024
c7a3cc1
fix: e2e
mariojsnunes Aug 11, 2024
0d4841d
chore: remove post-build
mariojsnunes Aug 15, 2024
0b3f345
fix: lint
mariojsnunes Aug 15, 2024
c7d4649
chore: setup sentry with remix
mariojsnunes Aug 15, 2024
797b53c
fix: circle ci cypress
mariojsnunes Aug 15, 2024
34650fd
fix: lint
mariojsnunes Aug 15, 2024
aa96f8e
fix: ci?
mariojsnunes Aug 15, 2024
1181a73
fix: countries
mariojsnunes Aug 15, 2024
0f77a44
chore: cleanup
mariojsnunes Aug 15, 2024
f027bb6
fix: map
mariojsnunes Aug 18, 2024
620998c
chore: remove themeStore
mariojsnunes Aug 18, 2024
1a71e2c
fix: unit tests
mariojsnunes Aug 18, 2024
0c3e57c
chore: remove __OA_COMMUNITY_PLATFORM_CONFIGURATION
mariojsnunes Aug 18, 2024
39cef67
fix: local cypress
mariojsnunes Aug 19, 2024
99a4055
fix: questions tests
mariojsnunes Aug 19, 2024
2ad20ab
chore: updated csp policy
mariojsnunes Aug 22, 2024
2b7ae2e
chore: remix server CSP and startup
mariojsnunes Aug 22, 2024
f41dfc4
fix: handle cypress errors
mariojsnunes Aug 22, 2024
810808b
chore: add @mui/base to remix server libs
mariojsnunes Aug 22, 2024
a382e2f
fix: added mui to remix ssr
mariojsnunes Aug 22, 2024
4fbde85
fix: cypress
mariojsnunes Aug 22, 2024
c00ff2f
fix: discussion test
mariojsnunes Aug 22, 2024
9abf8f7
chore: merge with master
mariojsnunes Aug 28, 2024
61b8ba8
fix: lint
mariojsnunes Aug 28, 2024
5a4e0a0
chore: added dockerfile (not working)
mariojsnunes Aug 28, 2024
ff02c70
fix: research seo and profile page
mariojsnunes Sep 12, 2024
4cf86dd
chore: update remix docs
mariojsnunes Sep 12, 2024
3de3e95
fix: rollback member image
mariojsnunes Sep 13, 2024
c893c82
chore: merge
mariojsnunes Sep 13, 2024
9ad4952
fix: yarn.lock
mariojsnunes Sep 13, 2024
c7172ee
fix: merge imports
mariojsnunes Sep 13, 2024
e315c37
refactor: deployment to fly.io
goratt12 Sep 13, 2024
0c73971
Merge branch 'feat/remix' of https://github.com/ONEARMY/community-pla…
goratt12 Sep 13, 2024
177ab0a
fix: lint
mariojsnunes Sep 13, 2024
9133d68
feat: deploy to fly.io
mariojsnunes Sep 13, 2024
7abad30
fix: circleci deploy
mariojsnunes Sep 13, 2024
4ce94b8
chore: deploy to fly
mariojsnunes Sep 15, 2024
f71838f
chore: fly deploy
mariojsnunes Sep 15, 2024
6ca6de8
chore: fly deploy
mariojsnunes Sep 15, 2024
48d7376
chore: fly deploy
mariojsnunes Sep 15, 2024
d94ab21
chore: fly deploy
mariojsnunes Sep 15, 2024
da78a31
chore: fly deploy
mariojsnunes Sep 15, 2024
fa0e8c2
chore: fly deploy
mariojsnunes Sep 15, 2024
9990fe0
chore: fly deploy
mariojsnunes Sep 15, 2024
dbc3f87
chore: fly deploy
mariojsnunes Sep 15, 2024
49c5ef8
chore: fly deploy
mariojsnunes Sep 15, 2024
d30568e
chore: fly deploy
mariojsnunes Sep 15, 2024
00f6ec2
chore: fly deploy
mariojsnunes Sep 15, 2024
e01606a
chore: deploy fly
mariojsnunes Sep 15, 2024
0c938d0
chore: fly deploy
mariojsnunes Sep 15, 2024
e8b4b2f
fix: deploy config
mariojsnunes Sep 17, 2024
d18ee6f
chore: deploy
mariojsnunes Sep 17, 2024
5b96ef2
chore: trigger deploy
mariojsnunes Sep 17, 2024
a7151d2
chore: test env variables
mariojsnunes Sep 17, 2024
2d451ef
chore: fly deploy
mariojsnunes Sep 18, 2024
b3d90fc
chore: deploy
mariojsnunes Sep 18, 2024
e57cd26
chore: trigger deploy
mariojsnunes Sep 18, 2024
1e053ff
chore: deploy
mariojsnunes Sep 18, 2024
8420a96
chore: trigger deploy
mariojsnunes Sep 18, 2024
61fb80b
chore: trigger deploy
mariojsnunes Sep 18, 2024
0038601
chore: trigger deploy
mariojsnunes Sep 18, 2024
e9f6b63
chore: trigger deploy
mariojsnunes Sep 18, 2024
9774ea8
chore: trigger deploy
mariojsnunes Sep 18, 2024
5005e07
chore: trigger deploy
mariojsnunes Sep 18, 2024
56695b6
chore: trigger deploy
mariojsnunes Sep 18, 2024
0270b54
chore: trigger deploy
mariojsnunes Sep 18, 2024
8d7e4b2
fix: theme default
mariojsnunes Sep 18, 2024
4f1eddc
chore: deploy
mariojsnunes Sep 18, 2024
c72d712
chore: add circleci variables to deploy
mariojsnunes Sep 19, 2024
f9e325b
chore: trigger deploy
mariojsnunes Sep 19, 2024
4e86a84
chore: trigger deploy
mariojsnunes Sep 19, 2024
b86730b
chore: try build secret
mariojsnunes Sep 19, 2024
0c65955
chore: test build secrets
mariojsnunes Sep 19, 2024
9a8a30e
chore: fix build secrets
mariojsnunes Sep 19, 2024
ad5607f
chore: deploy theme env
mariojsnunes Sep 19, 2024
e7ef18c
chore: fix build secrets
mariojsnunes Sep 19, 2024
21be91c
chore: mount secrets
mariojsnunes Sep 19, 2024
4aaf784
chore: mount secrets
mariojsnunes Sep 19, 2024
b21acfb
chore: fix mount secrets
mariojsnunes Sep 19, 2024
860d62c
chore: trigger deploy
mariojsnunes Sep 19, 2024
4dd8efd
chore: fix deploy secrets
mariojsnunes Sep 19, 2024
05393ae
chore: environment variables
mariojsnunes Sep 19, 2024
9b03e6d
chore: remove unused env
mariojsnunes Sep 19, 2024
2fa7907
chore: deploy secrets
mariojsnunes Sep 19, 2024
b73d0b2
chore: spaces
mariojsnunes Sep 19, 2024
9764a75
chore: spaces
mariojsnunes Sep 19, 2024
3519320
chore: trigger deploy
mariojsnunes Sep 19, 2024
283c541
chore: env variables
mariojsnunes Sep 19, 2024
9ff6578
chore: update env variables from REACT_APP_ to VITE_
mariojsnunes Sep 19, 2024
b604a68
chore: log env
mariojsnunes Sep 19, 2024
4d40b8b
chore: trigger deploy
mariojsnunes Sep 19, 2024
ba4f64c
chore: trigger deploy
mariojsnunes Sep 20, 2024
c236d27
chore: prune docker
mariojsnunes Sep 20, 2024
e7a4c7a
chore: fix vite_branch
mariojsnunes Sep 21, 2024
9c0ed1d
chore: fix vite_branch and pk academy
mariojsnunes Sep 21, 2024
3978a95
chore: fix vite_branch
mariojsnunes Sep 21, 2024
79bfc7b
chore: trigger deploy
mariojsnunes Sep 21, 2024
b92408b
chore: fly vars
mariojsnunes Sep 21, 2024
9bfd8dd
chore: trigger deploy
mariojsnunes Sep 21, 2024
ee720fe
chore: deploy
mariojsnunes Sep 21, 2024
251121b
fix: frame csp
mariojsnunes Sep 21, 2024
e9f1aad
fix: csp
mariojsnunes Sep 21, 2024
d198b29
fix: csp
mariojsnunes Sep 21, 2024
ed4d056
chore: trigger deploy
mariojsnunes Sep 21, 2024
e372727
chore: vite api url
mariojsnunes Sep 23, 2024
8a2f4ea
fix: cdn src
mariojsnunes Sep 23, 2024
805e91a
fix: csp
mariojsnunes Sep 23, 2024
e6fa74c
fix: server.js
mariojsnunes Sep 23, 2024
cc079f5
fix: added theme favicon
mariojsnunes Sep 24, 2024
89fa5b0
feat: added theme favicon
mariojsnunes Sep 24, 2024
ec39b0b
fix: seo and pp academy
mariojsnunes Sep 24, 2024
3164b52
fix: seo
mariojsnunes Sep 24, 2024
9dd3d90
chore: add noindex
mariojsnunes Sep 24, 2024
34fe066
chore: re-add tests
mariojsnunes Sep 24, 2024
e23e034
fix: functions imports
mariojsnunes Sep 25, 2024
9dafb25
fix: circular deps
mariojsnunes Sep 25, 2024
df9d909
fix: merge conflicts
mariojsnunes Sep 25, 2024
bec5313
fix: linting
mariojsnunes Sep 25, 2024
445b81e
fix: linting
mariojsnunes Sep 25, 2024
edb3a74
fix: cypress tests
mariojsnunes Sep 25, 2024
d354ce8
fix: contact form
mariojsnunes Sep 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
148 changes: 83 additions & 65 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,6 @@ commands:
- *restore_yarn_cache
- *install_packages
- *save_yarn_cache
inject_instance_configuration:
steps:
- run:
name: Set branch environment
command: |
echo 'export REACT_APP_PROJECT_VERSION=${CIRCLE_SHA1}' >> $BASH_ENV
- run:
name: Inject target environment configuration
command: |
yarn build:inject-config

firebase_deploy:
description: Deploy to Firebase
Expand Down Expand Up @@ -301,13 +291,11 @@ jobs:
- run:
name: Set branch environment
command: |
echo 'export REACT_APP_BRANCH=${CIRCLE_BRANCH}' >> $BASH_ENV
echo 'export REACT_APP_PROJECT_VERSION=${CIRCLE_SHA1}' >> $BASH_ENV
echo 'export VITE_PROJECT_VERSION=${CIRCLE_SHA1}' >> $BASH_ENV
- run:
name: Check environment variables
command: |
echo REACT_APP_BRANCH=$REACT_APP_BRANCH
echo $REACT_APP_PROJECT_VERSION
echo $VITE_PROJECT_VERSION
- run:
command: yarn build
- persist_to_workspace:
Expand All @@ -326,24 +314,74 @@ jobs:
- run:
command: yarn storybook:build
deploy:
docker: *docker
docker:
- image: cimg/node:20.7.0
resource_class: medium+
parameters:
# optional environment variables to set during build process
DEPLOY_ALIAS:
type: string
default: 'default'
FLY_APP_NAME:
type: string
default: 'default'
FLY_TOML:
type: string
default: 'default'
environment:
CYPRESS_INSTALL_BINARY: 0
steps:
- setup_repo
- attach_workspace:
at: '.'
- inject_instance_configuration
- firebase_deploy:
# token: $FIREBASE_DEPLOY_TOKEN # This should be set as environment variable
alias: << parameters.DEPLOY_ALIAS >>

# - firebase_deploy:
# # token: $FIREBASE_DEPLOY_TOKEN # This should be set as environment variable
# alias: << parameters.DEPLOY_ALIAS >>
- run:
name: Prune Docker resources
command: |
docker system prune -a
- run:
name: Install fly command
command: curl -L https://fly.io/install.sh | sh
- run:
name: Add fly to PATH
command: echo "export PATH=\"/home/circleci/.fly/bin:$PATH\"" >> $BASH_ENV
- run:
name: Login fly
command: flyctl auth token $FLY_API_TOKEN --debug --verbose
- run:
name: Deploy to fly
command: |
flyctl deploy \
--app << parameters.FLY_APP_NAME >> \
--config << parameters.FLY_TOML >> \
--debug --verbose \
--build-secret VITE_BRANCH="$VITE_BRANCH" \
--build-secret VITE_CDN_URL="$VITE_CDN_URL" \
--build-secret VITE_FIREBASE_API_KEY="$VITE_FIREBASE_API_KEY" \
--build-secret VITE_FIREBASE_AUTH_DOMAIN="$VITE_FIREBASE_AUTH_DOMAIN" \
--build-secret VITE_FIREBASE_DATABASE_URL="$VITE_FIREBASE_DATABASE_URL" \
--build-secret VITE_FIREBASE_MESSAGING_SENDER_ID="$VITE_FIREBASE_MESSAGING_SENDER_ID" \
--build-secret VITE_FIREBASE_PROJECT_ID="$VITE_FIREBASE_PROJECT_ID" \
--build-secret VITE_FIREBASE_STORAGE_BUCKET="$VITE_FIREBASE_STORAGE_BUCKET" \
--build-secret VITE_SENTRY_DSN="$VITE_SENTRY_DSN" \
--build-secret VITE_GA_TRACKING_ID="$VITE_GA_TRACKING_ID" \
--build-secret VITE_PATREON_CLIENT_ID="$VITE_PATREON_CLIENT_ID" \
--build-secret VITE_PLATFORM_THEME="$VITE_PLATFORM_THEME" \
--build-secret VITE_PROJECT_VERSION="$VITE_PROJECT_VERSION" \
--build-secret VITE_SUPPORTED_MODULES="$VITE_SUPPORTED_MODULES" \
--build-secret VITE_ACADEMY_RESOURCE="$VITE_ACADEMY_RESOURCE" \
--build-secret VITE_API_URL="$VITE_API_URL" \
--build-secret VITE_PROFILE_GUIDELINES_URL="$VITE_PROFILE_GUIDELINES_URL" \
--build-secret VITE_SITE_NAME="$VITE_SITE_NAME" \
--build-secret VITE_THEME="$VITE_THEME" \
--build-secret VITE_DONATIONS_BODY="$VITE_DONATIONS_BODY" \
--build-secret VITE_DONATIONS_IFRAME_SRC="$VITE_DONATIONS_IFRAME_SRC" \
--build-secret VITE_DONATIONS_IMAGE_URL="$VITE_DONATIONS_IMAGE_URL" \
--build-secret VITE_HOWTOS_HEADING="$VITE_HOWTOS_HEADING" \
--build-secret VITE_COMMUNITY_PROGRAM_URL="$VITE_COMMUNITY_PROGRAM_URL" \
--build-secret VITE_QUESTIONS_GUIDELINES_URL="$VITE_QUESTIONS_GUIDELINES_URL"
# Run cypress e2e tests on chrome
test_e2e:
docker: *docker
Expand All @@ -360,7 +398,6 @@ jobs:
# retrieve build folder
- attach_workspace:
at: '.'
- inject_instance_configuration
# install testing browsers are required
- when:
condition:
Expand Down Expand Up @@ -477,73 +514,54 @@ workflows:
- e2e-tests
<<: *filter_only_default_branch
#---------------------- Development Instances Build and Deploy ----------------------
- deploy:
name: 'Deploy: dev.onearmy.world'
requires:
- test_e2e
<<: *filter_only_default_branch
DEPLOY_ALIAS: 'default'
context:
- circle-ci-patreon-context
- community-platform-dev
- deploy:
name: 'Deploy: dev.community.projectkamp.com'
requires:
- test_e2e
<<: *filter_only_default_branch
DEPLOY_ALIAS: project-kamp-development
context:
- circle-ci-patreon-context
- project-kamp-dev
- deploy:
name: 'Deploy: dev.community.fixing.fashion'
requires:
- test_e2e
<<: *filter_only_default_branch
DEPLOY_ALIAS: fixing-fashion-dev
context:
- circle-ci-patreon-context
- fixing-fashion-dev
- approve:
type: approval
name: 'Approve Production deployment'
requires:
- 'Deploy: dev.onearmy.world'
- 'Deploy: dev.community.fixing.fashion'
- 'Deploy: dev.community.projectkamp.com'
- test_e2e
#---------------------- Development Instances Build and Deploy ----------------------
- release:
name: Release new version to GitHub
context:
- release-context
requires:
- "Approve Production deployment"
- build:
name: Build Production Release
context: build-context
requires:
- 'Release new version to GitHub'
# - release:
# name: Release new version to GitHub
# context:
# - release-context
# requires:
# - "Approve Production deployment"
# - build:
# name: Build Production Release
# context: build-context
# requires:
# - 'Release new version to GitHub'
- deploy:
name: 'Deploy: community.fixing.fashion'
requires:
- 'Build Production Release'
- 'Approve Production deployment'
DEPLOY_ALIAS: fixing-fashion-prod
FLY_APP_NAME: community-platform-ff
FLY_TOML: fly-ff.toml
context:
- circle-ci-patreon-context
- fixing-fashion-prod
- fly-deploy
- deploy:
name: 'Deploy: community.preciousplastic.com'
requires:
- 'Build Production Release'
- 'Approve Production deployment'
DEPLOY_ALIAS: 'production'
FLY_APP_NAME: community-platform-pp
FLY_TOML: fly-pp.toml
context:
- circle-ci-patreon-context
- community-platform-production
- fly-deploy
- deploy:
name: 'Deploy: community.projectkamp.com'
requires:
- 'Build Production Release'
- 'Approve Production deployment'
DEPLOY_ALIAS: project-kamp-production
FLY_APP_NAME: community-platform-pk
FLY_TOML: fly-pk.toml
context:
- circle-ci-patreon-context
- project-kamp-production
- fly-deploy

17 changes: 15 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
containerization
node_modules
dump
*node_modules*
dump
build
functions
extensions
.circleci
.github
.husky
.nxs
docs
packages/cypress
packages/documentation
packages/security-rules
packages/simulated-webhook-receiver
scripts
20 changes: 20 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### Prefix VITE_ to use client-side (only for non-sensitive data!)
PORT=3000
WS_URLS=localhost:24678,ws://localhost:24678
VITE_THEME=precious-plastic
# VITE_THEME=fixing-fashion
# VITE_THEME=project-kamp
VITE_ACADEMY_RESOURCE=https://onearmy.github.io/academy/
# VITE_ACADEMY_RESOURCE=https://project-kamp-academy.netlify.app/
# VITE_ACADEMY_RESOURCE=https://fixing-fashion-academy.netlify.app/
VITE_DONATIONS_BODY=All of the content here is free. Your donation supports this library of Open Source recycling knowledge. Making it possible for everyone in the world to use it and start recycling.
VITE_DONATIONS_IFRAME_SRC=https://donorbox.org/embed/ppcpdonor?language=en
VITE_DONATIONS_IMAGE_URL=/assets/img/precious-plastic/donation-banner.jpg
VITE_HOWTOS_HEADING=Learn & share how to recycle, build and work with plastic
VITE_SITE_NAME=Precious Plastic
VITE_COMMUNITY_PROGRAM_URL=https://community.preciousplastic.com/academy/guides/community-program
# VITE_COMMUNITY_PROGRAM_URL=https://community.fixing.fashion/academy/guides/community-program
VITE_PROFILE_GUIDELINES_URL=https://community.preciousplastic.com/academy/guides/platform
# VITE_PROFILE_GUIDELINES_URL=https://drive.google.com/file/d/1fXTtBbzgCO0EL6G9__aixwqc-Euqgqnd/view
# VITE_PROFILE_GUIDELINES_URL=https://community.fixing.fashion/academy/guides/profile
VITE_QUESTIONS_GUIDELINES_URL=https://community.preciousplastic.com/academy/guides/guidelines-questions
6 changes: 3 additions & 3 deletions .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ jobs:
- name: Install npm dependencies
run: yarn install --immutable
- name: Set environment variables
run: export REACT_APP_PROJECT_VERSION=${GITHUB_SHA}
run: export VITE_PROJECT_VERSION=${GITHUB_SHA}
- name: Check environment variables
run: echo $REACT_APP_PROJECT_VERSION
run: echo $VITE_PROJECT_VERSION
- name: Build for Preview
run: npm run build
env:
# currently some linting fails when CI mode enabled (warnings become errors)
# disable until fully resolved
CI: false
# specify the 'preview' site variant to populate the relevant firebase config
REACT_APP_SITE_VARIANT: preview
VITE_SITE_VARIANT: preview
# The hosting-deploy action calls firebase tools via npx, however installing globally
# gives us control over what version will be made available
- name: Install firebase-tools globally
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ functions/backup.json

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
Expand Down
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ build
storybook-static
dist
firestore.indexes.json
firebase.json
firebase.json
.md
Loading
Loading