Next.js Discord

Discord Forum

Tips for production-level Next.js application?

Unanswered
English Lop posted this in #help-forum
Open in Discord
English LopOP
What are your tips for coding a Next.js app that will be used in production?

I'm a junior developer who is comfortable with React. I'm building a next.js application at work, which is a pretty straightforward application (I think), but it will be delivered to real clients, so I want to be sure I'm using best practices for production-level applications.

Background:

We are a data science team that uses third-party platforms to deliver analytics to clients (mainly Metabase for our data dashboards, and Deepnote notebooks for predictive analytics). The problem is, my company doesn't have one centralized platform to deliver these analytics to clients. Both the Metabase dashboards and Deepnote notebooks can be exported/embedded into any application. So that's what I'm building, a next.js application where I will embed the third-party dashboards and notebooks, also implementing authentication and a nice interface with our company branding.

What I'm Researching:
- Looking at multi-tenant architecture, i.e. having multiple client companies access the same application vs. having a separate application instance for each client company. In total, there are about ~6 client companies with 5-10 people per company.

- Not sure, if I want each client to have a unique domain name "companyX.analytics.com"/ companyY.analytics.com", if I can do the multi-tenant architecture?

- I plan on using Next.js for backend. I don't see a need for an external backend.

- I plan to use NextAuth (auth.js) and Google OAuth for authentication.

- For deployment, I'm still researching options, but we use Heroku for other apps so it might be heroku.

Additionally, next.js was first choice because of familiarity with React but also because Next makes it easy to turn your web app into a PWA. Eventually, I made need to make my app cross platform, so I was thinking starting with web/mobile web => then PWA => then React Native.

Any thing else I should be thinking of? Thanks in advance.

0 Replies