diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 38bf0d77..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# Release Notes diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index a5fed6dc..00000000 --- a/CLAUDE.md +++ /dev/null @@ -1,12 +0,0 @@ -# Claude Code Guidelines for AppFlowy-Web-Premium - -This document provides clear instructions for Claude Code when working with the AppFlowy-Web-Premium repository. - -## Project Overview - -Running test prerequest: -1. When running e2e test. You need to make sure the web server start. If not you can run :pnpm run dev to start the web server. - -2. Check the appflowy-cloud server is running or not. If not you go to appflowy-cloud-premium repo and then: -1. cp .env.nginx to .env -2. docker compose up -d diff --git a/Makefile b/Makefile deleted file mode 100644 index 869c764b..00000000 --- a/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -.PHONY: image - -IMAGE_NAME = appflowy-web-app -IMAGE_TAG = latest - -build: - pnpm install - pnpm run build - -image: build - cp .env deploy/ - rm -rf deploy/dist - cp -r dist deploy/ - docker build -t $(IMAGE_NAME):$(IMAGE_TAG) deploy \ No newline at end of file diff --git a/deploy/Dockerfile b/deploy/Dockerfile deleted file mode 100644 index 85f9d33b..00000000 --- a/deploy/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM oven/bun:latest - -WORKDIR /app - -RUN apt-get update && \ - apt-get install -y nginx supervisor - -RUN bun install cheerio pino pino-pretty - -COPY . . - -COPY supervisord.conf /app/supervisord.conf - -RUN addgroup --system nginx && \ - adduser --system --no-create-home --disabled-login --ingroup nginx nginx - -RUN apt-get clean && rm -rf /var/lib/apt/lists/* - - -COPY dist /usr/share/nginx/html/ - -COPY nginx.conf /etc/nginx/nginx.conf - -COPY start.sh /app/start.sh - -RUN chmod +x /app/start.sh -RUN chmod +x /app/supervisord.conf - - -EXPOSE 80 - -CMD ["supervisord", "-c", "/app/supervisord.conf"] \ No newline at end of file diff --git a/deploy/deploy.sh b/deploy/deploy.sh deleted file mode 100644 index 772862c2..00000000 --- a/deploy/deploy.sh +++ /dev/null @@ -1,28 +0,0 @@ -if [ -z "$1" ]; then - echo "No port number provided" - exit 1 -fi - -PORT=$1 - -echo "Starting deployment on port $PORT" - -rm -rf deploy - -tar -xzf build-output.tar.gz - -rm -rf build-output.tar.gz - -mv dist deploy/dist - -mv .env deploy/.env - -cd deploy - -docker system prune -f - -docker build -t appflowy-web-app-"$PORT" . - -docker rm -f appflowy-web-app-"$PORT" || true - -docker run -d --env-file .env -p "$PORT":80 --restart always --name appflowy-web-app-"$PORT" appflowy-web-app-"$PORT" \ No newline at end of file diff --git a/deploy/nginx.conf b/deploy/nginx.conf deleted file mode 100644 index ff59a24f..00000000 --- a/deploy/nginx.conf +++ /dev/null @@ -1,114 +0,0 @@ -# nginx.conf -user nginx; -worker_processes auto; - -error_log /var/log/nginx/error.log notice; -pid /var/run/nginx.pid; - -events { - worker_connections 1024; -} - -http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - access_log /var/log/nginx/access.log main; - - sendfile on; - #tcp_nopush on; - - keepalive_timeout 65; - - gzip on; - - gzip_static on; - - gzip_http_version 1.0; - - gzip_comp_level 5; - - gzip_vary on; - - gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript application/wasm; - - # Existing server block for HTTP - server { - listen 80; - server_name localhost; - - location / { - proxy_pass http://localhost:3000; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_cache_bypass $http_upgrade; - } - - location /static/ { - root /usr/share/nginx/html; - expires 30d; - access_log off; - - } - - location /appflowy.svg { - root /usr/share/nginx/html; - expires 30d; - access_log off; - } - - location /appflowy.ico { - root /usr/share/nginx/html; - expires 30d; - access_log off; - } - - location /og-image.png { - root /usr/share/nginx/html; - expires 30d; - access_log off; - } - - location /covers/ { - root /usr/share/nginx/html; - expires 30d; - access_log off; - } - - location /af_icons/ { - root /usr/share/nginx/html; - expires 30d; - access_log off; - - add_header 'Access-Control-Allow-Origin' '*' always; - add_header 'Access-Control-Allow-Methods' 'GET' always; - } - - location /.well-known/apple-app-site-association { - default_type application/json; - add_header Cache-Control "public, max-age=3600"; - } - - location /.well-known/assetlinks.json { - default_type application/json; - add_header Cache-Control "public, max-age=3600"; - } - - error_page 404 /404.html; - location = /404.html { - root /usr/share/nginx/html; - } - - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root /usr/share/nginx/html; - } - - } -} \ No newline at end of file diff --git a/deploy/start.sh b/deploy/start.sh deleted file mode 100644 index eba0f530..00000000 --- a/deploy/start.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - - - -# Start the nginx server -service nginx start - -# Start the frontend server -bun run server.ts - -tail -f /dev/null - diff --git a/deploy/supervisord.conf b/deploy/supervisord.conf deleted file mode 100644 index 1484fd39..00000000 --- a/deploy/supervisord.conf +++ /dev/null @@ -1,9 +0,0 @@ -[supervisord] -nodaemon=true - -[program:bun] -command=sh /app/start.sh -autostart=true -autorestart=true -stderr_logfile=/var/log/bun.err.log -stdout_logfile=/var/log/bun.out.log diff --git a/scripts/merge-coverage.cjs b/scripts/merge-coverage.cjs deleted file mode 100644 index 95240bc9..00000000 --- a/scripts/merge-coverage.cjs +++ /dev/null @@ -1,35 +0,0 @@ -const { execSync } = require('child_process'); -const fs = require('fs'); -const path = require('path'); -const jestCoverageFile = path.join(__dirname, '../coverage/jest/coverage-final.json'); -const cypressCoverageFile = path.join(__dirname, '../coverage/cypress/coverage-final.json'); -const nycOutputDir = path.join(__dirname, '../coverage/.nyc_output'); - -// Ensure .nyc_output directory exists -if (fs.existsSync(nycOutputDir)) { - fs.rmSync(nycOutputDir, { recursive: true }); -} -fs.mkdirSync(nycOutputDir, { recursive: true }); - -if (fs.existsSync(path.join(__dirname, '../coverage/merged'))) { - fs.rmSync(path.join(__dirname, '../coverage/merged'), { recursive: true }); -} -// Copy Jest coverage file -fs.copyFileSync(jestCoverageFile, path.join(nycOutputDir, 'jest-coverage.json')); -// Copy Cypress E2E coverage file -fs.copyFileSync(cypressCoverageFile, path.join(nycOutputDir, 'cypress-coverage.json')); - -// Merge coverage files -execSync('nyc merge ./coverage/.nyc_output ./coverage/merged/coverage-final.json', { stdio: 'inherit' }); - -// Move the merged result to the .nyc_output directory -fs.rmSync(nycOutputDir, { recursive: true }); -fs.mkdirSync(nycOutputDir, { recursive: true }); -fs.copyFileSync(path.join(__dirname, '../coverage/merged/coverage-final.json'), path.join(nycOutputDir, 'out.json')); - -// Generate final merged report -execSync('nyc report --reporter=html --reporter=text-summary --report-dir=coverage/merged --temp-dir=coverage/.nyc_output', { stdio: 'inherit' }); -console.debug(`Merged coverage report written to coverage/merged`); - - -