Skip to content

Commit

Permalink
new theme, start ripping out auth0, bring in improvements from CurseFund
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaMulein committed Dec 12, 2024
1 parent afae1c1 commit 9da4bc7
Show file tree
Hide file tree
Showing 321 changed files with 27,807 additions and 163,145 deletions.
1 change: 1 addition & 0 deletions .devcontainer/.env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
MONGO_DB_USERNAME=chilicilantro
MONGO_DB_PASSWORD=db!Passw0rd
FONTAWESOME_KEY=XXXXXXXXXXXXXX
GRAPHITE_KEY=XXXXXXXXXXXXXX

COMPOSE_PROJECT_NAME=chili-and-cilantro_devcontainer
22 changes: 22 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM mcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm

# Install MongoDB command line tools - though mongo-database-tools not available on arm64
ARG MONGO_TOOLS_VERSION=6.0
RUN . /etc/os-release \
&& curl -sSL "https://www.mongodb.org/static/pgp/server-${MONGO_TOOLS_VERSION}.asc" | gpg --dearmor > /usr/share/keyrings/mongodb-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/mongodb-archive-keyring.gpg] http://repo.mongodb.org/apt/debian ${VERSION_CODENAME}/mongodb-org/${MONGO_TOOLS_VERSION} main" | tee /etc/apt/sources.list.d/mongodb-org-${MONGO_TOOLS_VERSION}.list \
&& apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -y mongodb-mongosh \
&& if [ "$(dpkg --print-architecture)" = "amd64" ]; then apt-get install -y mongodb-database-tools; fi \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"

# [Optional] Uncomment if you want to install more global node modules
# RUN su node -c "npm install -g <your-package-list-here>"
94 changes: 49 additions & 45 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,57 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
},
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
"forwardPorts": [27017],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
"forwardPorts": [27017, 3000],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "./setup-nvm.sh && ./fontawesome-npmrc.sh && ./do-yarn.sh && git config --global --add safe.directory /workspace",
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "./setup-nvm.sh && ./fontawesome-npmrc.sh && ./do-yarn.sh && git config --global --add safe.directory /workspace",

// Configure tool-specific properties.
// "customizations": {},
"customizations": {
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"mongodb.mongodb-vscode",
"rangav.vscode-thunder-client",
"github.vscode-github-actions",
"eamodio.gitlens",
"ms-azuretools.vscode-docker",
"esbenp.prettier-vscode",
"ms-vscode-remote.remote-containers",
"firsttris.vscode-jest-runner",
"ms-playwright.playwright",
"nrwl.angular-console",
"TabNine.tabnine-vscode",
"GitHub.copilot",
"GitHub.copilot-chat"
],
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/usr/bin/zsh"
},
},
},
// Configure tool-specific properties.
// "customizations": {},
"customizations": {
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"mongodb.mongodb-vscode",
"rangav.vscode-thunder-client",
"github.vscode-github-actions",
"eamodio.gitlens",
"ms-azuretools.vscode-docker",
"esbenp.prettier-vscode",
"ms-vscode-remote.remote-containers",
"firsttris.vscode-jest-runner",
"ms-playwright.playwright",
"nrwl.angular-console",
"GitHub.copilot",
"GitHub.copilot-chat",
"Codeium.codeium",
"bruno-api-client.bruno",
"GitHub.vscode-pull-request-github",
"MermaidChart.vscode-mermaid-chart",
"Graphite.gti-vscode"
],
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/usr/bin/zsh"
}
}
},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "root"
}
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "root"
}
10 changes: 6 additions & 4 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
version: '3'
services:
app:
image: mcr.microsoft.com/devcontainers/typescript-node:0-20-bullseye
build:
context: .
dockerfile: Dockerfile
volumes:
- ..:/workspace:cached
command: /bin/sh -c "while sleep 1000; do :; done"
command: sleep infinity
environment:
NODE_ENV: development
FONTAWESOME_KEY: ${FONTAWESOME_KEY}
Expand All @@ -14,8 +16,8 @@ services:
- node_app

