CreatorKit is a customizable .NET companion App that you would run alongside your Website which provides the backend for mailing list subscriptions, User repository and comment features which can be added to your website with CreatorKit's tailwind components which are loaded from and communicate back directly to your CreatorKit .NET App instance:
Get CreatorKit​
To better be able to keep up-to-date with future CreatorKit improvements we recommend forking CreatorKit so you can easily apply future changes to your customized forks:
Or if you're happy to take CreatorKit's current feature-set as it is, download the .zip to launch a local instance of CreatorKit:
Extending CreatorKit​
To minimize disruption when upgrading to future versions of CreatorKit we recommend adding any new Services to CreatorKit.Extensions and their DTOs in CreatorKit.Extensions.ServiceModel:
These folders will be limited to optional extras which can added to or removed as needed where it will be isolated from the core set of functionality maintained in the other CreatorKit's folders.
Any custom AppHost or IOC dependencies your Services require can be added to Configure.Extensions.cs.
Before you Run​
We need to initialize CreatorKit's database which we can populate with our preferred App Users, Mailing Lists and Subscribers
by modifying the CSV files in /Migrations/seed
:
Mailing Lists​
You can define all Mailing Lists you wish to send and contacts can subscribe to in mailinglists.csv:
mailinglists.csv​
Name,Description
None,None
TestGroup,Test Group
MonthlyNewsletter,Monthly Newsletter
BlogPostReleases,New Blog Posts
VideoReleases,New Videos
ProductReleases,New Product Releases
YearlyUpdates,Yearly Updates
When the database is first created this list will be used to generate the MailingList.cs Enum, e.g:
[Flags]
public enum MailingList
{
None = 0,
[Description("Test Group")]
TestGroup = 1 << 0, //1
[Description("Monthly Newsletter")]
MonthlyNewsletter = 1 << 1, //2
[Description("New Blog Posts")]
BlogPostReleases = 1 << 2, //4
[Description("New Videos")]
VideoReleases = 1 << 3, //8
[Description("New Product Releases")]
ProductReleases = 1 << 4, //16
[Description("Yearly Updates")]
YearlyUpdates = 1 << 5, //32
}
This is a [Flags]
enum with each value increasing by a power of 2 allowing a single integer value to capture
all the mailing lists contacts are subscribed to.
subscribers.csv​
Add any mailing subscribers you wish to be included by default, it's a good idea to include all Website developer emails here so they can test sending emails to themselves:
Email,FirstName,LastName,MailingLists
test@subscriber.com,Test,Subscriber,3
Mailing Lists is a flag enums where the integer values is a sub of all Mailing Lists
you want them subscribed to, e.g. use 3
to subscribe to both the TestGroup (1)
and MonthlyNewsletter (2)
Mailing Lists.
users.csv​
Add any App Users you want your CreatorKit App to include by default, at a minimum you'll need an Admin
user which is
required to access the Portal to be able to use CreatorKit:
Id,Email,FirstName,LastName,Roles
1,admin@email.com,Admin,User,"[Admin]"
2,test@user.com,Test,User,
Once your happy with your seed data run the included OrmLite DB Migrations with:
Which will create the CreatorKit SQLite databases with your seed Users and Mailing List subscribers included.
Should you need to recreate the database, you can delete the App_Data/*.sqlite
databases then rerun
npm run migrate
to recreate the databases with your updated *.csv
seed data.
What's included​
The full .NET Source code is included with CreatorKit enabling unlimited customizations. It's a stand-alone download which doesn't require any external dependencies to run initially, although some features require configuration:
SMTP Server​
You'll need to configure an SMTP Server to enable sending Emails by adding it to your appsettings.json, e.g:
{
"smtp": {
"UserName" : "SmtpUsername",
"Password" : "SmtpPassword",
"Host" : "smtp.example.org",
"Port" : 587,
"From" : "noreply@example.org",
"FromName" : "My Organization",
"Bcc": "optional.backup@example.org"
}
}
If you don't have an existing SMTP Server we recommend using Amazon SES as a cost effective way to avoid managing your own SMTP Servers.
OAuth Providers​
By default CreatorKit is configured to allow Sign In's for authenticated post comments from Facebook, Google, Microsoft
OAuth Providers during development on its https://localhost:5002
.
You'll need to configure OAuth Apps for your production host in order to support OAuth Sign Ins at deployment:
- Create App for Facebook at https://developers.facebook.com/apps
- Create App for Google at https://console.developers.google.com/apis/credentials
- Create App for Microsoft at https://apps.dev.microsoft.com
You can Add/Remove to this from the list of supported OAuth Providers.
RDBMS​
CreatorKit by default is configured to use an embedded SQLite database which can be optionally configured to replicate backups to AWS S3 or Cloudflare R2 using Litestream.
This is setup to be used with Cloudflare R2 by default which can be configured from the .deploy/litestream-template.yml file:
access-key-id: ${R2_ACCESS_KEY_ID}
secret-access-key: ${R2_SECRET_ACCESS_KEY}
dbs:
- path: /data/db.sqlite
replicas:
- type: s3
bucket: ${R2_BUCKET}
path: db.sqlite
region: auto
endpoint: ${R2_ENDPOINT}
By adding the matching GitHub Action Secrets to your repository, this file will be populated and deployed to your own Linux server via SSH. This provides a realtime backup to your R2 bucket for minimal cost, enabling point in time recovery of data if you run into issues.
Alternatively Configure.Db.cs can be changed to use preferred RDBMS supported by OrmLite.
App Settings​
The PublicBaseUrl and BaseUrl properties in appsettings.json
should be updated with the URL where your
CreatorKit instance is deployed to and replace WebsiteBaseUrl with the website you want to use CreatorKit emails
to be addressed from:
{
"AppData": {
"PublicBaseUrl": "https://creatorkit.netcore.io",
"BaseUrl": "https://creatorkit.netcore.io",
"WebsiteBaseUrl": "https://razor-ssg.web-templates.io"
}
}
CORS​
Any additional Website URLs that utilize CreatorKit's components should be included in the CORS allowOriginWhitelist to allow CORS requests from that website:
{
"CorsFeature": {
"allowOriginWhitelist": [
"http://localhost:5000",
"http://localhost:8080"
]
}
}
Customize​
After configuring CreatorKit to run with your preferred Environment, you'll want to customize it to your Organization or Personal Brand: