#Fully customize admin dashboard and separate deploy (guide)
84 messages ยท Page 1 of 1 (latest)
thank you so much for taking the time and writing this guide
@ebon cape how do you bind this custom panel to medusa-starter-default?
okay, and how do add custom admin panel to medusa-starter-default?
That's not what I meant, I'll try to explain it another way
No
for example I downloaded medusa-starter-default, in package.json it has "@medusajs/admin": "7.1.9", I deleted it and I have to use my custom admin package instead. How should I connect it, for example link to the custom repository "@medusajs/admin": "https://githumb.com/my-repo/custom-admin" or Yarn link or some other way?
This domain may be for sale!
Medusa-starter-default uses the @medusajs/admin package in /src/admin/widgets/onboarding-flow/onboarding-flow.tsx. Where does the system get it from?
yarn link?
Thanks Chris
It's good that some solution to this problem has been proposed. I see a question every week about customizing the admin panel.
Although this approach has some disadvantages:
- can't work with medusa-starter-default at the same time
- have to rebuild every time
- a fork of the entire Medusa core
I will add my alternative solution some later
So updated if this is not clear admin repo has within its node_modules @medusajs this contains a folder called admin-ui although its entry point is not clear navigating to login.tsx and putting a console.log within its use effect will console log what you want showing that this is indeed the admin ui now for editing this file effectivley can be of two options either npm publish the whole @medusa package or for what i will be trying to do is adding a git submodule within @medusa replacing the admin-ui folder
.
@hearty wagon
i used this script to copy over changes within the projects folder responsible for styles to a place where git can see this this allows me to simply transplant my code into the node_modules/@medusajs/admin-ui and this solution currently works as is
as u can see this is not the default font family
some new insights from doing it this method so i used the folder-doctor.go to copy over my changes into a new repo named admin-ui and to have this work on the vercel front end i will post a install script i used to override the default install script
npm install && cd node_modules/@medusajs && rm -rf admin-ui && git clone https://github.com/storefronticu/admin-ui.git && cd admin-ui && npm install --legacy-peer-deps
Admin ui for node_modules/@medusajs/admin-ui. Contribute to storefronticu/admin-ui development by creating an account on GitHub.
I think you tried to publish backend to vercel, that doesn't work ๐ฆ
odd are you saying this link doest work
i was confused too but the admin is the backend but it a multi use repo depending on where u host it or what ports you expose
it should work now i jsut had to edit the link odd
I see it working. Looks great, thanks for the breakdown on how to do it
Vercel
oh sorry ๐
bear with me i'll work it out
by the way host:9000/app is also opens the dashboard
as far as i know
i mean deploying the backend only would also work
that might be stupid idea too just a wild guess
sorry couldn't get it done via fly.io
but it's definitely possible with azure container apps
or render
or aws app runner
you got it working on redner ?
yeah it works fine but i don't trust render, i would go with azure container apps
i will show you example of azure container apps
but you need to have knowledge of some devops
sadly i owe azure money ๐ฆ
you never owe money to microsoft ๐
because they haunt you in your dreams
ahhh it's really too much trouble to deploy to azure in this time of the day
i'll tkae a look tomorwrow ๐
lets talk on pm brother
@cinder merlin
Thanks for the mention @verbal flax ! So in order to customize admin dashboard you have to fork the repo
Sorry for the late response
Never feel shy to reach out to me
@cinder merlin
Yes you are on similar lines
Someone has given that approach of doing as such but idealy you can just preform edits on the UI packages responsible and then transplant the custom code into the node modules after installation to bring your custom changes over
Use folder doctor, enter nodemodules/medusajs/admin-ui, edit eg login-screen.tsx, commit your changes in folder doctor's target, use custom installation script to modify node modules after installation.
npm install && cd node_modules/@medusajs && rm -rf admin-ui && git clone https://github.com/storefronticu/admin-ui.git && cd admin-ui && npm install --legacy-peer-deps
Placing this as a npm script in your repo called custom:ui should do the trick and also overriding your vercel install command as the UI needs to be built on every installation and isn't carried along with the code as node modules is git ignored
Let me know how you get along brother ping a message if it doesn't work out
@ripe cape
Hi
Hi @verbal flax , how do you keep your custom admin-ui repo up to date with medusa admin-ui ?
I use a script to rewrite their admin-ui
Once it is downloaded in the node modules
Now I think about it there's a much easier way
Just download the folders and move them from node modules to the root of the application within a folder called eg packages and point the references to that location
This will be much easier with git
The packages should have a appendix called index.ts and should work naturally all exported from that file
hi @verbal flax could you share some example using the last approach you said please?
@evandro_vv pm Me
Hi @hearty wagon
Read the docs
hello i was reading the thread and apart from only being able to 'fully customize admin dashboard' with these approaches, for things like hiding links based on user role, is this also not possible with the starter kit?
It's possible..
Hey @ripe cape thanks for the response, could you point me to where in the docs is this stated / explained so i can test it? I couldn't find anything and right now i am following this approach https://adevinwild.hashnode.dev/medusa-customize-the-admin-ui-v12xx, but i would like to do it with a less hackey way if there is any, cheers!