mongo:
restart: always
image: mongo:6.0.7
image: mongo:latest
restart: unless-stopped
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_DB_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_DB_PASSWORD}
Expand Down
29 changes: 22 additions & 7 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
{
"root": true,
"ignorePatterns": ["**/*.test.ts", "**/build/**", "**/dist/**"],
"plugins": ["@nrwl/nx", "prettier"],
"plugins": ["@nx", "prettier"],
"extends": ["plugin:@nx/typescript"],
"parserOptions": {
"project": ["./tsconfig.base.json", "./*/tsconfig.json"]
},
"rules": {
"prettier/prettier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error"
},
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
Expand All @@ -18,21 +26,28 @@
}
]
}
]
],
"@typescript-eslint/no-empty-function": [
"error",
{ "allow": ["arrowFunctions", "functions", "methods"] }
],
"@nx/dependency-checks": "error"
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript", "plugin:prettier/recommended"],
"extends": ["plugin:@nx/typescript", "plugin:prettier/recommended"],
"rules": {
"prettier/prettier": "error"
"prettier/prettier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error"
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript", "plugin:prettier/recommended"],
"extends": ["plugin:@nx/javascript", "plugin:prettier/recommended"],
"rules": {
"prettier/prettier": "error"
"prettier/prettier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error"
}
},
{
Expand Down
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: 'devcontainers'
directory: '/'
schedule:
interval: weekly
69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CI

on:
push:
branches:
- main
- dev
pull_request:

permissions:
actions: read
contents: read

jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Clean workspace
run: |
rm -rf node_modules
rm -rf dist
rm -rf .cache
- uses: actions/setup-node@v4
with:
node-version: 22.x

- name: Enable Yarn Berry
run: |
corepack enable
yarn set version 4.5.3
- name: Clear Yarn cache
run: yarn cache clean

- name: Setup FontAwesome
run: |
./fontawesome-npmrc.sh --ci
env:
FONTAWESOME_KEY: ${{ secrets.FONTAWESOME_KEY }}

- name: Install dependencies
run: |
./do-yarn.sh --immutable
- uses: nrwl/nx-set-shas@v4

# Run lint, test, build, and e2e tasks explicitly
- name: Run Lint
run: npx nx run-many --target=lint --all --skip-nx-cache --parallel=3

- name: Run Tests
run: npx nx run-many --target=test --all --skip-nx-cache --parallel=3

- name: Run Build
run: npx nx run-many --target=build --all --skip-nx-cache --parallel=3

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Run E2E Tests
run: npx nx run-many --target=e2e --all --skip-nx-cache --parallel=3
env:
CI: true
timeout-minutes: 10
56 changes: 56 additions & 0 deletions .github/workflows/qodana_code_quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Qodana
on:
workflow_dispatch:
pull_request:
push:
branches: # Specify your branches here
- main # The 'main' branch
- dev # The 'dev' branch
- 'releases/*' # The release branches

jobs:
qodana:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
checks: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
fetch-depth: 0 # a full history is required for pull request analysis

- name: Clean workspace
run: |
rm -rf node_modules
rm -rf dist
rm -rf .cache
- uses: actions/setup-node@v4
with:
node-version: 22.x

- name: Enable Yarn Berry
run: |
corepack enable
yarn set version 4.5.3
- name: Setup FontAwesome
run: |
./fontawesome-npmrc.sh --ci
env:
FONTAWESOME_KEY: ${{ secrets.FONTAWESOME_KEY }}

- name: Install dependencies
run: |
./do-yarn.sh --immutable
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2024.2
with:
pr-mode: false
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_57397973 }}
QODANA_ENDPOINT: 'https://qodana.cloud'
11 changes: 10 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
"nrwl.angular-console",
"esbenp.prettier-vscode",
"firsttris.vscode-jest-runner",
"dbaeumer.vscode-eslint"
"dbaeumer.vscode-eslint",
"bruno-api-client.bruno",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"eamodio.gitlens",
"mongodb.mongodb-vscode",
"ms-playwright.playwright",
"mermaidchart.vscode-mermaid-chart",
"graphite.gti-vscode",
"codeium.codeium"
]
}
Binary file added .yarn/install-state.gz
Binary file not shown.
Loading

0 comments on commit 9da4bc7

Please sign in to comment.