How do I create private admin panel but make frontend code public?
Unanswered
Loggerhead Shrike posted this in #help-forum
Loggerhead ShrikeOP
hi guys,
I am creating my first full-stack project with Nextjs. I want it's code to be shown in github but I don't want admin panel to be shown too.
I thought of
putting admin folder in gitignore but then we cannot access it online.
Creating different repo with admin panel, then making that repo private and hosting it on vercel so only I can use it online
I will host the site on github and vercel, is there any better way to do it?
I am creating my first full-stack project with Nextjs. I want it's code to be shown in github but I don't want admin panel to be shown too.
I thought of
putting admin folder in gitignore but then we cannot access it online.
Creating different repo with admin panel, then making that repo private and hosting it on vercel so only I can use it online
I will host the site on github and vercel, is there any better way to do it?
8 Replies
@Loggerhead Shrike hi guys,
I am creating my first full-stack project with Nextjs. I want it's code to be shown in github but I don't want admin panel to be shown too.
I thought of
putting admin folder in gitignore but then we cannot access it online.
Creating different repo with admin panel, then making that repo private and hosting it on vercel so only I can use it online
I will host the site on github and vercel, is there any better way to do it?
you can protect the route using values that is retrieved from .env
@aardani you can protect the route using values that is retrieved from .env
Loggerhead ShrikeOP
Thanks, I also need to hide the whole code of admin panel. Other all frontned code is public but only that whole admin panel folder should be hidden. IS there way to do that?
I don't want that admin panel to even show in github but make all other code public
I don't want that admin panel to even show in github but make all other code public
oh also in github repo?
well then better make 2 different repo :/
Loggerhead ShrikeOP
Okay, so that means the only way is I make another private repo for that and host it on vercel and then make it admin panel right?
Thanks! I'll do like that,
Thanks! I'll do like that,
and if fancy, you can use git submodules to have it on gh but not all can see that part (if the referenced submodule is private)
i haven't tested, but id assume you can use vercel with that as long as they can also both
@riský and if fancy, you can use git submodules to have it on gh but not all can see that part (if the referenced submodule is private)
Loggerhead ShrikeOP
I'll check it too, thank you!
I'm learning backend, so it's all about calling api and making request no matter from where we make so if nothing works, i'll do the way of putting admin panel in different private repo, and hosting it in vercel.
the only problem is that we will have to go to different site to do it but i want it to be in same website and just change in url when going to admin panel
I'm learning backend, so it's all about calling api and making request no matter from where we make so if nothing works, i'll do the way of putting admin panel in different private repo, and hosting it in vercel.
the only problem is that we will have to go to different site to do it but i want it to be in same website and just change in url when going to admin panel