Skip to content

Commit 8c04bc5

Browse files
committed
merge in main
2 parents 045f333 + 3fea59d commit 8c04bc5

3,938 files changed

Lines changed: 363737 additions & 289297 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.editorconfig‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,3 +232,12 @@ dotnet_naming_style.begins_with_i.required_prefix = I
232232
dotnet_naming_style.begins_with_i.required_suffix =
233233
dotnet_naming_style.begins_with_i.word_separator =
234234
dotnet_naming_style.begins_with_i.capitalization = pascal_case
235+
236+
# Turn off annoying IDE warnings
237+
238+
dotnet_diagnostic.IDE0290.severity = none
239+
dotnet_diagnostic.IDE0305.severity = none
240+
dotnet_diagnostic.IDE0130.severity = none
241+
dotnet_diagnostic.CA1510.severity = none
242+
243+
csharp_style_namespace_declarations = file_scoped:warning

‎.github/copilot-instructions.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copilot Instructions
2+
3+
## General Guidelines
4+
- First general instruction
5+
- Second general instruction
6+
- Avoid eager O(n) work in constructors when previously work was deferred; be careful to not introduce new up-front costs and justify any tradeoffs.
7+
- Only modify existing XML documentation comments (including <inheritdoc/>) when making documentation corrections; otherwise, preserve docs verbatim during code changes. User explicitly requested: 'Mach das nie wieder! Schreib bitte Docs'.
8+
- Never write German code comments; use English-only comments in code.
9+
- Tolerate minimal false positives for bot detection (around 0.5% real users affected acceptable) if it helps prevent DB junk.
10+
- Account for dynamic asset pipelines; do not assume static stylesheet links when CSS is generated dynamically. Prefer referencing generated asset manifests, pipeline helper functions, or runtime-injected links.
11+
12+
### AI Model Metadata
13+
- In AI model metadata, levels mean 0 = Instant, 1 = Balanced, 2 = Deep Reasoning.
14+
- Prefer common, cost-efficient text-generation models; ensure at least one preferred level-0 (Instant) model is listed.
15+
- Prioritize models optimized for text and image generation when relevant.
16+
- Never mark deep-reasoning (level 2) models as preferred; they may remain available but must not be the default choice.
17+
- Remove nonexistent or deprecated model IDs instead of keeping placeholders.
18+
- When answering questions about AI model capabilities, prefer official API documentation and vendor capabilities over local project metadata mirrors; do not infer model behavior solely from the project's metadata.
19+
20+
## Code Style
21+
- Use specific formatting rules
22+
- Follow naming conventions
23+
- Enable nullable reference types explicitly at file level in new or modified C# files using `#nullable enable`, but only if really necessary.
24+
- New admin model properties must be decorated with `LocalizedDisplayAttribute` using a resource key. For locale resources, use the `AddOrUpdate` overload (key, value, deValue, hint, deHint) where value/deValue are the short visible labels and hint/deHint are the help tooltip texts for a property.
25+
- Prefer existing utilities like `Smartstore.Utilities.HashCodeCombiner` over ad-hoc hash implementations, provided they cover the use case or can be sensibly extended.
26+
27+
## Project-Specific Rules
28+
- For Smartstore Multimap, the indexer is intentionally designed to auto-create and store a new value collection for missing keys (convenience to reduce repetitive code). Do not propose removing this behavior; propose improvements that preserve it.
29+
- Treat `TValue` as nullable in `Multimap<TKey, TValue>` under nullable reference types, allowing null values.
30+
- LazyMultimap<T> is used only scoped and never shared; it does not need to be thread-safe. Prefer variant 1 changes (lightweight, minimal, avoid heavy locking).
31+
- This codebase uses FluentMigrator (not EF Core migrations). New translations are added via `src/Smartstore.Core/Migrations/SmartDbContextDataSeeder.cs`.

‎.github/workflows/publish-nightly.yml‎

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Setup .NET
3535
uses: actions/setup-dotnet@v4
3636
with:
37-
dotnet-version: 9.x
37+
dotnet-version: 10.x
3838

