Next.js Discord

Discord Forum

How to use subdomain

Unanswered
Northeast Congo Lion posted this in #help-forum
Open in Discord
Northeast Congo LionOP
Hello everyone!

I'm creating a site where there will be very specific needs according to the user's role (student, teacher, administrator).

I'd like to have a landing page and to connect to it go to :

student.mydomain.com for a student
teacher.mydomain.com for a teacher

Should I make a monorepo or is the basic next is enough?

If I have to make a mono repo, where will the api point, given that there will be several projects next?

I imagine this like :

First next projet just for API
Second next project for student and third for teacher

With packages like UI, Db etc..

thanks a lot

5 Replies

Northeast Congo LionOP
I see the https://github.com/vercel/platforms but i it's not the same need
What would be the differences between the student and teacher site?
If you are still very early early-on in this project, I'd suggest to just start out with having different paths like so: mydomain.com/student and mydomain.com/teacher. This is a much easier implementation that doesn't require you building an entire different app for the teacher side.

This seems just like an authentication problem. If so, you could just store what type of user is using the site (student or teacher and then display UI based on that 👍