Next.js Discord

Discord Forum

Regarding Code structure

Answered
Dwarf Crocodile posted this in #help-forum
Open in Discord
Dwarf CrocodileOP
Hey guys, I have a dashboard website that starts with a login page. After logging in, it shows 5-6 menu items.

I’ve also made a marketing website for this product, which includes a Homepage, Demo page, and Technology page.

I want both the dashboard and marketing site to be under the same domain.
How would you organize the code?
Answered by B33fb0n3
create a pages folder and inside it, create two other folders (for each project). Then the pages itself are orginized and the "webssites "as well
View full answer

39 Replies

Dwarf CrocodileOP
ohh
my bad
i posted this question i nnextjs channel
i am using simple react
😅
Arboreal ant
you could just create seprate websites and point each one to a new subdomain
Dwarf CrocodileOP
although, how would u guys organize it?
@Arboreal ant you could just create seprate websites and point each one to a new subdomain
Dwarf CrocodileOP
i just dont want to use a subdomain
@Dwarf Crocodile i am using simple react
oh you can do the same, but just inside your src/ dir
Arboreal ant
^
Dwarf CrocodileOP
so..i was thining to have to folders:
- marketing
- dashboard
and inside both of them, i will have:
components folder
pages folder
is this ok?
@Dwarf Crocodile so..i was thining to have to folders: - marketing - dashboard
create a pages folder and inside it, create two other folders (for each project). Then the pages itself are orginized and the "webssites "as well
Answer
yea
Dwarf CrocodileOP
i am facing issue while using it
my pages dont load sometimes
is your initial issue solved?
@B33fb0n3 is your initial issue solved?
Dwarf CrocodileOP
yes sir
make sure to create another thread, as this thread is already resolved 👍
Dwarf CrocodileOP
coool
happy to help
@Dwarf Crocodile oh and make sure you tell somewhere in your thread, that it's react only
@B33fb0n3 <@892052908428902441> oh and make sure you tell somewhere in your thread, that it's react only
Dwarf CrocodileOP
so i can ask react doubts in this channel?
no need the doubts should be related to nextjs only?
@Dwarf Crocodile so i can ask react doubts in this channel?
yea, you can ask everything inside #help-forum
@B33fb0n3 yea, you can ask everything inside <#1007476603422527558>
Dwarf CrocodileOP
Hello, I am facing a lot of issue in organizing my routing 😦
Can i share it here? as its related to the original question.
Or should I start a new forum?
@Dwarf Crocodile this thread is already solved. You want to open another thread and if needed you can share a link in the new thread to a specific message here. Make sure to also describe your new issue in your new thread
@Dwarf Crocodile yes, i have made a new thread: https://discord.com/channels/752553802359505017/1334266471446085662
I won't read through that book. Others might not do that either. You should be much shorter
@B33fb0n3 I won't read through that book. Others might not do that either. You should be much shorter
Dwarf CrocodileOP
how can i explain it in short 😦
I tired to explain the exact problem
@Dwarf Crocodile how can i explain it in short 😦
idk, I havent read through it, as it was waaay to long
@B33fb0n3 idk, I havent read through it, as it was waaay to long
Dwarf CrocodileOP
How is it now?
I hope now it makes more sense