3939
- name: Build
4040
run: dotnet build Smartstore.sln -c Release
@@ -59,7 +59,7 @@ jobs:
5959
if: matrix.os == 'ubuntu-latest'
6060
run: |
6161
dotnet publish src/Smartstore.Web/Smartstore.Web.csproj -c Release -o ./.build/release --no-restore --no-build --no-self-contained
62-
docker build --build-arg SOURCE=./.build/release -f NoBuild.Dockerfile -t ghcr.io/smartstore/smartstore-linux:nightly .
62+
docker build --provenance=false --build-arg SOURCE=./.build/release -f NoBuild.Dockerfile -t ghcr.io/smartstore/smartstore-linux:nightly .
6363
docker push ghcr.io/smartstore/smartstore-linux:nightly
6464
#docker build --build-arg VERSION=nightly -f NoBuild.Dockerfile -t smartstore/smartstore-linux:nightly .
6565
#docker push smartstore/smartstore-linux:nightly
@@ -73,4 +73,42 @@ jobs:
7373
#docker build --build-arg VERSION=nightly -f NoBuild.Dockerfile -t smartstore/smartstore-windows:nightly .
7474
#docker push smartstore/smartstore-windows:nightly
7575
76+
cleanup-old-packages:
77+
name: Delete untagged nightly package versions
78+
needs: publish-nightly
79+
runs-on: ubuntu-latest
80+
permissions:
81+
packages: write
82+
strategy:
83+
matrix:
84+
package: [smartstore-linux, smartstore-windows]
85+
steps:
86+
- name: Delete untagged versions of ${{ matrix.package }}
87+
uses: actions/github-script@v7
88+
with:
89+
github-token: ${{ secrets.DELETE_PACKAGES_TOKEN }}
90+
script: |
91+
const versions = await github.rest.packages.getAllPackageVersionsForPackageOwnedByOrg({
92+
package_type: 'container',
93+
package_name: '${{ matrix.package }}',
94+
org: 'smartstore',
95+
per_page: 100
96+
});
97+
98+
const untagged = versions.data.filter(v => !v.metadata?.container?.tags?.length);
99+
console.log(`Found ${untagged.length} untagged versions`);
100+
101+
for (const v of untagged) {
102+
try {
103+
await github.rest.packages.deletePackageVersionForOrg({
104+
package_type: 'container',
105+
package_name: '${{ matrix.package }}',
106+
org: 'smartstore',
107+
package_version_id: v.id
108+
});
109+
console.log(`Deleted: ${v.id} (${v.name})`);
110+
} catch (err) {
111+
console.log(`Failed to delete ${v.id}: ${err.message}`);
112+
}
113+
}
76114

‎.github/workflows/publish-release.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish release Docker image
33
on:
44
push:
55
branches:
6-
- '6.1.0.x' # << Change this for new versions.
6+
- '6.4.0.x' # << Change this for new versions.
77
workflow_dispatch:
88

99
env:
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
os: [debian-latest, windows-latest]
24+
os: [ubuntu-latest, windows-latest]
2525
permissions:
2626
contents: read
2727
packages: write
@@ -40,7 +40,7 @@ jobs:
4040
- name: Setup .NET
4141
uses: actions/setup-dotnet@v4
4242
with:
43-
dotnet-version: 9.x # << Change this to current .NET version.
43+
dotnet-version: 10.x # << Change this to current .NET version.
4444

4545
- name: Build
4646
run: dotnet build Smartstore.sln -c Release
@@ -53,15 +53,15 @@ jobs:
5353
password: ${{ secrets.GITHUB_TOKEN }}
5454

5555
- name: Publish and Push for Linux
56-
if: matrix.os == 'debian-latest'
56+
if: matrix.os == 'ubuntu-latest'
5757
run: |
5858
dotnet publish src/Smartstore.Web/Smartstore.Web.csproj -c Release -o ./.build/release --no-restore --no-build --no-self-contained
5959
docker build --build-arg SOURCE=./.build/release -f NoBuild.Dockerfile -t ghcr.io/smartstore/smartstore-linux:latest -t ghcr.io/smartstore/smartstore-linux:${{ steps.format-branch-label.outputs.branch-label }} .
6060
docker push ghcr.io/smartstore/smartstore-linux:latest
6161
docker push ghcr.io/smartstore/smartstore-linux:${{ steps.format-branch-label.outputs.branch-label }}
6262
6363
- name: Publish and Push for Windows
64-
if: matrix.os == 'windows-latest'
64+
if: matrix.os == 'xwindows-latest'
6565
run: |
6666
dotnet publish src/Smartstore.Web/Smartstore.Web.csproj -c Release -o ./.build/release --no-restore --no-build --no-self-contained
6767
docker build --build-arg SOURCE=./.build/release -f Nano.Dockerfile -t ghcr.io/smartstore/smartstore-windows:latest -t ghcr.io/smartstore/smartstore-windows:${{ steps.format-branch-label.outputs.branch-label }} .

‎.gitignore‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
# Secrets
1313
*.secrets
14+
*.csr
15+
*.pem
1416

1517
# Build results
1618
[Dd]ebug/
@@ -36,6 +38,7 @@ TestResult.xml
3638
# DNX
3739
artifacts/
3840
.artifacts/
41+
.tools/
3942

