@pradip1995/create-storefront-app 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,7 +24,7 @@ services:
24
24
  entrypoint: ["/usr/local/bin/docker-entrypoint-wrapper.sh"]
25
25
  command: ["postgres"]
26
26
  ports:
27
- - "5432:5432"
27
+ - "5433:5432"
28
28
  healthcheck:
29
29
  test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
30
30
  interval: 5s
@@ -63,7 +63,7 @@ services:
63
63
  entrypoint: ["/usr/local/bin/docker-entrypoint-wrapper.sh"]
64
64
  command: ["postgres"]
65
65
  ports:
66
- - "5432:5432"
66
+ - "5433:5432"
67
67
  healthcheck:
68
68
  test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
69
69
  interval: 5s
@@ -32,9 +32,10 @@ See `Makefile` and command `docker-dev`.
32
32
 
33
33
  ## First-time backend
34
34
 
35
- 1. Set `DATABASE_URL` in `backend/.env`
36
- 2. `npm run dev:backend` (generates backend + migrations)
37
- 3. `npm run seed` (region, API key, sample product)
35
+ 1. Set `DATABASE_URL` in `backend/.env` (port **5433** when using `make up-infra`)
36
+ 2. `npm run migrate:backend` (may need two runs on fresh DB)
37
+ 3. `npm run dev:backend` (generates backend + migrations on start)
38
+ 4. `npm run seed` (region, API key, sample product)
38
39
  4. Run `npm run seed` from project root (syncs publishable key to `storefront/.env.local` via Postgres)
39
40
 
40
41
  ## Build
@@ -26,7 +26,7 @@ Each entry in `segments` renders top-to-bottom:
26
26
  npm run storefront:build
27
27
  ```
28
28
 
29
- This regenerates the Next.js app **and** syncs `backend/config/homepage-config.json` (Admin fields for your active segments). Restart the backend after schema changes.
29
+ This regenerates the Next.js app **and** syncs `backend/.generated-backend/config/homepage-config.json` (Admin fields for your active segments). Restart the backend after schema changes.
30
30
 
31
31
  **Remove** — delete the line and remove the package from `package.json` if unused elsewhere.
32
32
 
@@ -54,4 +54,4 @@ NEXT_PUBLIC_HOME_PAGE_DESCRIPTION=Subtext
54
54
 
55
55
  ## Medusa admin content
56
56
 
57
- Hero banners, promo text, testimonials, features → Medusa **dynamic-config** (`homepage-config`). Edit schema in `backend/config/homepage-config.json`; storefront loads values from `GET /store/dynamic-config`.
57
+ Hero banners, promo text, testimonials, features → Medusa **dynamic-config** (`homepage-config`). Schema syncs to `backend/.generated-backend/config/` on `storefront:build`; storefront loads values from `GET /store/dynamic-config`.
@@ -37,13 +37,14 @@ Default admin: `make admin-create` (see `Makefile` for `ADMIN_EMAIL` / `ADMIN_PA
37
37
  ## Option B — Docker infra + local Node dev
38
38
 
39
39
  ```bash
40
- make up-infra # postgres, redis, mailpit only
41
- npm run dev:backend # terminal 1uses backend/.env DATABASE_URL
42
- npm run seed # from project root, or cd backend && npm run seed
40
+ make up-infra # postgres (host :5433), redis, mailpit
41
+ npm run migrate:backend # first timerun twice if needed on fresh DB
42
+ npm run dev:backend # terminal 1
43
+ npm run seed # from project root
43
44
  npm run dev:storefront # terminal 2
44
45
  ```
45
46
 
46
- `backend/.env` `DATABASE_URL` matches Docker postgres credentials from scaffold.
47
+ `backend/.env` `DATABASE_URL` uses port **5433** (Docker maps `5433→5432` to avoid conflict with a local Postgres on 5432).
47
48
 
48
49
  For OTP/email in local backend with infra Docker, set `SMTP_HOST=localhost` and `SMTP_PORT=1025` (Mailpit exposes SMTP when using `docker-compose.infra.yml`).
49
50