Refactor the frontend source code to be feature-driven, modular, and aligned with cloud-native / 12-factor principles while keeping existing behavior intact.
This plan targets the React app under frontend/src/, reorganizing it into clear feature boundaries and shared utilities.
process.env.REACT_APP_*) in a central config module.src/
app/
App.js
routes.js
index.js
config.js
features/
auth/
components/
hooks/
services/
pages/
index.js
chat/
components/
hooks/
services/
pages/
index.js
nodes/
components/
hooks/
services/
pages/
index.js
voice/
components/
hooks/
services/
pages/
index.js
shared/
components/
hooks/
services/
utils/
constants/
styles/
src/app/config.js for env-based config.src/shared/services.src/shared/components.src/features/chat/ structure.ChatWindow, ChatArea, ChatInput, hooks, and related styles into it.src/features/chat/index.js to expose exports.App.js / routes.js to import from feature exports.src/features/nodes/)src/features/voice/)src/features/settings/, src/features/profile/)ChatPage.js, useChatMessages.js).index.js.npm test / yarn test).npm run build to validate production output.If you want, I can generate a concrete migration plan for one feature (e.g., Chat) including:
Just say which feature you want to start with.