TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Folder structure for big front end applications?

1 点作者 enrmarc将近 7 年前
Currently we are using Vue.js for our frontend. The folder structure is basically: we have a folder for each of our pages (e.g., &quot;tickets&quot;, &quot;ticket-details&quot;, &quot;orders&quot;, &quot;order-details&quot;, &quot;checkouts&quot;, &quot;checkout-details&quot;, etc.). Within each of these folders we have subfolders for each significant part of the screen (e.g., we have a subfolder &quot;ticket-details&#x2F;email&quot; where we put all the components related to sending emails and display the incoming ones). Besides, we have a &quot;shared&quot; folder for reusable components across all our pages (e.g., &quot;Spinner.vue&quot; and the like). Finally, we also have folders for &quot;reusable modules&quot; (these are just plain JavaScript files that we import here and there).<p>At the beginning this folder structure made sense, but currently we have over 210 Vue components (and growing). I haven&#x27;t found any &quot;better&quot; architecture&#x2F;folder structure on the web. Do you know any better?<p>I was thinking about simulating our backend folder structure in the frontend but I&#x27;m not quite sure about it (our backend is basically Symfony with folders for each &quot;business&quot; aspect of our system, subdivided in &quot;use cases&quot; (e.g., &quot;return an order unit&quot;) that call &quot;services&quot;, and &quot;modules&quot; that can be reused across the whole system. Somehow our backend seems to &quot;scale&quot; better than our frontend...

暂无评论

暂无评论