Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .ebextensions/npm.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
container_commands:
01_install_dependencies:
command: "npm install"
58 changes: 9 additions & 49 deletions .github/workflows/build-upload-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,18 @@ jobs:
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@v3
with:
node-version: "22"

- name: Enable Corepack
run: corepack enable

- name: Install pnpm
run: corepack install

- name: Resolve pnpm store path
id: pnpm-store
run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-node-22-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-22-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: npm ci
Comment thread
simo6529 marked this conversation as resolved.

- name: Audit dependencies
run: pnpm audit --audit-level=high
- name: Verify registry signatures
run: npm audit signatures
Comment thread
simo6529 marked this conversation as resolved.

- name: Lint package.json versions
run: pnpm run lint:package-json
run: npm run lint:package-json

- name: Build App
env:
Expand All @@ -76,30 +58,14 @@ jobs:
ASSETS_FROM_S3: ${{ env.ASSETS_FROM_S3 }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
run: pnpm run build
run: npm run build

- name: Build Target
run: |
rm -rf target .deploy-bundle
mkdir -p target/_next .deploy-bundle/.next

cp -r .next/standalone/. .deploy-bundle/
mkdir -p target/_next
cp -r .next/static target/_next/
cp -r .next/static .deploy-bundle/.next/
cp -r public .deploy-bundle/
cp Procfile .deploy-bundle/
cp -r .ebextensions .deploy-bundle/

for file in BUILD_ID PUBLIC_RUNTIME.json ASSETS_FROM_S3; do
if [ -f ".next/$file" ]; then
cp ".next/$file" ".deploy-bundle/.next/$file"
fi
done

(
cd .deploy-bundle
zip -r ../target/package.zip .
)
zip -r package.zip . -x '*.git*' 'node_modules/*' 'target/*'
mv package.zip target/

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down Expand Up @@ -169,12 +135,6 @@ jobs:
echo "Current deployed version is $DEPLOYED_BEANSTALK_VERSION"
if [ "$DEPLOYED_BEANSTALK_VERSION" != "${{ env.COMMIT_SHA }}" ]; then
echo "Deployed version does not match the commit SHA."
echo "Recent Elastic Beanstalk events:"
aws elasticbeanstalk describe-events \
--environment-name "${{ env.BEANSTALK_ENV_NAME }}" \
--max-items 20 \
--query 'Events[].{Time:EventDate,Severity:Severity,Message:Message}' \
--output table || true
exit 1
else
echo "Deployed version valid!"
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/coverage
/test-results/
/playwright-report/
/.playwright-mcp/
/playwright/.cache/
/storageState.json
/playwright/.auth/
Expand Down
4 changes: 0 additions & 4 deletions .npmpackagejsonlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
"rules": {
"no-caret-version-dependencies": "error",
"no-caret-version-devDependencies": "error",
"no-file-dependencies": "error",
"no-file-devDependencies": "error",
"no-git-dependencies": "error",
"no-git-devDependencies": "error",
"no-tilde-version-dependencies": "error",
"no-tilde-version-devDependencies": "error"
}
Expand Down
4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
save-exact=true
allow-git=none
Comment thread
simo6529 marked this conversation as resolved.
# ignore-scripts is intentionally disabled for now because the current
# dependency tree includes packages that rely on install scripts.
1 change: 0 additions & 1 deletion Procfile

This file was deleted.

24 changes: 11 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,14 @@ User-facing documentation lives in [`docs/README.md`](docs/README.md).

### Install

```bash
corepack enable pnpm
corepack use pnpm@10.33.0
pnpm install
```
npm i
```

### Build

```bash
pnpm run build
```
npm run build
```

### Environment
Expand All @@ -136,7 +134,7 @@ gateway usage:

To test end-to-end:

1. Run `pnpm dev`.
1. Run `npm run dev`.
2. Paste any pepe.wtf link in chat, for example `https://pepe.wtf/asset/GOXPEPE`
or `https://pepe.wtf/artists/Easy-B`, and confirm the preview renders with
imagery and stats.
Expand All @@ -147,20 +145,20 @@ To test end-to-end:

- Locally

```bash
pnpm dev
```
npm run dev
```

- Production

```bash
pnpm start
```
npm run start
```

### RUN USING PM2

```bash
pnpm exec pm2 start pnpm --name=6529seize -- start
```
pm2 start npm --name=6529seize -- run start
```

## Directory Structure
Expand Down
1 change: 0 additions & 1 deletion config/nextConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export function sharedConfig(
): NextConfig {
return {
assetPrefix,
output: "standalone",
reactCompiler: true,
reactStrictMode: false,
compress: true,
Expand Down
18 changes: 9 additions & 9 deletions dev-setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ This repo includes `dev-setup/run-setup.sh` to bootstrap a fresh EC2 host for a

## What the script does

- Ensures **Node ≥ 20** (keeps 21/22 if present)
- Installs **pnpm 10.33.0**
- Ensures **Node ≥ 20** (keeps 21/22 if present) and **npm ≥ 10**
- Installs **PM2**
- Prompts you and writes **.env** **before** any build (no `.env.sample` used)
- Installs deps, **builds**, and **starts** the app with repo-managed PM2 (default port **3001**)
- Installs deps, **builds**, and **starts** the app with PM2 (default port **3001**)
- **Optionally** installs **NGINX + Certbot** and configures HTTPS for `https://<slug>staging.6529.io`
- Enables PM2 start on boot (Linux)

Expand Down Expand Up @@ -107,7 +107,7 @@ https://<slug>staging.6529.io
PM2 logs:

```bash
pnpm exec pm2 logs 6529seize
pm2 logs 6529seize
```

---
Expand All @@ -116,15 +116,15 @@ pnpm exec pm2 logs 6529seize

```bash
# Process status / logs
pnpm exec pm2 ls
pnpm exec pm2 logs 6529seize
pm2 ls
pm2 logs 6529seize

# Restart / stop
pnpm exec pm2 restart 6529seize
pnpm exec pm2 stop 6529seize
pm2 restart 6529seize
pm2 stop 6529seize

# Persist across reboots
pnpm exec pm2 save
pm2 save

# NGINX
sudo nginx -t && sudo systemctl reload nginx
Expand Down
10 changes: 3 additions & 7 deletions dev-setup/run-reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,11 @@ REPO_ROOT="$(cd "$SCRIPT_DIR/.." 2>/dev/null && pwd || true)"
REPO_ROOT="${REPO_ROOT:-$HOME/6529seize-frontend}"

color yellow "Stopping PM2 process (if exists)…"
if [[ -d "$REPO_ROOT" ]] && command -v pnpm >/dev/null 2>&1; then
(cd "$REPO_ROOT" && pnpm exec pm2 delete 6529seize >/dev/null 2>&1) || true
(cd "$REPO_ROOT" && pnpm exec pm2 save >/dev/null 2>&1) || true
elif command -v pm2 >/dev/null 2>&1; then
color yellow "Repo-managed PM2 cleanup unavailable; using global pm2."
if command -v pm2 >/dev/null 2>&1; then
pm2 delete 6529seize >/dev/null 2>&1 || true
pm2 save >/dev/null 2>&1 || true
else
color yellow "pnpm/repo checkout unavailable and no global pm2 found; skipping PM2 cleanup."
color yellow "PM2 not installed; skipping."
fi

color yellow "Freeing default app port 3001 (best-effort)…"
Expand Down Expand Up @@ -56,4 +52,4 @@ cd /tmp || cd /
color yellow "Removing repo at: $REPO_ROOT"
rm -rf "$REPO_ROOT" || true

color green "Reset complete. You can now re-clone the repo and run setup."
color green "Reset complete. You can now re-clone the repo and run setup."
Loading
Loading