Microcraft is a project built to create and publish micro-frontend applications. The code is a monorepo containing the code for centralized microcraft.dev
as well as app.microcraft.dev
- which is a lite version of the microcraft, with no connections to backend and with the ability to run frontend applications configured as JSON manifest.
src/lib
- A backend component that is used to authenticate / store published apps.src/app
- The frontend application used to create frontends and publish them tomicrocraft.dev
src/microcraft-registry
- The CLI used to publish contract ABIs to the backend.
src/microcraft
: This is a command line tool, that bundles a web application (microcraft-lite) hosted atapp.microcraft.dev
that could work as Decentralized Frontend. If you are interested in Decentralized frontends, you must look into this.
Both microcraft.dev
and app.microcraft.dev
uses the microcraft-lib library - a typescript react library npm link: . The library exposes a component called DynamicApp
that takes in the app manifest and renders the application UI based on the app definition.
docker build -t microcraft-dev-img .
docker run -it -v <fullpath-to-local-handycraft-repo>:/app/microcraft -p 8081:8081 -p 8080:8080 -p 5173:5173 microcraft-dev-img
To run the application with specific local repositories:
docker run -it -v /Users/rohitbharti/Desktop/MICROCRAFT-LIB/microcraft-lib:/app/microcraft-lib -v /Users/rohitbharti/Desktop/handycraft-main/handycraft:/app/microcraft -p 8081:8081 -p 8080:8080 microcraft-dev-img
Note: If needed to run locally without Docker, include the -p 5173:5173 flag.
This will run the docker image and also run the datastore by default
docker container list
docker exec -it b2cd307fe419 /bin/bash #b2cd307fe419 is the container id from previous step
cd microcraft
npm run dev
docker container list
docker exec -it b2cd307fe419 /bin/bash #b2cd307fe419 is the container id from previous step
cd microcraft/src/app
npm run dev
You should be able to access the