Skip to content

Development Workflow

  1. Create a Dev Project to track your changes
  2. Develop in magic_development (master tenant)
  3. Test via admin-development.magiceverse.online
  4. Distribute code to other tenants
  5. Rebuild affected tenant containers
  6. Verify on production tenants
/mnt/data/magic_omniverse/magic_commerce/magic_development/backend/src/
├── api/admin/aplt/ # Admin API routes
├── api/store/ # Store API routes
├── admin/routes/ # Admin UI pages (React)
├── modules/ # Custom Medusa modules
├── jobs/ # Scheduled jobs
└── workflows/ # Medusa workflows

Create a new route file:

src/api/admin/aplt/my-feature/route.ts
import type { MedusaRequest, MedusaResponse } from "@medusajs/framework"
export async function GET(req: MedusaRequest, res: MedusaResponse) {
// Your logic here
res.json({ data: "result" })
}

Create a page component:

src/admin/routes/XX-my-feature/page.tsx
import { defineRouteConfig } from "@medusajs/admin-sdk"
const MyFeaturePage = () => {
return <div>My Feature</div>
}
export const config = defineRouteConfig({
label: "My Feature",
})
export default MyFeaturePage
/mnt/data/magic_omniverse/magic_commerce/magic_development/storefront/src/
├── app/[countryCode]/ # Next.js pages
├── modules/ # Feature modules
├── lib/data/ # Server data fetching
├── lib/brands/ # Brand configuration
└── themes/ # CSS themes
Terminal window
cd /mnt/data/magic_omniverse/magic_commerce/magic_development/storefront
yarn dev # Starts on port 10010 with Turbopack
Terminal window
# Backend only
cd /mnt/data/magic_omniverse/magic_commerce/magic_{tenant}
docker compose build backend
docker compose up -d backend
# Storefront only
docker compose build storefront
docker compose up -d storefront
# Both (with no cache)
docker compose build --no-cache
docker compose up -d
Terminal window
# Backend logs
docker logs magic_brinxx_backend_dev --tail=100 -f
# Storefront logs
docker logs magic_brinxx_storefront_dev --tail=100 -f
# All container status
docker ps --format "table {{.Names}}\t{{.Status}}" | grep magic_