Skip to content

Remove the built frontend materials from the git repository#855

Merged
itutu-tienday merged 5 commits intodevelop-mainfrom
feature/remove-frontend-built-materials
Jun 23, 2025
Merged

Remove the built frontend materials from the git repository#855
itutu-tienday merged 5 commits intodevelop-mainfrom
feature/remove-frontend-built-materials

Conversation

@itutu-tienday
Copy link
Copy Markdown
Collaborator

@itutu-tienday itutu-tienday commented Jun 19, 2025

Content

これまで git repository に格納されていた、frontend の build 済み素材を、repository より削除する。
またそれに伴う、エラーページの表示などを調整。

対応の目的

fronntend の build 素材の差分は、optinist の各 fork repository 間において、ほぼ conflict が発生することから、
repository の管理負荷の考慮から、repositoryからは除外とする。
(frontend build が必要となる場合は、適宜ユーザー側環境で実施いただく)

Mesures

  • 既存のfrontend build素材を削除
  • frontend build素材が存在しない場合の、エラーページ表示を追加
  • および404エラーに関する処理を改善
    • これまでは、存在しないbackend URLへアクセスされた場合、必ず応答コード 200 で応答されていた。
    • 上記に対し、backend API request と判断される場合は、404 を応答するよう調整された。

Testcase

  • frontend (yarn start, port 3000) 経由でのアクセス

    • 正常系動作
      • リンク切れなどに伴う、frontendでの動作エラーがないこと
        • standalone の各ページ
        • multiuser の各ページ
      • Workfow の正常動作確認(Tutorial 1)
    • 異常系動作
      • 404アクセス
        • 存在しないURLへアクセスした場合、TOPページへRedirectされること
  • backend (yarn build, port 8000) 経由でのアクセス

    • frontend build前(build/ が存在しない場合)
      • frontend/public/no-built-pages.html (以下の内容)が表示されること
        # (OptiNiSt) Page does not exist
        
        Please access using one of the following methods:
        
        - Access via frontend app
          1. start frontend app ... cd frontend && yarn start
          2. access to frontend app ... http://localhost:3000
        - After building the frontend, access via the backend
          1. build frontend materials ... cd frontend && yarn build
          2. access to backend app ... http://localhost:8000
        
    • frontend build後(build/ が存在する場合)
      • 正常系動作
        • リンク切れなどに伴う、frontendでの動作エラーがないこと
          • standalone の各ページ
          • multiuser の各ページ
        • Workfow の正常動作確認(Tutorial 1)
      • 異常系動作
        • 404アクセス
          • 存在しないURLへアクセスした場合、TOPページへRedirectされること
  • Platforms

    • Native
      • Mac or Linux
      • Windows
    • Docker

Others

  • ドキュメントの更新
    • readthedocs
      • ※readthedocs は、特に更新不要で想定
    • リリース手順
      • 以下の情報を更新
        • github repository には、frontendのbuild素材は、commit不要(gitignoreされている)
        • pip 版、docker版、では、frontendのbuild素材を、ビルドイメージ内に含める必要がある

@milesAraya
Copy link
Copy Markdown
Collaborator

milesAraya commented Jun 20, 2025

I am not really able to see any changes made by the new code. Maybe I am doing this incorrectly.

  • Access via frontend app
    1. start frontend app ... cd frontend && yarn start
    2. access to frontend app ... http://localhost:3000
      When changing branch or deleting frontend/build/index.html
Screenshot 2025-06-20 at 17 08 09
  • After building the frontend, access via the backend
    1. build frontend materials ... cd frontend && yarn build
    2. access to backend app ... http://localhost:8000
      After build can access with backend

@itutu-tienday
Copy link
Copy Markdown
Collaborator Author

@milesAraya

So i am not clear what the new changes do. It does not seem necessary to use yarn build in the previous version or the new version.

Please manually delete the "frontend/build" directory completely and check the operation (access via port 8000).

  • In the current version, a system error will occur.
  • In the new version (the version of this PR), an error page will be displayed properly.