4043
*_i.c
4144
*_p.c
@@ -229,6 +232,9 @@ DataProtection-Keys/
229232
# Import/Export
230233
src/Smartstore.Web/wwwroot/[Ee]xchange/*
231234

235+
# .well-known
236+
src/Smartstore.Web/wwwroot/.well-known/*
237+
232238
# User settings
233239
src/Smartstore.Web/Config/usersettings*
234240

‎.nuke/build.schema.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"Clean",
2828
"Compile",
2929
"Deploy",
30+
"GenerateSbom",
3031
"Restore",
3132
"Test",
3233
"Zip"

‎AGENTS.md‎

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# AGENTS Guidelines for Smartstore
2+
3+
Smartstore is a modular, open-source e-commerce platform built on ASP.NET Core.
4+
This document sets **non-negotiable rules** and **operational checklists** for code-generating agents working on the repository.
5+
6+
## Project Architecture (overview)
7+
8+
- Smartstore
9+
- Base library with cross-platform components such as caching, collections, IO, routing, and engine functionality.
10+
- Provides foundational utilities, extension methods, and infrastructure classes used by higher layers.
11+
- Smartstore.Core
12+
- Domain layer containing business logic for catalog, checkout, content, and platform features.
13+
- Includes migrations, data models, and the entry point CoreStarter.cs, which registers core services.
14+
- Smartstore.Web
15+
- ASP.NET Core application that delivers the main web front-end.
16+
- Hosts controllers, views, areas, static assets (wwwroot), plus Program.cs and configuration files (appsettings.json).
17+
- Smartstore.Web.Common
18+
- Shared web infrastructure: bootstrapping, MVC components, Razor helpers, bundling, and theming support.
19+
- Acts as a bridge between Smartstore.Core and the web app, supplying routing helpers, tag helpers, filters, and more.
20+
- Modules
21+
- Extensible plugin structure for optional features (e.g., payment providers, shipping methods, authentication integrations).
22+
- Each subfolder houses a standalone module with its own project file and resources.
23+
- Data
24+
- Database-provider packages (e.g., Smartstore.Data.MySql, Smartstore.Data.PostgreSql, Smartstore.Data.SqlServer, Smartstore.Data.Sqlite).
25+
- Encapsulates migrations and provider logic, keeping the core application database-agnostic.
26+
- Tests
27+
- Collection of test projects (Smartstore.Tests, Smartstore.Core.Tests, Smartstore.Web.Tests, Smartstore.Test.Common).
28+
- Covers unit and integration scenarios for the kernel, web layer, and modules.
29+
- Build
30+
- Scripts and utilities for building and containerizing the project (platform-specific build.*.cmd/sh along with Docker and Compose scripts).
31+
- Includes the src/Smartstore.Build folder with central MSBuild properties/targets used across builds and modules.
32+
33+
## Tech stack
34+
35+
- Backend & Core Frameworks
36+
- .NET 10 / C# – primary language and runtime.
37+
- ASP.NET Core 10 – web framework powering the platform.
38+
- Entity Framework Core 10 – ORM for database access.
39+
- Domain‑Driven Design – guiding architectural approach.
40+
- Frontend & UI
41+
- Bootstrap (4/5 hybrid) – responsive layout and theming.
42+
- Sass – styling with variables and mixins.
43+
- jQuery & Select2 – supplemental UI interactions.
44+
- Liquid (DotLiquid) – template engine for emails and content.
45+
- Vue.js – reactive components and admin UI.
46+
- Data Storage
47+
- SQL Server, MySQL, PostgreSQL, SQLite – officially supported database providers via modular packages.
48+
- Build & Deployment
49+
- Nuke – build automation (scripts under build/).
50+
- Docker/Docker Compose – containerization for app and database.
51+
- .NET CLI – restore, build, and test orchestration.
52+
53+
## Coding Conventions
54+
55+
### General
56+
- **Comments:** English only. Keep them minimal and precise.
57+
- **Nullability:** `#nullable enable`. Avoid `!` except at clearly justified boundaries.
58+
- **Async:** Use `async`/`await`. Suffix async methods with `Async`. Avoid `.Result`/`.Wait()`.
59+
- **DI:** Prefer constructor injection. No service locator anti-pattern.
60+
61+
### C# Style
62+
- Guard clauses for argument validation. Throw `ArgumentException` families; domain errors -> domain-specific exceptions.
63+
64+
### Client Code
65+
- Bootstrap utility classes where possible; Sass variables/mixins for theming.
66+
- Keep JS lean; prefer progressive enhancement. No new heavy dependencies without approval.
67+
68+
## Deployment & Build
69+
70+
- Build: `dotnet build <Solution.sln> -c Release`
71+
- Test: `dotnet test <Solution.sln> -c Release --logger trx`
72+
- Publish: `dotnet publish src/Smartstore.Web/Smartstore.Web.csproj -c Release -o ./publish`
73+
74+
## Module Types
75+
76+
### Payment
77+
- Use src/Smartstore.Modules/Smartstore.PayPal as the canonical blueprint when implementing new payment functionality.
78+
- Each payment provider must implement the IPaymentMethod interface. Without this inheritance, the system will not recognize the plugin as a valid payment module.
79+
- Follow the structure, naming conventions, and configuration patterns exhibited in the PayPal example for consistency across payment integrations.
80+
81+
### Export
82+
- Purpose: Convert catalog or order data into formats consumable by external platforms (e.g., product feeds).
83+
- Typical responsibilities: define an export provider, configuration UI, and deployment profile for scheduled feed generation.
84+
- Implementation: Derive the provider from ExportProviderBase (or implement IExportProvider) to plug into Smartstore’s data‑exchange pipeline; package the module with a module.json, Startup.cs, and optional migrations.
85+
- Example module: src/Smartstore.Modules/Smartstore.Google.MerchantCenter – exports products as an XML feed compatible with Google Merchant Center, including admin configuration screens, a feed provider (GmcXmlExportProvider), and profile management for automated uploads.
86+
87+
### Shipping
88+
- Use src/Smartstore.Modules/Smartstore.Shipping as the canonical reference when implementing new shipping providers.
89+
- Every shipping provider must implement the IShippingRateComputationMethod interface; otherwise the system will not treat the plugin as a valid shipping module.
90+
- Follow the structure, configuration patterns, and naming conventions from the example to ensure consistent integration and admin configuration behavior across all shipping implementations.
91+
92+
### Authentication
93+
- Use src/Smartstore.Modules/Smartstore.Facebook.Auth as the canonical blueprint for building authentication providers.
94+
- Each auth provider must implement the IExternalAuthenticationMethod interface; otherwise the system will not recognize the plugin as a valid authentication module.
95+
- Mirror the structure, configuration patterns, and naming conventions from the Facebook example (e.g., module.json, Startup.cs, Module class, configuration UI, view component) to ensure consistent integration and admin setup across all authentication modules.

‎Directory.Build.props‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<PropertyGroup>
33
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
4+
<NoWarn>$(NoWarn);CA1510;IDE0130;IDE0290;IDE0305</NoWarn>
5+
<HotReloadAutoRestart>true</HotReloadAutoRestart>
46
</PropertyGroup>
57
</Project>

‎Dockerfile‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# the source within the container
44
# -----------------------------------------------------------
55

6-
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
6+
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
77

88
# Copy solution and source
99
ARG SOLUTION=Smartstore.sln
@@ -26,18 +26,17 @@ RUN dotnet publish Smartstore.Web.csproj -c Release -o /app/release/publish \
2626
--no-restore
2727

2828
# Build Docker image
29-
FROM mcr.microsoft.com/dotnet/aspnet:9.0
29+
FROM mcr.microsoft.com/dotnet/aspnet:10.0
3030
EXPOSE 80
3131
EXPOSE 443
3232
ENV ASPNETCORE_URLS="http://+:80;https://+:443"
3333
WORKDIR /app
3434
COPY --from=build /app/release/publish .
3535

3636
# Install wkhtmltopdf
37-
RUN apt update &&\
38-
apt -y install wget &&\
39-
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bookworm_amd64.deb &&\
40-
apt -y install ./wkhtmltox_0.12.6.1-3.bookworm_amd64.deb &&\
41-
rm ./wkhtmltox_0.12.6.1-3.bookworm_amd64.deb
37+
COPY install-wkhtmltopdf.sh /tmp/
38+
RUN chmod +x /tmp/install-wkhtmltopdf.sh && \
39+
/tmp/install-wkhtmltopdf.sh && \
40+
rm /tmp/install-wkhtmltopdf.sh
4241

4342
ENTRYPOINT ["./Smartstore.Web", "--urls", "http://0.0.0.0:80"]

‎Nano.Dockerfile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
# is running Windows containers.
55
# -----------------------------------------------------------
66

7-
ARG ASPNET_TAG=9.0-nanoserver-ltsc2022
7+
ARG ASPNET_TAG=10.0.1-nanoserver-ltsc2022
88

99
FROM mcr.microsoft.com/dotnet/aspnet:${ASPNET_TAG}
1010
EXPOSE 80
1111
ENV ASPNETCORE_URLS="http://+:80"
1212

1313
# Copy
1414
ARG EDITION=Community
15-
ARG VERSION=6.1.0
15+
ARG VERSION=6.4.0
1616
ARG RUNTIME=win-x64
1717
ARG SOURCE=build/artifacts/${EDITION}.${VERSION}.${RUNTIME}
1818

0 commit comments

Comments
 (0)