<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.socialstack.dev/index.php?action=history&amp;feed=atom&amp;title=Generate</id>
	<title>Generate - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.socialstack.dev/index.php?action=history&amp;feed=atom&amp;title=Generate"/>
	<link rel="alternate" type="text/html" href="https://wiki.socialstack.dev/index.php?title=Generate&amp;action=history"/>
	<updated>2026-10-16T01:01:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.2</generator>
	<entry>
		<id>https://wiki.socialstack.dev/index.php?title=Generate&amp;diff=91&amp;oldid=prev</id>
		<title>2A02:C7F:22BE:A500:498:3225:1A16:A72D: Created page with &quot;SocialStack generate is probably the most convenient command to know and use. Based on the name of the module you want to make, it will generate the files for eith...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.socialstack.dev/index.php?title=Generate&amp;diff=91&amp;oldid=prev"/>
		<updated>2022-07-05T12:34:25Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;SocialStack generate is probably the most convenient command to know and use. Based on the name of the &lt;a href=&quot;/index.php?title=Modules&quot; title=&quot;Modules&quot;&gt;module&lt;/a&gt; you want to make, it will generate the files for eith...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;SocialStack generate is probably the most convenient command to know and use. Based on the name of the [[Modules|module]] you want to make, it will generate the files for either a React component (a function hook based one by default) or a C# Api one, optionally as a content type.&lt;br /&gt;
&lt;br /&gt;
The command is either the full word &amp;quot;generate&amp;quot; or &amp;quot;g&amp;quot; for short.&lt;br /&gt;
&lt;br /&gt;
== React component ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
socialstack g UI/AboutUs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
socialstack g Admin/MaintenanceArea&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
socialstack g Email/MarketingGrid&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are placed in ProjectRoot/UI/Source, ProjectRoot/Admin/Source or ProjectRoot/Email/Source respectively.&lt;br /&gt;
&lt;br /&gt;
By default it will create the component and a scss styling file too. Both files contain examples of commonly used features from there.&lt;br /&gt;
&lt;br /&gt;
== C# Content type called &amp;quot;Cars&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
socialstack g Api/Cars&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are placed in ProjectRoot/Api. When creating a content type like this, the main file you edit next is the e.g. CarService.cs where you can then comment out the line which generates admin panel pages for you, and then e.g. Car.cs which describes the fields to store (and edit in the admin panel) for the content type. The content type file contains commented out examples of common fields too, like a name.&lt;br /&gt;
&lt;br /&gt;
== C# basic service ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
socialstack g Api/MarketingEmailTimer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files are placed in ProjectRoot/Api. These things simply start when the services do and are a good place to put generic contentless behaviour which can optionally have configuration via GetConfig.&lt;/div&gt;</summary>
		<author><name>2A02:C7F:22BE:A500:498:3225:1A16:A72D</name></author>
	</entry>
</feed>