Skip to content

Commit 23a8693

Browse files
committed
migrate to docfx
1 parent b983203 commit 23a8693

32 files changed

+201
-26
lines changed

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
###############
2+
# folder #
3+
###############
4+
/**/DROP/
5+
/**/TEMP/
6+
/**/packages/
7+
/**/bin/
8+
/**/obj/
9+
_site
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/how-to-add-new-payment-providers.md developer-guide/how-to-add-new-payment-providers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
---
44

5-
The first thing you need to do is create a new module. See [how to add new module](how-to-add-new-modules) for more details
5+
The first thing you need to do is create a new module. See [how to add new module](how-to-add-new-modules.md) for more details
66

77
Then, add a new record to the 'Payments_PaymentProvider' table
88

docs/index.md developer-guide/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ SimplCommerce is a simple, cross platform, modularized ecommerce system built on
1414

1515
## The architecture highlight
1616

17-
![SimplCommerce](images/simplcommerce.png)
17+
![SimplCommerce](../images/simplcommerce.png)
1818

1919
The application is divided into modules. Each module contains all the stuff for itself to run including Controllers, Services, Views and even static files. If a module is no longer need, you can simply just delete it by a single click.
2020

docs/internal-structure-of-a-module.md developer-guide/internal-structure-of-a-module.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
---
44

5-
![Internal module structure](images/module-internal.png)
5+
![Internal module structure](../images/module-internal.png)
66

77
The structure of a module is very straightforward. We just want to highlight some important notes below:
88

developer-guide/intro.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Introduction to SimplCommerce
2+
3+
SimplCommerce is a simple, cross platform, modularized ecommerce system built on .NET Core.
4+
5+
---
6+
7+
## SimplCommerce is built based on
8+
9+
- ASP.NET MVC Core 3.1
10+
- Entity Framework Core 3.1
11+
- ASP.NET Identity Core 3.1
12+
- Angular 1.6.3
13+
- MediatR 7.0.0 for domain event
14+
15+
## The architecture highlight
16+
17+
![SimplCommerce](../images/simplcommerce.png)
18+
19+
The application is divided into modules. Each module contains all the stuff for itself to run including Controllers, Services, Views and even static files. If a module is no longer need, you can simply just delete it by a single click.
20+
21+
The SimplCommerce.WebHost is the ASP.NET Core project and acts as the host. It will bootstrap the app and load all the modules it found in the [modules.json](https://github.com/simplcommerce/SimplCommerce/blob/master/src/SimplCommerce.WebHost/modules.json). The source code of modules are placed outside the WebHost, in the [/src/Modules folder](https://github.com/simplcommerce/SimplCommerce/tree/master/src/Modules). .
22+
23+
During the application startup, the host will look up the modules.json and load all the modules it found in that file. If the module is not bundled with the Host then it will scan for all the *.dll in that Modules folder and load them up using AssemblyLoadContext. These assemblies will be then registered to MVC Core by the AddApplicationPart method.
24+
25+
A ModuleViewLocationExpander is implemented to help the ViewEngine can find the right location for views in modules.
26+
27+
#### For Entity Framework Core
28+
Every domain entity needs to inherit from Entity, then on the "OnModelCreating" method, we find them and register them to the DbContext:
29+
```cs
30+
private static void RegisterEntities(ModelBuilder modelBuilder, IEnumerable<Type> typeToRegisters)
31+
{
32+
var entityTypes = typeToRegisters.Where(x => x.GetTypeInfo().IsSubclassOf(typeof(Entity)) && !x.GetTypeInfo().IsAbstract);
33+
foreach (var type in entityTypes)
34+
{
35+
modelBuilder.Entity(type);
36+
}
37+
}
38+
```
39+
By default domain entities are mapped by convention. In case you need to some special mapping for your model. You can create a class that implements the ICustomModelBuilder for example:
40+
```cs
41+
public class CatalogCustomModelBuilder : ICustomModelBuilder
42+
{
43+
public void Build(ModelBuilder modelBuilder)
44+
{
45+
modelBuilder.Entity<ProductLink>()
46+
.HasOne(x => x.Product)
47+
.WithMany(p => p.ProductLinks)
48+
.HasForeignKey(x => x.ProductId)
49+
.OnDelete(DeleteBehavior.Restrict);
50+
}
51+
}
52+
```
File renamed without changes.
File renamed without changes.
File renamed without changes.

developer-guide/toc.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
- name: Introduction
2+
href: intro.md
3+
- name: Getting Started
4+
href: getting-started.md
5+
- name: Working with databases
6+
href: working-with-databases.md
7+
- name: Internal structure of a module
8+
href: internal-structure-of-a-module.md
9+
- name: How to add new modules
10+
href: how-to-add-new-modules.md
11+
- name: Development tips
12+
href: development-tips.md
13+
- name: Token authentication for API
14+
href: token-authentication.md
15+
- name: How to add new payment providers
16+
href: how-to-add-new-payment-providers.md
17+
- name: How to add new languages
18+
href: how-to-add-new-languages.md
19+
- name: Theme development
20+
href: theme-development.md
21+
- name: Widgets
22+
href: widgets.md
23+
- name: How to use StorageAmazonS3 module
24+
href: amazon-s3.md
25+
- name: Some notes for exporting PDF
26+
href: notes-for-export-pdf.md
27+
- name: Notes on EF Migration
28+
href: notes-on-ef-migrations.md
File renamed without changes.

docs/widgets.md developer-guide/widgets.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Widgets
22

3-
---
4-
53
A widget is a fragment of UI that can be easily added to predefined placeholders in the views. Currently SimpleCommerce support 3 widget zones (placeholders) all of them are in the home page. We will support more widget zone in the futures, you can also define your own zones.
64

75
## Steps to develop new widgets
File renamed without changes.

docfx.json

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"metadata": [],
3+
"build": {
4+
"content": [
5+
{
6+
"files": [
7+
"user-guide/**.md",
8+
"user-guide/**/toc.yml",
9+
"toc.yml",
10+
"*.md"
11+
]
12+
},
13+
{
14+
"files": [
15+
"developer-guide/**.md",
16+
"developer-guide/**/toc.yml",
17+
"toc.yml",
18+
"*.md"
19+
]
20+
}
21+
],
22+
"resource": [
23+
{
24+
"files": [
25+
"images/**"
26+
]
27+
}
28+
],
29+
"overwrite": [
30+
{
31+
"exclude": [
32+
"_site/**"
33+
]
34+
}
35+
],
36+
"dest": "_site",
37+
"globalMetadata": {
38+
"_appTitle": "SimplCommerce Docs",
39+
"_appFooter": "© Copyright 2020 SimplCommerce",
40+
"_appLogoPath": "images/Logo_SimplCommerce.png",
41+
"_appFaviconPath": "img/favicon.ico",
42+
"_enableSearch": true
43+
},
44+
"template": [
45+
"default"
46+
],
47+
"markdownEngineName": "markdig",
48+
"noLangKeyword": false,
49+
"keepFileLink": false,
50+
"cleanupCacheHistory": false,
51+
"disableGitFeatures": false
52+
}
53+
}