I have been using frontend/.env.

For the frontend build configuration, use .env.production.example (cp .env.production.example .env.production).

@tsuchiyama-araya
Copy link
Copy Markdown
Collaborator

tsuchiyama-araya commented Jun 20, 2025

土山テストケース(WIP)

Testcase

  • frontend (yarn start, port 3000) 経由でのアクセス

    • 正常系動作
      • リンク切れなどに伴う、frontendでの動作エラーがないこと
        • standalone の各ページ
        • multiuser の各ページ
      • Workfow の正常動作確認(Tutorial 1)
    • 異常系動作
      • 404アクセス
        • 存在しないURLへアクセスした場合、TOPページへRedirectされること
  • backend (yarn build, port 8000) 経由でのアクセス

    • frontend build前(build/ が存在しない場合)
      • frontend/public/no-built-pages.html (以下の内容)が表示されること
        # (OptiNiSt) Page does not exist
        
        Please access using one of the following methods:
        
        - Access via frontend app
          1. start frontend app ... cd frontend && yarn start
          2. access to frontend app ... http://localhost:3000
        - After building the frontend, access via the backend
          1. build frontend materials ... cd frontend && yarn build
          2. access to backend app ... http://localhost:8000
        
    • frontend build後(build/ が存在する場合)
      • 正常系動作
        • リンク切れなどに伴う、frontendでの動作エラーがないこと
          • standalone の各ページ
          • multiuser の各ページ
        • Workfow の正常動作確認(Tutorial 1)
      • 異常系動作
        • 404アクセス
          • 存在しないURLへアクセスした場合、TOPページへRedirectされること
  • Platforms

    • Native
      • Mac or Linux
      • Windows
    • Docker

@milesAraya
Copy link
Copy Markdown
Collaborator

milesAraya commented Jun 20, 2025

Testcase

  • frontend (yarn start, port 3000) 経由でのアクセス

    • 正常系動作
      • リンク切れなどに伴う、frontendでの動作エラーがないこと
        • standalone の各ページ
        • multiuser の各ページ
      • Workfow の正常動作確認(Tutorial 1)
    • 異常系動作
      • 404アクセス
        • 存在しないURLへアクセスした場合、TOPページへRedirectされること
  • backend (yarn build, port 8000) 経由でのアクセス

    • frontend build前(build/ が存在しない場合)
      • frontend/public/no-built-pages.html (以下の内容)が表示されること
        # (OptiNiSt) Page does not exist
        
        Please access using one of the following methods:
        
        - Access via frontend app
          1. start frontend app ... cd frontend && yarn start
          2. access to frontend app ... http://localhost:3000
        - After building the frontend, access via the backend
          1. build frontend materials ... cd frontend && yarn build
          2. access to backend app ... http://localhost:8000
        
    • frontend build後(build/ が存在する場合)
      • 正常系動作
        • リンク切れなどに伴う、frontendでの動作エラーがないこと
          • standalone の各ページ
          • multiuser の各ページ
        • Workfow の正常動作確認(Tutorial 1)
      • 異常系動作
        • 404アクセス
          • 存在しないURLへアクセスした場合、TOPページへRedirectされること
  • Platforms

    • Native
      • Mac or Linux
      • Windows
    • Docker

- Added cross-env
- Adjusted error page message
Copy link
Copy Markdown
Collaborator

@milesAraya milesAraya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now working on Windows

@itutu-tienday itutu-tienday merged commit 23caf85 into develop-main Jun 23, 2025
5 checks passed
@itutu-tienday itutu-tienday added this to the v2.3.0 milestone Jul 11, 2025
@itutu-tienday itutu-tienday deleted the feature/remove-frontend-built-materials branch July 14, 2025 05:01
@itutu-tienday itutu-tienday added refactoring Refactoring code and design (preserving specifications) enhancement New feature or request and removed refactoring Refactoring code and design (preserving specifications) labels Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants