Next.js Discord

Discord Forum

How to organize the routing and code base?

Unanswered
Dwarf Crocodile posted this in #help-forum
Open in Discord
Dwarf CrocodileOP
I am trying to add a marketing website and a product dashboard on the same domain.

1) Marketing Website ("/", "/demo", "/technology", "/contact-us")
- It should show Navbar + Footer (no Sidebar).
- It should be Accessible to everyone (logged in or not).

2) Login Page ("/login")
- Acts as the bridge between marketing and dashboard.
- No Navbar, Footer, or Sidebar.

3) Dashboard Interface (with its internal routes)
- Only accessible to logged-in users.
- Shows Sidebar (no Navbar or Footer).
- Different sidebar nav-links based on Admin or Client role.


Earlier I had just a Homepage ("/") , Login Page("/login"), and Dashboard (+ all its internal routes).

Earlier Code was:
App.js: https://codefile.io/f/tr2Gy4tjEJ
Sidebar.js: https://codefile.io/f/f7WhG8ix0s

7 Replies

Pacific sand lance
i don't see what's the problem?
@Pacific sand lance i don't see what's the problem?
Dwarf CrocodileOP
The question was too long, hold on, I'm halfway through shortening it
@Pacific sand lance i don't see what's the problem?
Dwarf CrocodileOP
Reframed my question.
@Dwarf Crocodile Reframed my question.
Pacific sand lance
still, file structure is completly up to you
just expose those 3 groups under app/ directory
@Dwarf Crocodile solved?