images/Logo_SimplCommerce.png

3.96 KB
Loading
File renamed without changes.

images/favicon.ico

1.12 KB
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

index.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# SimplCommerce
2+
3+
A simple, cross platform, modularized ecommerce system built on .NET Core. <a href="https://www.simplcommerce.com" target="_blank">Learn more</a>
4+
5+
## Online demo
6+
- Store front: http://demo.simplcommerce.com
7+
- Administration: http://demo.simplcommerce.com/admin Email: [email protected] Password: 1qazZAQ!
8+
9+
## Contributors
10+
11+
This project exists thanks to all the people who contribute.
12+
13+
<a href="https://github.com/simplcommerce/SimplCommerce/graphs/contributors"><img src="https://opencollective.com/simplcommerce/contributors.svg?width=890" title="contributors" alt="contributors" /></a>
14+
15+
## Backers
16+
17+
Love our work and help us continue our activities? [[Become a backer](https://opencollective.com/simplcommerce#backer)]
18+
19+
<a href="https://opencollective.com/simplcommerce#backers" target="_blank"><img src="https://opencollective.com/simplcommerce/backers.svg?width=890"></a>
20+
21+
## Sponsors
22+
23+
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/simplcommerce#sponsor)]
24+
25+
<a href="https://opencollective.com/simplcommerce/sponsor/0/website" target="_blank"><img src="https://opencollective.com/simplcommerce/sponsor/0/avatar.svg"></a>
26+
<a href="https://opencollective.com/simplcommerce/sponsor/1/website" target="_blank"><img src="https://opencollective.com/simplcommerce/sponsor/1/avatar.svg"></a>
27+
<a href="https://opencollective.com/simplcommerce/sponsor/2/website" target="_blank"><img src="https://opencollective.com/simplcommerce/sponsor/2/avatar.svg"></a>
28+
<a href="https://opencollective.com/simplcommerce/sponsor/3/website" target="_blank"><img src="https://opencollective.com/simplcommerce/sponsor/3/avatar.svg"></a>
29+
<a href="https://opencollective.com/simplcommerce/sponsor/4/website" target="_blank"><img src="https://opencollective.com/simplcommerce/sponsor/4/avatar.svg"></a>
30+
31+
## License
32+
33+
SimplCommerce is licensed under the Apache 2.0 license.

mkdocs.yml

-21
This file was deleted.

toc.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- name: User Guide
2+
href: user-guide/
3+
- name: Developer Guide
4+
href: developer-guide/

user-guide/configuration.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Configurations
2+
3+
## Global.DefaultCultureUI
4+
5+
The value is culture name such as en-US or vi-VN. This value will be use add the default culture for first time users or users haven't choose any culture. This value also is us to as the default culture for the content in back-office, other enabled cultures will be translation

user-guide/intro.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# SimplCommerce - User guide

user-guide/payment-settings.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Payment settings
2+
3+
Payment settings be access in the back-office at the top menu System --> Payment providers
4+
5+
On that screen you can enable/disable payment providers, update setting such as ClientID, Client Secret. Checkout the web site of payment provider you want to enable on how to get the ClientID, Client Secret.
6+
7+
You can also configure the fee for each payment provider

user-guide/toc.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- name: Introduction
2+
href: intro.md
3+
- name: Configuration
4+
href: configuration.md
5+
- name: Payment settings
6+
href: payment-settings.md

0 commit comments

Comments
 (0)