{"id":25732556,"url":"https://github.com/u11d-com/medusa-starter","last_synced_at":"2026-02-23T17:39:31.356Z","repository":{"id":274536349,"uuid":"923218242","full_name":"u11d-com/medusa-starter","owner":"u11d-com","description":"medusa-starter - Starter templates for Medusa.js e-commerce development with Docker and Docker Compose.","archived":false,"fork":false,"pushed_at":"2025-11-26T09:41:47.000Z","size":43,"stargazers_count":31,"open_issues_count":1,"forks_count":12,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-29T08:45:58.476Z","etag":null,"topics":["cicd","docker","docker-compose","dockerfile","e-commerce","ecommerce","local-development","medusa","medusajs","nextjs","nodejs","open-source","starter-kit","starter-template","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/u11d-com.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-27T20:50:49.000Z","updated_at":"2025-11-26T09:23:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"226c9857-5df5-4cca-9b19-59d3a208b9d6","html_url":"https://github.com/u11d-com/medusa-starter","commit_stats":null,"previous_names":["u11d-com/medusa-starter"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/u11d-com/medusa-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u11d-com%2Fmedusa-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u11d-com%2Fmedusa-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u11d-com%2Fmedusa-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u11d-com%2Fmedusa-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/u11d-com","download_url":"https://codeload.github.com/u11d-com/medusa-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u11d-com%2Fmedusa-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29749220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cicd","docker","docker-compose","dockerfile","e-commerce","ecommerce","local-development","medusa","medusajs","nextjs","nodejs","open-source","starter-kit","starter-template","typescript"],"created_at":"2025-02-26T03:46:37.910Z","updated_at":"2026-02-23T17:39:31.351Z","avatar_url":"https://github.com/u11d-com.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project Starter Templates for Medusa Commerce Platform\n\n![v2 Build Status](https://img.shields.io/github/actions/workflow/status/u11d-com/medusa-starter/docker_build_v2.yml?branch=v2\u0026label=Medusa%20v2%20build) ![v1 Build Status](https://img.shields.io/github/actions/workflow/status/u11d-com/medusa-starter/docker_build_v1.yml?branch=v1\u0026label=Medusa%20v1%20build)\n\n## Introduction\n\nThis project provides developers with starter templates for both the backend and storefront using the **Medusa framework**. The primary objectives are to demonstrate:\n\n- How to configure a development environment using **Docker Compose**.\n- How to structure a **GitHub workflow pipeline** for building and deploying a Medusa project.\n\n## About Medusa\n\n[Medusa](https://medusajs.com/) is a modular commerce framework designed for building advanced e-commerce applications without reinventing core commerce logic. Medusa’s flexible architecture allows developers to create:\n\n- Scalable e-commerce stores\n- Multi-vendor marketplaces\n- Any application requiring foundational commerce functionality\n\nAll modules are open-source and available on npm, providing full customization and extensibility.\n\n## Project Structure Overview\n\nThe `medusa-starter` repository is organized to provide a clear, modular structure for managing both the backend and storefront of a Medusa-based commerce platform. The setup leverages Docker Compose for service orchestration and includes essential configuration files for streamlined development, testing, and deployment.\n\n### Directory Layout\n\n```shell\nmedusa-starter/\n├── .github/                 # GitHub workflows and automation scripts\n├── .vscode/                 # VS Code workspace settings\n├── backend/                 # Medusa backend services\n│   ├── .dockerignore        # Defines files to exclude from Docker builds\n│   ├── Dockerfile           # Instructions to build the backend Docker image\n│   └── start.sh             # Script to handle migrations, admin user creation, and start backend\n├── storefront/              # Next.js storefront application\n│   ├── .dockerignore        # Defines files to exclude from Docker builds\n│   └── Dockerfile           # Instructions to build the storefront Docker image\n├── .editorconfig            # Maintains consistent coding styles\n├── compose.seed.yaml        # Docker Compose file for database seeding\n├── compose.storefront.yaml  # Docker Compose file for storefront services\n├── compose.yaml             # Main Docker Compose file orchestrating all services\n├── LICENSE                  # License information\n└── README.md                # Project documentation\n```\n\n### Key Components\n\n- `.github/` - Contains GitHub Actions workflows to automate CI/CD processes, ensuring smooth integration and deployment pipelines.\n- `.vscode/` - Houses workspace settings to standardize development environments across teams using Visual Studio Code.\n- `backend/` - This directory includes the Medusa backend setup:\n  - `.dockerignore`: Lists files and directories to ignore during Docker builds.\n  - `Dockerfile`: Defines the build instructions for the backend container.\n  - `start.sh`: A shell script to automate database migrations, create an admin user if necessary, and start the Medusa backend in cluster mode.\n  - `medusa-config.ts`: Example of configuration for Medusa.\n- `storefront/` - The Next.js storefront application:\n  - `.dockerignore`: Specifies files to exclude from the Docker image build.\n  - `Dockerfile`: Instructions for building the storefront Docker image.\n  - `next.config.js`: Example of configuration for Next.js deployment in standalone mode.\n- Docker Compose Files:\n  - `compose.yaml`: The primary file orchestrating PostgreSQL, Redis, and the Medusa backend services.\n  - `compose.storefront.yaml`: Manages the storefront container separately to ensure modular service management.\n  - `compose.seed.yaml`: Handles database seeding tasks.\n  - `compose.db.yaml`: Can be used to deploy database separately.\n- Other Configurations:\n  - `.editorconfig`: Ensures consistent code formatting across different editors and IDEs.\n  - `LICENSE`: Provides licensing information for the repository.\n  - `README.md`: Offers comprehensive project documentation.\n\n## Installation \u0026 Setup\n\n### Prerequisites\n\nEnsure you have the following installed:\n\n- [Docker](https://docs.docker.com/get-started/get-docker/)\n- [Docker Compose](https://docs.docker.com/compose/install/)\n- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)\n\n### Cloning the Repository\n\nRun the following command:\n\n```shell\ngit clone https://github.com/u11d-com/medusa-starter.git\ncd medusa-starter\n```\n\n## Setup Using Medusa CLI\n\nYou can use the `create-medusa-app` command to generate a starter Medusa project.\n\n### 1. Start Databases\n\nRun the following command to start the database services:\n\n```shell\ndocker compose -f compose.db.yaml up -d\n```\n\n- **PostgreSQL** will be available at `localhost:5432`.\n- **Redis** will be available at `localhost:6379`.\n- Default credentials:\n\n  ```plaintext\n  POSTGRES_USER: medusa-starter\n  POSTGRES_PASSWORD: medusa-password\n  POSTGRES_DB: medusa-starter\n  ```\n\nModify `compose.db.yaml` to change these values.\n\n### 2. Create a Medusa Project\n\nFollow the [Medusa installation guide](https://docs.medusajs.com/learn/installation) to create your first project using `create-medusa-app`.\n\n### 3. Add Containerization\n\nUse the Docker setup provided in this repository to containerize your project. Copy files from the `backend` and `storefront` directories to their respective locations in your project. Then, use these files to build Docker images for your application.\n\n## Setup Using Git\n\n### 1. Initialize the Backend Repository\n\nRun the following commands:\n\n```shell\ngit clone https://github.com/medusajs/medusa-starter-default.git\n```\n\nCopy and replace files from `backend` folder to created directory.\n\nThis sets up the Medusa backend starter template (Medusa v2).\n\n### 2. Initialize the Storefront Repository\n\nRun the following commands:\n\n```shell\ngit clone https://github.com/medusajs/nextjs-starter-medusa.git\n```\n\nCopy and replace files from `storefront` folder to created directory.\n\nThis sets up the Medusa storefront starter template (Medusa v2).\n\n---\n\n## Running the Development Environment\n\n### Optional: Enable Meilisearch Search\n\nTo integrate Meilisearch, add the `medusa-plugin-meilisearch` package to your project:\n\n```shell\nnpm install @rokmohar/medusa-plugin-meilisearch\n# or\nyarn add @rokmohar/medusa-plugin-meilisearch\n```\n\n### 1. Start the Medusa Backend and Services\n\n```shell\ndocker compose up --build -d\n```\n\n### 2. Seed the Database\n\nRun this command once (unless the database volume is deleted):\n\n```shell\ndocker compose -f compose.seed.yaml run --rm seed\n```\n\n### 3. Start the Storefront\n\nYou need NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY value from Medusa backend admin panel.\nLog in to `localhost:9000/app` with credentials from `compose.yaml` file:\n\n```plaintext\nMEDUSA_ADMIN_EMAIL: admin@medusa-test.com\nMEDUSA_ADMIN_PASSWORD: supersecret\n```\n\nYou can find publishable key value in dashboard settings. Change it's value in `compose.storefront.yaml` file and run command:\n\n```shell\ndocker compose -f compose.storefront.yaml up --build\n```\n\n### 4. Stopping the Development Environment\n\nTo stop services, run:\n\n- Stop the storefront:\n\n  ```shell\n  docker compose -f compose.storefront.yaml down\n  ```\n\n- Stop the backend and other services:\n\n  ```shell\n  docker compose down\n  ```\n\n---\n\n## Notes\n\n- `docker compose up -d` initializes the backend services for Medusa.\n- The database seeding step pre-populates the database with sample data and is only required when setting up a new database.\n- Storefront services are started separately for better modularity.\n- Shutting down the environment when not in use frees system resources.\n\nYour environment should now be up and running! You can access the storefront and backend services as configured in the compose files.\n\n---\n\n## Customization\n\nThis project is designed to be flexible.\n\n### Replacing the Default Templates\n\nYou can replace the backend and storefront templates with your own code while preserving the following essential files:\n\n- `Dockerfile`\n- `.dockerignore`\n\n### Backend Customization\n\nThe backend runs on **Node.js** and can be customized using **TypeScript**. Replace the provided template with your own implementation while ensuring compatibility with Medusa.\n\n### Storefront Customization\n\nThe storefront runs on **Next.js**. To create a new storefront, use:\n\n```shell\nnpx create-next-app@latest\n```\n\nOnce your custom backend and storefront are ready, the provided Docker Compose configuration will handle deployment.\n\n---\n\n## Deployment\n\nThis project includes a pre-configured **GitHub workflow pipeline** for building and deploying Medusa-based applications.\n\n### Image Tags\n\nThe workflow generates images with the following tags:\n\n- `medusajs-backend:\u003ctag\u003e`\n- `medusajs-storefront:\u003ctag\u003e`\n\n(Replace `\u003ctag\u003e` with the version or commit identifier.)\n\nFor Medusa v1, we provide the latest available starter configuration:\n\n- `medusajs-backend:1.20.10-latest`\n- `medusajs-storefront:1.18.1-latest`\n\nFor Medusa v2, we provide the latest available starter configuration:\n\n- `medusajs-backend:\u003cmedusa-version\u003e-latest`\n- `medusajs-storefront:\u003cmedusa-version\u003e-latest`\n\n### Customizing Deployment\n\nThe GitHub workflow can be customized for different cloud providers (e.g., AWS, Google Cloud). Modify `.github/workflows` to:\n\n- Add deployment steps.\n- Configure cloud provider settings.\n- Integrate with CI/CD pipelines.\n\nThis ensures flexibility for production environments.\n\n---\n\n## Appendices\n\n### Contact Information\n\nFor support or inquiries, visit:\n\n[Uninterrupted](https://u11d.com)\n\n---\n\n:heart: _Technology made with passion by [u11d](https://u11d.com)_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu11d-com%2Fmedusa-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fu11d-com%2Fmedusa-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu11d-com%2Fmedusa-starter/lists"}