简体   繁体   English

使用Nuxt / Firebase的项目架构

[英]Project architecture using Nuxt/Firebase

I'm setting up a new project for my job, and I'd like some advice if possible. 我正在为自己的工作建立一个新项目,如果可能的话,我希望获得一些建议。 My project consist of using nuxt.js for frontend and firebase for backend. 我的项目包括将nuxt.js用于前端,将firebase用于后端。 So it's basically 100% frontend project. 因此,这基本上是100%的前端项目。

My website will have two big features : 1. The frontend side of thing: home page, search page, view profiles, etc. 2. The backend side of thing: a dashboard where the user can register and manage whatever data he will have to enter, edit, delete, etc. 我的网站将具有两个主要功能:1.事物的前端:主页,搜索页,视图配置文件等。2.事物的后端:仪表板,用户可以在其中注册和管理他需要的任何数据输入,编辑,删除等

So considering this project will become fairly big in the near future, and performance is a huge priority for this project, 因此,考虑到该项目在不久的将来会变得相当庞大,而性能是该项目的重中之重,

My question is: 我的问题是:

Would it be better to have two sub-project with different dependencies (node_modules and package-lock, etc) and also different nuxt.config.js. 最好有两个具有不同依赖项的子项目(node_modules和package-lock等),以及不同的nuxt.config.js。 The subfolder for the dashboard would be in a sub-domain, example: www.dashboard.website.com, And for the frontend side would just be the main domain www.website.com. 仪表板的子文件夹将在一个子域中,例如:www.dashboard.website.com,而前端方面将是主要域www.website.com。

OR 要么

Just put everything in one big project and share the dependencies even if some won't be needed in the dashboard and vice-versa. 只需将所有内容放在一个大项目中并共享依赖项,即使仪表板中不需要依赖项,反之亦然。

This isn't something that can be so quickly answered. 这不是可以很快回答的问题。

Consider some things. 考虑一些事情。

Hosting - I assume you already have these domains if not i suggest snatching them up along with their counterparts .org, .com, .info (Idk how big your company is but they should have resources for this) 托管-我假设您已经拥有了这些域(如果没有的话),我建议将它们与对应的.org,.com,.info抢夺(Idk您的公司有多大,但他们应该为此拥有资源)

Server - If you do not house your own, you will have to depend on a reliable provider with great up time and speed. 服务器-如果您没有自己的服务器,则必须依靠可靠的提供商来保证良好的运行时间和速度。

Data - Design a data structure for every metric you will be housing and think in terms of how you can possibly add more you aren't thinking of. 数据-为要容纳的每个指标设计一个数据结构,并考虑如何添加可能没有想到的更多内容。 Determine the types, location, callbacks, descriptions, etc. (I advise heavy documentation/excel file of each metric you create) 确定类型,位置,回调,描述等。(我建议您为创建的每个指标提供大量文档/ excel文件)

Security - Depending on what your hosting on your servers - if they are yours, you have to be in compliance with all laws and regulations. 安全性-取决于服务器上托管的内容-如果它们是您的服务器,则必须遵守所有法律和法规。 If your hosting eu data you will have more regulations. 如果您的托管欧盟数据,您将有更多规定。 I would ask your IT department if they require an audit etc before hand. 我会问您的IT部门是否需要事先进行审核等。

Storage - What types of files, data will you be processing in forms of all request types and how they will affect your front end/backend. 存储-您将以所有请求类型的形式处理什么类型的文件,数据,以及它们如何影响您的前端/后端。

That's now answering the direct question but if you plan better based off your original question you wont be stuck recreating the first month over and over because of complications, 现在可以回答直接的问题,但是如果您根据原始问题进行更好的计划,则不会因为复杂而一遍又一遍地重新创建第一个月,

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM