<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Amr ElSehemy</title>
	<atom:link href="https://amrelsehemy.net/feed/" rel="self" type="application/rss+xml" />
	<link>https://amrelsehemy.net</link>
	<description></description>
	<lastBuildDate>Mon, 05 Jan 2026 13:35:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
<site xmlns="com-wordpress:feed-additions:1">22677284</site>	<item>
		<title>How a Single Metric Forced Me to Rethink My Data—and My Life</title>
		<link>https://amrelsehemy.net/2026/01/01/hello/</link>
					<comments>https://amrelsehemy.net/2026/01/01/hello/#respond</comments>
		
		<dc:creator><![CDATA[amr]]></dc:creator>
		<pubDate>Thu, 01 Jan 2026 07:00:00 +0000</pubDate>
				<category><![CDATA[Data-Driven Life]]></category>
		<category><![CDATA[ai]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Systems Thinking]]></category>
		<category><![CDATA[Wearables]]></category>
		<category><![CDATA[WHOOP]]></category>
		<guid isPermaLink="false">https://amrelsehemy.net/?p=747</guid>

					<description><![CDATA[For over 500 days, I wore a wearable device continuously. Training days. Rest days. Travel days. Bad sleep. Good sleep. Day after day, data kept accumulating — heart rate, HRV, sleep, strain, recovery.And for the most part, I ignored it. Not because I don’t believe in data.But because most personal metrics, without a decision system, [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>For over <strong>500 days</strong>, I wore a wearable device continuously.</p>



<p>Training days. Rest days. Travel days. Bad sleep. Good sleep.</p>



<p>Day after day, data kept accumulating — heart rate, HRV, sleep, strain, recovery.<br>And for the most part, I <strong>ignored it</strong>.</p>



<p>Not because I don’t believe in data.<br>But because most personal metrics, without a decision system, are simply <strong>noise</strong>.</p>



<p>Then one metric appeared — and it hit harder than expected.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading"><strong>The Wake-Up Call I Didn’t See Coming</strong></h3>



<p>On <strong>May 14th</strong>, I turned <strong>39.5</strong>, my actual birthday is November 14th 1985.</p>



<p>That same day, WHOOP introduced a new feature: <strong>WHOOP Age</strong>.</p>



<p>Out of curiosity, I checked it.</p>



<p>The result stopped me cold.</p>



<p>My biological age was calculated as <strong>5.5 years older than my real age</strong>.</p>



<p>I didn’t feel old.<br>I trained regularly; or I thought so.<br>I performed at a high cognitive level every day.</p>



<p>But this number felt different.</p>



<p>Not because it was flattering or not —<br>but because it was a <strong>system-level signal</strong>, not a vanity metric.</p>



<p>And it forced a question I couldn’t ignore:</p>



<p><em>If this were an AI system in production, would I accept this output without investigation?</em></p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading"><strong>Why This Metric Was Different</strong></h3>



<p>By then, I had already seen hundreds of metrics:</p>



<ul class="wp-block-list">
<li>HRV</li>



<li>Resting heart rate</li>



<li>Sleep stages</li>



<li>Recovery percentages</li>



<li>Strain scores</li>
</ul>



<p>Most of them fluctuated daily.<br>Most were emotionally easy to dismiss.</p>



<p>WHOOP Age was different.</p>



<p>It wasn’t a daily score.<br>It was a <strong>long-horizon aggregation</strong> — a proxy for cumulative system stress.</p>



<p>In AI terms:</p>



<ul class="wp-block-list">
<li>Lower volatility</li>



<li>Higher signal</li>



<li>Much harder to explain away</li>
</ul>



<p>That’s exactly why it worked.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading"><strong>The Common Mistake With Personal Data</strong></h3>



<p>Most people respond to uncomfortable metrics in one of two ways:</p>



<ol class="wp-block-list">
<li>Panic and overcorrect</li>



<li>Ignore the metric entirely</li>
</ol>



<p>Both reactions are system failures.</p>



<p>In AI systems, when performance degrades, we don’t react emotionally.<br>We ask structured questions:</p>



<ul class="wp-block-list">
<li>Which inputs influence this output?</li>



<li>Which variables are controllable?</li>



<li>Where is the feedback loop broken?</li>
</ul>



<p>So I treated myself like a production system.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading"><strong>Turning Wearable Data Into a Decision System</strong></h3>



<p>I didn’t try to “fix” the age metric directly.</p>



<p>That would be equivalent to <strong>training on the label</strong>, which is a classic modeling mistake.</p>



<p>Instead, I focused on <strong>upstream variables</strong>.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading"><strong>Step 1: Eliminate Noise</strong></h3>



<p>I stopped reacting to daily fluctuations.</p>



<p>I ignored:</p>



<ul class="wp-block-list">
<li>Single bad sleep nights</li>



<li>One-off low recovery days</li>



<li>Isolated strain spikes</li>
</ul>



<p>I focused only on <strong>trends</strong>, not events.</p>



<p>This alone removed most of the emotional friction.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading"><strong>Step 2: Define Non-Negotiable Rules</strong></h3>



<p>I introduced explicit decision rules:</p>



<ul class="wp-block-list">
<li>Low recovery does <strong>not</strong> mean no training<br>It means reduced intensity, not inactivity</li>



<li>Consecutive high-strain days trigger enforced recovery</li>



<li>Degrading sleep trends cap intensity automatically</li>



<li>Increased workload requires proportional recovery investment</li>
</ul>



<p>No motivation required.<br>No daily debate.</p>



<p>This mirrors how resilient AI systems are governed.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading"><strong>Step 3: Review Weekly, Not Daily</strong></h3>



<p>Daily optimization leads to overfitting.</p>



<p>So I reviewed progress <strong>weekly</strong>, not daily:</p>



<ul class="wp-block-list">
<li>Recovery stability</li>



<li>Training consistency</li>



<li>Cognitive energy</li>



<li>Subjective stress levels</li>
</ul>



<p>The question was never:<br>“Was today good?”</p>



<p>It was:<br>“Is the system improving?”</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading"><strong>The Outcome (7.5 Months Later)</strong></h3>



<p>After <strong>7.5 months</strong> of consistent, rule-driven behavior:</p>



<ul class="wp-block-list">
<li>I matched my real age</li>



<li>Then surpassed it</li>
</ul>



<p>As of today, my biological age is <strong>1.2 years younger</strong> than my chronological age.</p>



<p>No hacks.<br>No extreme interventions.<br>No obsession.</p>



<p>Just:</p>



<ul class="wp-block-list">
<li>Signal selection</li>



<li>Clear decision rules</li>



<li>Closed feedback loops</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading"><strong>The Deeper Lesson</strong></h3>



<p>This experience reinforced something I’ve seen repeatedly in enterprise AI initiatives:</p>



<p>Data doesn’t create change.<br><strong>Systems do.</strong></p>



<p>Most people don’t fail because they lack information.<br>They fail because they lack <strong>decision architecture</strong>.</p>



<p>The same pattern applies to:</p>



<ul class="wp-block-list">
<li>AI platforms</li>



<li>Organizations</li>



<li>Human performance</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading"><strong>Why I’m Writing This Blog</strong></h3>



<p>In my professional work — as a senior AI and data leader — I design systems that operate under real constraints and real consequences.</p>



<p>This blog will explore:</p>



<ul class="wp-block-list">
<li>Applied AI and agentic systems</li>



<li>Data-driven decision design</li>



<li>Leadership lessons from production environments</li>



<li>Translating engineering discipline into real life</li>
</ul>



<p>Sometimes the system is software.<br>Sometimes it’s human.</p>



<p>The principles remain the same.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading"><strong>Final Thought</strong></h3>



<p>That number — “5.5 years older” — didn’t motivate me.</p>



<p>It forced me to <strong>redesign the system</strong>.</p>



<p>And that made all the difference.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://amrelsehemy.net/2026/01/01/hello/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">747</post-id>	</item>
		<item>
		<title>Introducing a Blog Series: Transform Your Sitecore Search Experience with AI</title>
		<link>https://amrelsehemy.net/2023/08/27/introducing-a-blog-series-transform-your-sitecore-search-experience-with-ai/</link>
					<comments>https://amrelsehemy.net/2023/08/27/introducing-a-blog-series-transform-your-sitecore-search-experience-with-ai/#respond</comments>
		
		<dc:creator><![CDATA[amr]]></dc:creator>
		<pubDate>Sun, 27 Aug 2023 15:32:43 +0000</pubDate>
				<category><![CDATA[Archive]]></category>
		<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[Sitecore]]></category>
		<category><![CDATA[ai]]></category>
		<category><![CDATA[llm]]></category>
		<category><![CDATA[rag]]></category>
		<category><![CDATA[sitecore]]></category>
		<category><![CDATA[sitecore-search]]></category>
		<guid isPermaLink="false">https://amrelsehemy.net/?p=632</guid>

					<description><![CDATA[Unlock the future of Sitecore Search with Retrieval Augmented Generation (RAG). This series guides you through the groundbreaking integration that promises to redefine user interaction and search experiences.]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Introduction</h2>



<p>Are you a Sitecore developer or an AI enthusiast itching to bring a whole new level of intelligence to search experiences? Do you ever wonder how conversational interfaces and smarter search could be harmoniously integrated into your Sitecore platform?</p>



<p>If so, you&#8217;ve landed in the right place! Welcome to the kickoff of an exciting blog series designed to take you through the journey of implementing Retrieval Augmented Generation (RAG) into Sitecore Search.</p>



<p>We&#8217;re not just scratching the surface here; we&#8217;re diving deep. By the end of this series, you won&#8217;t just understand what RAG is and why it&#8217;s a game-changer for Sitecore Search. You&#8217;ll also have actionable insights, code snippets, and the know-how to implement these advanced features into your own projects.</p>



<h2 class="wp-block-heading">Why This Series Matters</h2>



<p>In a time where AI became the new normal, and an era where machine learning and natural language processing are altering the fabric of digital interactions, simply having a functional search feature is no longer enough. Users are beginning to expect smarter, more contextual, and conversational experiences that understand not just what they&#8217;re saying, but what they&#8217;re trying to achieve. This is where the combination of Retrieval Augmented Generation (RAG) and Sitecore Search comes in—offering a capability that can make search experiences more intelligent and user-centric.</p>



<p>As we look towards the future, the role of search in content management systems like Sitecore will only become more critical and complex. This series is not just about meeting the status quo; it&#8217;s about preparing for the future. RAG is a cutting-edge technology that is gaining traction for its capabilities in information retrieval and conversational agents. By integrating this with Sitecore Search, we&#8217;re setting the stage for a paradigm shift in how search functionalities can be designed and delivered.</p>



<p>Whether you&#8217;re a Sitecore developer looking to implement the latest advancements in search capabilities, a UX/UI designer aiming to create more intuitive and meaningful user journeys, or a product manager focused on adding value to your platform—this series has something for you. We&#8217;ll provide both the theoretical background and the practical guidelines needed to make these advanced concepts a reality in your projects.</p>



<p>We won&#8217;t just talk theory; we&#8217;ll walk you through real-world applications and case studies where the integration of RAG with Sitecore Search has made a tangible difference. These insights will not only validate the concepts but also provide you with actionable strategies to implement them.</p>



<h2 class="wp-block-heading">What Will You Learn?</h2>



<p>Understanding the basics of Retrieval Augmented Generation (RAG) is key to unlocking its full potential. We&#8217;ll dissect this advanced natural language processing technology, explaining its components, its architecture, and how it functions. This foundational knowledge will set the stage for deeper explorations and implementations.</p>



<p>Sitecore Search is a powerful tool that can do much more than you might think. We&#8217;ll give you an in-depth look at its capabilities, going beyond the basics to show you how you can customize and extend it to meet specific needs or solve complex challenges.</p>



<p>Combining RAG with Sitecore Search may sound daunting, but we&#8217;ll make it straightforward. Through step-by-step guides, code snippets, and troubleshooting tips, you&#8217;ll learn how to integrate these technologies seamlessly. You&#8217;ll also gain insights into optimizing the performance and usability of your new, intelligent search feature.</p>



<p>Ever wondered how to create a conversational interface that can interact with your Sitecore data? We&#8217;ll walk you through the process, showing you how RAG can turn your Sitecore Search into a conversational agent that understands and responds to user queries in a more natural and intuitive manner.</p>



<p>To bring all these concepts to life, we&#8217;ll showcase real-world examples and case studies that demonstrate the power and potential of integrating RAG with Sitecore Search. These tangible insights will not only add credibility to the concepts but also offer you a blueprint for your own implementations.</p>



<h4 class="wp-block-heading">Series Overview</h4>



<ul class="wp-block-list">
<li></li>
</ul>



<ul class="wp-block-list">
<li><strong>Blog Post 1</strong>: Retrieval Augmented Generation (RAG) and the Future of Sitecore Search</li>



<li><strong>Blog Post 2</strong>: How to &#8220;Chat with Your Own Data&#8221; using Retrieval Augmented Generation</li>



<li><strong>Blog Post 3</strong>: Implementing &#8220;Chat with Your Own Data&#8221; in Sitecore Search</li>



<li><strong>Blog Post 4</strong>: Full Demo: Retrieval Augmented Generation Transforms Sitecore Search</li>
</ul>



<h2 class="wp-block-heading">Summary</h2>



<p>We are on the point of a technological revolution that promises to redefine the way we think about search experiences in Sitecore. By merging cutting-edge technologies like Retrieval Augmented Generation with robust platforms like Sitecore Search, we&#8217;re stepping into a new era of user interaction and engagement. This series aims to be your comprehensive guide through this transformative journey, equipping you with both the theoretical knowledge and practical skills needed to be at the forefront of this evolution.</p>



<h4 class="wp-block-heading">Next Steps</h4>



<p>The stage is set, and the players are ready. All that&#8217;s missing is you! Are you prepared to embark on this enlightening journey to revolutionize Sitecore Search and, by extension, the way users interact with your platform?</p>



<ul class="wp-block-list">
<li><strong>Subscribe Now</strong>: Don&#8217;t miss out on any installments of this series. Subscribe to our blog to get notifications straight to your inbox.</li>



<li><strong>Share</strong>: If you find this series to be of value, please don&#8217;t hesitate to share it within your professional network. The more people we can educate on these advancements, the more robust and user-friendly our future platforms will become.</li>



<li><strong>Engage</strong>: We value your insights and questions. Feel free to leave comments on the blog posts or engage with us on social media. Your interaction enriches the community dialogue and may even influence the focus of future posts in the series.</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://amrelsehemy.net/2023/08/27/introducing-a-blog-series-transform-your-sitecore-search-experience-with-ai/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">632</post-id>	</item>
		<item>
		<title>Sitecore Identity &#8211; 3 &#8211; Adding mobile native clients</title>
		<link>https://amrelsehemy.net/2019/07/27/sitecore-identity-3-adding-mobile-native-clients/</link>
					<comments>https://amrelsehemy.net/2019/07/27/sitecore-identity-3-adding-mobile-native-clients/#respond</comments>
		
		<dc:creator><![CDATA[amr]]></dc:creator>
		<pubDate>Sat, 27 Jul 2019 16:13:41 +0000</pubDate>
				<category><![CDATA[Archive]]></category>
		<category><![CDATA[Sitecore]]></category>
		<guid isPermaLink="false">http://www.amrelsehemy.net/?p=455</guid>

					<description><![CDATA[In the last two parts of the Sitecore Identity series, I described the basics and an understanding of the architecture and how IdentityServer4 is embedded and used in Sitecore 9.1+, the second part was a demo for adding a web client that authenticates itself against the Sitecore Identity (meaning that a custom web application uses [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>In the last two parts of the Sitecore Identity series, I described the basics and an understanding of the architecture and how IdentityServer4 is embedded and used in Sitecore 9.1+, the second part was a demo for adding a web client that authenticates itself against the Sitecore Identity (meaning that a custom web application uses Sitecore as the login method think like Login using Facebook or any other Identity Provider).</p>



<p>The third post of the series is a bit new, as there aren&#8217;t any samples (that I could find). I will show how to add a native mobile app client (iOS for this post but Android works the exact same).<br>This will enable you first to authenticate against the Sitecore Identity, then secondly (later posts coming) consume protected APIs (whether Sitecore native or custom ones).</p>



<span id="more-455"></span>



<h3 class="wp-block-heading">Recap</h3>



<p>So let&#8217;s recap how the identity system works and the moving parts of it.<br><br>1- There is an Identity Provider, which holds users, passwords, information about them, should be a trusted party that knows how to authenticate.<br>2- There are a few protected resources (data called identity resources, and methods called Api resources).<br>3- There are Clients that want to consume these protected resources.</p>



<h4 class="wp-block-heading">How it works again?</h4>



<p>0- Step zero (pre requisites) a Client configuration needs to be added at the Identity Provider so when it comes back for permission the IdP would know how to handle it, where to redirect, what are the protected resources it can ask for, what is the mechanism used to secure, verify and send tokens back to the client and some other details we&#8217;ll see in the configs in a bit.<br>1- Client app connects to the Identity Provider and asks for permission (access) to get some or all of those protected resources (scopes).<br>2- Control is at Identity Provider now (through a web redirect or a web popup) and asks the user to login and let&#8217;s him know what protected resources the client wants to access (can optionally ask for consent).<br>3- Client app get control back with a token that can usually have both (data) and permission to access methods (id_token and access_token).</p>



<h3 class="wp-block-heading">Sitecore side Add the configuration</h3>



<p>Same as we discussed before, we add client configuration at the <strong>identityServer.xml,</strong> which resides at the &lt;instance&gt;.identityserver\sitecore\Sitecore.Plugin.IdentityServer\Config folder.</p>



<script src="https://gist.github.com/AmrElsehemy/cfa78e493187566689e8460c3667fd00.js"></script>



<p>Notable properties for native apps:<br><br><strong>AllowOfflineAccess</strong>: This configuration when set to true allows the client app to keep and request a refresh token, which is used later to request a new token when the one it has expires, it can do this silently (without redirecting the user to relogin to the IdP.<br><br><strong>RedirectUri</strong>: This piece of information is very important, in native apps the redirectUri needs to a schema based uri, that should be registered inside your iOS/Android app so the redirection happens correctly, <a href="https://tools.ietf.org/html/rfc7636">details here</a>.<br><br><strong>AllowedGrantType</strong>: This property is a collection that accepts one or many grant types, one important thing to note here, that mobile native apps Must run on authorization_code grant type. It provides a way to retrieve tokens on a back-channel as opposed to the browser front-channel. It also support client authentication.<br><br><strong>RequireClientSecret</strong>: In OAuth1.0 there was a required secret with clients, but in OAuth2.0 it became optional, and actually <a href="https://www.oauth.com/oauth2-servers/client-registration/client-id-secret/">not recommended</a> to add use client secrets for public apps (mobile and javascript / ones that don&#8217;t run on a server)</p>



<h3 class="wp-block-heading">Building the client app</h3>



<p>As I mentioned before the scope of this post will be adding an iOS client only, but Android is pretty much the same.<br><br>In the world of web, I mentioned the great IdentityModel open source project written in .NET (and supports all platforms, if you build Xamarin apps go ahead with that). <br><br>In the mobile native world there is a similar, popular well written and widely used open source project <a href="https://github.com/openid/AppAuth-iOS">AppAuth</a> it has iOS, Android and Mac implementations. <br><br>For the sake of this post, I will use the sample app that comes with the library. Assuming you are an iOS developer I am sure you already have cocoapods installed (a package manager something similar to npm in the world of Apple dev iOS/MacOSX) .<br><br>All you need to do (which I have done) go to your projects directory and run <code>pod try AppAuth</code> in your preferred command line tool , I use <a href="https://www.iterm2.com/">iTerm</a> if you haven&#8217;t tried it yet, give it a spin.<br><br>Once you have your project ready, go to the <em>AppAuthExampleViewController.swift</em> file and add your parameters, I have added the full file as a github gist here.<br><a href="https://gist.github.com/AmrElsehemy/59b2b30c98125fe2352995cdce07d7ca"></a><a href="https://gist.github.com/AmrElsehemy/59b2b30c98125fe2352995cdce07d7ca">https://gist.github.com/AmrElsehemy/59b2b30c98125fe2352995cdce07d7ca</a><br><br>Notable changes to make it work!<br><br>1- Set the issuer url, this is the url of the Sitecore Identity server (!NOTE: this is not the instance url, it&#8217;s the identity server) at <a href="https://gist.github.com/AmrElsehemy/59b2b30c98125fe2352995cdce07d7ca#file-appauthexampleviewcontroller-swift-L27">line 27</a><br><br>2- Set the client id, this has to match the one you just configured in SI in our case AwesomeAppId at <a href="https://gist.github.com/AmrElsehemy/59b2b30c98125fe2352995cdce07d7ca#file-appauthexampleviewcontroller-swift-L35">line 35</a><br><br>3- Set the redirectUrl to the same one you added in the config, usually this also needs to be registered as the schema url for your app in the info.plist (not required to make this sample work) this to be found at <a href="https://gist.github.com/AmrElsehemy/59b2b30c98125fe2352995cdce07d7ca#file-appauthexampleviewcontroller-swift-L42">line 42</a>.<br><br>4- Sitecore Identity has it&#8217;s own scope when it comes to profile data, so you need to change the scope request from profile to <strong>sitecore.profile</strong> to make it work changes at <a href="https://gist.github.com/AmrElsehemy/59b2b30c98125fe2352995cdce07d7ca#file-appauthexampleviewcontroller-swift-L386">line 386</a>.</p>



<h3 class="wp-block-heading">How it looks</h3>



<ul class="wp-block-gallery columns-2 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex"><li class="blocks-gallery-item"><figure><img fetchpriority="high" decoding="async" width="828" height="1792" src="https://i0.wp.com/www.amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-Xʀ-2019-07-27-at-17.56.35.png?fit=473%2C1024" alt="" data-id="506" data-link="http://www.amrelsehemy.net/?attachment_id=506" class="wp-image-506" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.56.35.png?w=828&amp;ssl=1 828w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.56.35.png?resize=139%2C300&amp;ssl=1 139w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.56.35.png?resize=473%2C1024&amp;ssl=1 473w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.56.35.png?resize=768%2C1662&amp;ssl=1 768w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.56.35.png?resize=710%2C1536&amp;ssl=1 710w" sizes="(max-width: 828px) 100vw, 828px" /></figure></li><li class="blocks-gallery-item"><figure><img decoding="async" width="828" height="1792" src="https://i2.wp.com/www.amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-Xʀ-2019-07-27-at-17.56.45.png?fit=473%2C1024" alt="" data-id="507" data-link="http://www.amrelsehemy.net/?attachment_id=507" class="wp-image-507" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.56.45.png?w=828&amp;ssl=1 828w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.56.45.png?resize=139%2C300&amp;ssl=1 139w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.56.45.png?resize=473%2C1024&amp;ssl=1 473w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.56.45.png?resize=768%2C1662&amp;ssl=1 768w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.56.45.png?resize=710%2C1536&amp;ssl=1 710w" sizes="(max-width: 828px) 100vw, 828px" /></figure></li><li class="blocks-gallery-item"><figure><img decoding="async" width="828" height="1792" src="https://i0.wp.com/www.amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-Xʀ-2019-07-27-at-17.56.58.png?fit=473%2C1024" alt="" data-id="509" data-link="http://www.amrelsehemy.net/?attachment_id=509" class="wp-image-509" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.56.58.png?w=828&amp;ssl=1 828w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.56.58.png?resize=139%2C300&amp;ssl=1 139w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.56.58.png?resize=473%2C1024&amp;ssl=1 473w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.56.58.png?resize=768%2C1662&amp;ssl=1 768w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.56.58.png?resize=710%2C1536&amp;ssl=1 710w" sizes="(max-width: 828px) 100vw, 828px" /></figure></li><li class="blocks-gallery-item"><figure><img loading="lazy" decoding="async" width="828" height="1792" src="https://i0.wp.com/www.amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-Xʀ-2019-07-27-at-17.57.02.png?fit=473%2C1024" alt="" data-id="510" data-link="http://www.amrelsehemy.net/?attachment_id=510" class="wp-image-510" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.57.02.png?w=828&amp;ssl=1 828w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.57.02.png?resize=139%2C300&amp;ssl=1 139w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.57.02.png?resize=473%2C1024&amp;ssl=1 473w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.57.02.png?resize=768%2C1662&amp;ssl=1 768w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Simulator-Screen-Shot-iPhone-X%CA%80-2019-07-27-at-17.57.02.png?resize=710%2C1536&amp;ssl=1 710w" sizes="auto, (max-width: 828px) 100vw, 828px" /></figure></li></ul>



<p>It start from Auto login (which tries to discover the connect/authorize/token urls on it&#8217;s own).<br>Then opens an embedded web view so the user can enter his sitecore credentials<br>Finally upon correct login, the web view closes and returns with the correct access token so the app can use it to understand information about the logged in user or alternatively use it as a Bearer token to get more information from APIs protected by Sitecore Identity server. </p>



<h3 class="wp-block-heading">References</h3>



<ul class="wp-block-list"><li><a href="https://www.oauth.com/oauth2-servers/client-registration/client-id-secret/">https://www.oauth.com/oauth2-servers/client-registration/client-id-secret/</a></li><li><a href="https://tools.ietf.org/html/rfc7636">https://tools.ietf.org/html/rfc7636</a></li><li><a href="https://aaronparecki.com/oauth-2-simplified/">https://aaronparecki.com/oauth-2-simplified/</a></li><li><a href="https://tools.ietf.org/html/draft-ietf-oauth-native-apps-07">https://tools.ietf.org/html/draft-ietf-oauth-native-apps-07</a></li><li><a href="https://github.com/openid/AppAuth-iOS/blob/master/Examples/README-IdentityServer.md">https://github.com/openid/AppAuth-iOS/blob/master/Examples/README-IdentityServer.md</a></li><li><a href="https://guides.cocoapods.org/using/getting-started.html">https://guides.cocoapods.org/using/getting-started.html</a></li></ul>
]]></content:encoded>
					
					<wfw:commentRss>https://amrelsehemy.net/2019/07/27/sitecore-identity-3-adding-mobile-native-clients/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">455</post-id>	</item>
		<item>
		<title>Sitecore Identity &#8211; 2 &#8211; Adding web clients</title>
		<link>https://amrelsehemy.net/2019/07/24/sitecore-identity-2-adding-web-clients/</link>
					<comments>https://amrelsehemy.net/2019/07/24/sitecore-identity-2-adding-web-clients/#respond</comments>
		
		<dc:creator><![CDATA[amr]]></dc:creator>
		<pubDate>Wed, 24 Jul 2019 18:31:48 +0000</pubDate>
				<category><![CDATA[Archive]]></category>
		<category><![CDATA[ASP.NET Core]]></category>
		<category><![CDATA[Sitecore]]></category>
		<category><![CDATA[identity]]></category>
		<category><![CDATA[sitecore]]></category>
		<guid isPermaLink="false">http://www.amrelsehemy.net/?p=453</guid>

					<description><![CDATA[In the first part of the series I tried to explain and give a very small introduction to what is Sitecore Identity and the basic implementation that comes out of the box with Sitecore 9.1 + In this part I will show some coding and how to build an external web application that uses the [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p style="text-align:justify">In the first part of the series I tried to explain and give a very small introduction to what is Sitecore Identity and the basic implementation that comes out of the box with Sitecore 9.1 +</p>



<p style="text-align:justify">In this part I will show some coding and how to build an external web application that uses the Sitecore Identity server to authenticate users, and to connect to the Sitecore instance APIs.</p>



<span id="more-453"></span>



<p>Remember in the first part of this series, I showed that the default implementation comes with a default client named Sitecore, which is the Sitecore instance itself protected by the identity server.</p>



<p>In this code sample I will show 2 things:</p>



<ol class="wp-block-list"><li>Configuring/Adding a Client App in the Sitecore Identity (SI)</li><li>Building an App that uses SI as a token issuing authority that protects the Sitecore instance apis and data.</li></ol>



<p>So let&#8217;s get started, </p>



<h4 class="wp-block-heading">Configuring a Client</h4>



<p>Sitecore Identity (SI) has the clients configured in the file <code>&lt;instance&gt;.identityserver\sitecore\Sitecore.Plugin.IdentityServer\Config\identityServer.xml</code> here we will add a new client with some default properties.</p>



<pre class="wp-block-code"><code>&lt;WebAppClient>
   &lt;ClientId>WebAppClient&lt;/ClientId>
   &lt;ClientName>Web App Client&lt;/ClientName>
   &lt;AccessTokenType>0&lt;/AccessTokenType>
   &lt;AllowOfflineAccess>true&lt;/AllowOfflineAccess>
   &lt;AlwaysIncludeUserClaimsInIdToken>false&lt;/AlwaysIncludeUserClaimsInIdToken>
   &lt;AccessTokenLifetimeInSeconds>3600&lt;/AccessTokenLifetimeInSeconds>
   &lt;IdentityTokenLifetimeInSeconds>3600&lt;/IdentityTokenLifetimeInSeconds>
   &lt;AllowAccessTokensViaBrowser>true&lt;/AllowAccessTokensViaBrowser>
   &lt;RequireConsent>false&lt;/RequireConsent>
   &lt;RequireClientSecret>false&lt;/RequireClientSecret>
   &lt;AllowedGrantTypes>
      &lt;AllowedGrantType1>hybrid&lt;/AllowedGrantType1>
      &lt;AllowedGrantType2>client_credentials&lt;/AllowedGrantType2>
   &lt;/AllowedGrantTypes>
   &lt;RedirectUris>
      &lt;RedirectUri1>{AllowedCorsOrigin}/signin-oidc&lt;/RedirectUri1>
   &lt;/RedirectUris>
   &lt;PostLogoutRedirectUris>
      &lt;PostLogoutRedirectUri1>{AllowedCorsOrigin}/signout-callback-oidc&lt;/PostLogoutRedirectUri1>
   &lt;/PostLogoutRedirectUris>
   &lt;AllowedCorsOrigins>
      &lt;AllowedCorsOrigin1>https://localhost:44343&lt;/AllowedCorsOrigin1>
   &lt;/AllowedCorsOrigins>
   &lt;AllowedScopes>
      &lt;AllowedScope1>openid&lt;/AllowedScope1>
      &lt;AllowedScope2>sitecore.profile&lt;/AllowedScope2>
      &lt;AllowedScope3>sitecore.profile.api&lt;/AllowedScope3>
   &lt;/AllowedScopes>
   &lt;UpdateAccessTokenClaimsOnRefresh>true&lt;/UpdateAccessTokenClaimsOnRefresh>
&lt;/WebAppClient>   </code></pre>



<h4 class="wp-block-heading">Adding the Client Code</h4>



<p>Now that we configured our client so the identity server knows about it, we will build the application itself. In this sample I started from a plain ASP.NET Core 2.2 MVC application. <br>The folks behind the IdentityServer4 also built client tools <a href="https://github.com/IdentityModel">https://github.com/IdentityModel</a> which make it easy to authenticate against OpenIDC and OAuth2 servers.</p>



<p>For a change I will use the new <a href="https://visualstudiomagazine.com/articles/2019/02/01/getting-started-with-razor.aspx">Razor Page Model</a>, instead of the traditional View Controllers. But first things first, after adding the nuget for IdentityModel we need to register and configure the services we will need in the Startup.cs as shown.</p>



<pre class="wp-block-code"><code>using IdentityModel;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.IdentityModel.Tokens;
using System;
using System.IdentityModel.Tokens.Jwt;

namespace WebAppClient
{
    public class Startup
    {
        public Startup(IConfiguration configuration)
        {
            Configuration = configuration;
        }

        public IConfiguration Configuration { get; }

        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear();

            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);

            services.Configure&lt;CookiePolicyOptions>(options =>
            {
                options.CheckConsentNeeded = context => true;
                options.MinimumSameSitePolicy = SameSiteMode.None;
            });

            services.AddAuthentication(options =>
            {
                options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
                options.DefaultChallengeScheme = "oidc";
            })
            .AddCookie(options =>
            {
                options.ExpireTimeSpan = TimeSpan.FromMinutes(60);
                options.Cookie.Name = "mvcimplicit";
            })
            .AddOpenIdConnect("oidc", options =>
            {
                options.ClientId = "WebAppClient";
                options.Authority = "https://sc910.identityserver";
                options.RequireHttpsMetadata = false;
                options.GetClaimsFromUserInfoEndpoint = true;
                options.ResponseType = "code token";

                options.Scope.Clear();
                options.Scope.Add("openid");
                options.Scope.Add("sitecore.profile");
                options.Scope.Add("offline_access");
                options.Scope.Add("sitecore.profile.api");

                options.SaveTokens = true;

                options.TokenValidationParameters = new TokenValidationParameters
                {
                    NameClaimType = JwtClaimTypes.Name,
                    RoleClaimType = JwtClaimTypes.Role,
                };
            });
        }

        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/Error");
                app.UseHsts();
            }

            app.UseHttpsRedirection();
            app.UseStaticFiles();
            app.UseCookiePolicy();

            app.UseAuthentication();
            app.UseMvcWithDefaultRoute();
        }
    }
}
</code></pre>



<p>There is not much difference between View Controllers and Razor Page Models in this sample, with one exception, that you get the current context using HttpContext instead of the Context property.<br>I added a Secure Page which renders the values it receives from the Sitecore Identity.</p>



<pre class="wp-block-code"><code>@page
@using Microsoft.AspNetCore.Authentication
@model WebAppClient.Pages.SecureModel
@{
    ViewData["Title"] = "Secure";
}

&lt;h1>Secure Page&lt;/h1>

&lt;h2>Claims&lt;/h2>

&lt;dl>
    @foreach (var claim in User.Claims)
    {
        &lt;dt>@claim.Type&lt;/dt>
        &lt;dd>@claim.Value&lt;/dd>
    }
&lt;/dl>

&lt;h2>Properties&lt;/h2>

&lt;dl>
    @foreach (var prop in (await HttpContext.AuthenticateAsync()).Properties.Items)
    {
        &lt;dt>@prop.Key&lt;/dt>
        &lt;dd>@prop.Value&lt;/dd>
    }
&lt;/dl>
</code></pre>



<pre class="wp-block-code"><code>using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace WebAppClient.Pages
{
    [Authorize]
    public class SecureModel : PageModel
    {
        public void OnGet()
        {

        }
    }
}</code></pre>



<div class="wp-block-image"><figure class="aligncenter is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/20.228.146.132/wp-content/uploads/2019/07/Jul-24-2019-22-01-27.gif?resize=588%2C380" alt="" class="wp-image-494" width="588" height="380"/></figure></div>



<h4 class="wp-block-heading">References</h4>



<ul class="wp-block-list"><li><a href="https://himadritechblog.wordpress.com/2019/02/26/sitecore-identity-part-2-identity-client-and-resource-authorization/">https://himadritechblog.wordpress.com/2019/02/26/sitecore-identity-part-2-identity-client-and-resource-authorization/</a></li><li><a href="https://doc.sitecore.com/developers/91/sitecore-experience-management/en/sitecore-identity.html">https://doc.sitecore.com/developers/91/sitecore-experience-management/en/sitecore-identity.html</a></li><li><a href="https://identityserver4.readthedocs.io/">https://identityserver4.readthedocs.io/</a></li></ul>
]]></content:encoded>
					
					<wfw:commentRss>https://amrelsehemy.net/2019/07/24/sitecore-identity-2-adding-web-clients/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">453</post-id>	</item>
		<item>
		<title>Sitecore Identity &#8211; 1 &#8211; Understanding the basics</title>
		<link>https://amrelsehemy.net/2019/07/20/sitecore-identity-1-understanding-the-basics/</link>
					<comments>https://amrelsehemy.net/2019/07/20/sitecore-identity-1-understanding-the-basics/#respond</comments>
		
		<dc:creator><![CDATA[amr]]></dc:creator>
		<pubDate>Sat, 20 Jul 2019 18:28:52 +0000</pubDate>
				<category><![CDATA[Archive]]></category>
		<category><![CDATA[Sitecore]]></category>
		<category><![CDATA[identity]]></category>
		<category><![CDATA[sitecore]]></category>
		<guid isPermaLink="false">http://www.amrelsehemy.net/?p=451</guid>

					<description><![CDATA[Introduction One of the major updates that came in Sitecore 9.1 is Sitecore Identity, this blog post will introduce a basic understanding for how it works. Sitecore Identity usually abbreviated (SI) is a new feature introduced in Sitecore 9.1. SI doesn&#8217;t replace the old identity mechanism, but actually builds on top of the current authentication [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Introduction</h2>



<p>One of the major updates that came in Sitecore 9.1 is Sitecore Identity, this blog post will introduce a basic understanding for how it works.</p>



<span id="more-451"></span>



<p>Sitecore Identity usually abbreviated (SI) is a new feature introduced in Sitecore 9.1. SI doesn&#8217;t replace the old identity mechanism, but actually builds on top of the current authentication mechanism in 9.0 and uses the Federated Authentication feature to act as an external authentication source. SI is a wrapper built on top of the open source widely accepted <a rel="noreferrer noopener" href="https://github.com/IdentityServer/IdentityServer4" target="_blank">IdentityServer4</a> which itself is an OpenID Connect and OAuth 2.0 framework for ASP.NET Core, it is also deployed as a separate service (as a part of breaking the monolith into micro-services architecture).</p>



<p>IdentityServer4 on it&#8217;s own enables many goodies, including Authentication as a Service, Single Sign-on/Sign-out, Access Control for APIs also it can act as a Federation Gateway as well.</p>



<h2 class="wp-block-heading">How it works</h2>



<p>Starting Sitecore 9.1 the default deployment includes and uses the new Sitecore Identity, under the hood SI server uses &nbsp;<a rel="noreferrer noopener" href="https://github.com/sma73648/identityserver-contrib-membership" target="_blank">identityserver-contrib-membership</a> which enables IdentityServer4 use the old ASP.NET 2.0 Membership Database, of course as anything else in Sitecore this is highly customizable and can be overridden and changed to another implementation using dependency injection.</p>



<p>In the world of OAuth and Open ID Connect there are usually 3 moving parts which are the (Client &#8211; Identity Server &#8211; Resources)  </p>



<div class="wp-block-image"><figure class="aligncenter is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/identityserver4.readthedocs.io/en/latest/_images/terminology.png?resize=580%2C326&#038;ssl=1" alt="" width="580" height="326"/><figcaption>source: <a href="https://identityserver4.readthedocs.io/en/latest/_images/terminology.png">https://identityserver4.readthedocs.io/en/latest/_images/terminology.png</a></figcaption></figure></div>



<p>The flow starts from the user, using a client (can be a web app, mobile, bot or even an iot device) and wants to login or request access to a protected resource. <br>Then the flow is sent to the identity server (which the client is registered in) requesting access to specific resources (can be identity or access to other resources or api, which again is registered in the identity server).<br>The identity server checks the credentials against the required/configured grant types (more on this later). And then returns to the client caller with the token required for access (which can be stored in a cookie in case or web or used for authorization in case of native) . This is a very simple workflow very brief and skipping a lot of details that might not be relevant to the scope of introduction.</p>



<h2 class="wp-block-heading">In Sitecore 9.1</h2>



<p>So how this is organized in Sitecore, the default implementation comes with  an identity server installed which is the token issuer and authority, by default it&#8217;s installed at a default url is&nbsp;<code>https://{instanceName}.identityserver</code>. The configuration for the SI server&nbsp;in the Sitecore instance in the&nbsp;<code>\App_Config\Sitecore\Owin.Authentication.IdentityServer\Sitecore.Owin.Authentication.IdentityServer.config</code>&nbsp;configuration file. And that&#8217;s where the configuration is added in the instance to make it know about the SI server, specifically in the&nbsp;<code>sitecore/federatedAuthentication/identityProviders</code>&nbsp;node.</p>



<p>On the other hand in the SI server sitecore is configured as a Client, and that is configured in the identity server site root in the path \sitecore\Sitecore.Plugin.IdentityServer\Config\identityServer.xml, in the below image is a snippet of what is actually defined.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1648" height="1094" src="https://i0.wp.com/www.amrelsehemy.net/wp-content/uploads/2019/07/Screen-Shot-2019-07-11-at-8.54.35-PM.png?fit=1024%2C680" alt="" class="wp-image-469" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Screen-Shot-2019-07-11-at-8.54.35-PM.png?w=1648&amp;ssl=1 1648w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Screen-Shot-2019-07-11-at-8.54.35-PM.png?resize=300%2C199&amp;ssl=1 300w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Screen-Shot-2019-07-11-at-8.54.35-PM.png?resize=1024%2C680&amp;ssl=1 1024w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Screen-Shot-2019-07-11-at-8.54.35-PM.png?resize=768%2C510&amp;ssl=1 768w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Screen-Shot-2019-07-11-at-8.54.35-PM.png?resize=1536%2C1020&amp;ssl=1 1536w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /><figcaption>Default Sitecore config in the identity server settings</figcaption></figure>



<p>Some key values to notice in the configuration, the <strong>ClientId</strong> (Sitecore) which should be unique for each client app, and the <strong>AllowedScopes</strong> which tells the identity server which resources can this client ask for.<br><strong>AllowedGrantTypes</strong> this tells identity server how can this client interact with it to acquire tokens, there is a handful of standard grant types out there, and you can combine a few together but some constraints apply for security. For more information check the <a href="https://identityserver4.readthedocs.io/en/latest/topics/grant_types.html">supported grant types in the identity server</a>.<br>In this case the Sitecore client is configured to use two grant types, hybrid for user centric operations and client credentials for server to server communication.</p>



<hr class="wp-block-separator"/>



<p>In this post I showed the basic out of the box features of Sitecore Identity in 9.1, in the next posts of this series I will show more customizations, how to add a custom client besides the Default Client, how to add your own APIs and protect them using the (SI), also I will show how to add different clients native mobile and chatbots, finally how use the SI as a gateway and enable external custom identity providers like Azure AD or Google.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://amrelsehemy.net/2019/07/20/sitecore-identity-1-understanding-the-basics/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">451</post-id>	</item>
		<item>
		<title>Microsoft Certified: Azure AI Engineer Associate</title>
		<link>https://amrelsehemy.net/2019/07/13/microsoft-certified-azure-ai-engineer-associate/</link>
					<comments>https://amrelsehemy.net/2019/07/13/microsoft-certified-azure-ai-engineer-associate/#respond</comments>
		
		<dc:creator><![CDATA[amr]]></dc:creator>
		<pubDate>Sat, 13 Jul 2019 00:26:45 +0000</pubDate>
				<category><![CDATA[Archive]]></category>
		<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[artificial-intelligence]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[certification]]></category>
		<guid isPermaLink="false">http://www.amrelsehemy.net/?p=476</guid>

					<description><![CDATA[Since the beginning of this year, I have been shifting the focus towards AI and ML, and their applications in business and real world. One step towards achieving the technical capability check was this certification. Happy to announce that I completed the Microsoft Certified: Azure AI Engineer Associate certification. Looking forward for the next ones.]]></description>
										<content:encoded><![CDATA[
<p>Since the beginning of this year, I have been shifting the focus towards AI and ML, and their applications in business and real world. One step towards achieving the technical capability check was this certification. Happy to announce that I completed the Microsoft Certified: Azure AI Engineer Associate certification. Looking forward for the next ones.</p>



<figure class="wp-block-image"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1024" height="723" src="https://i0.wp.com/20.228.146.132/wp-content/uploads/2019/07/Microsoft_Certified_Professional_Certificate_0-1024x723.png?resize=1024%2C723" alt="Certification" class="wp-image-480" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Microsoft_Certified_Professional_Certificate_0.png?resize=1024%2C723&amp;ssl=1 1024w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Microsoft_Certified_Professional_Certificate_0.png?resize=300%2C212&amp;ssl=1 300w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Microsoft_Certified_Professional_Certificate_0.png?resize=768%2C543&amp;ssl=1 768w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Microsoft_Certified_Professional_Certificate_0.png?resize=1536%2C1085&amp;ssl=1 1536w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/07/Microsoft_Certified_Professional_Certificate_0.png?w=1754&amp;ssl=1 1754w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://amrelsehemy.net/2019/07/13/microsoft-certified-azure-ai-engineer-associate/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">476</post-id>	</item>
		<item>
		<title>Understanding jss create for Sitecore JSS</title>
		<link>https://amrelsehemy.net/2019/03/06/understanding-jss-create-for-sitecore-jss/</link>
					<comments>https://amrelsehemy.net/2019/03/06/understanding-jss-create-for-sitecore-jss/#respond</comments>
		
		<dc:creator><![CDATA[amr]]></dc:creator>
		<pubDate>Tue, 05 Mar 2019 23:27:54 +0000</pubDate>
				<category><![CDATA[Archive]]></category>
		<category><![CDATA[Sitecore]]></category>
		<category><![CDATA[jss]]></category>
		<category><![CDATA[sitecore]]></category>
		<guid isPermaLink="false">http://amrelsehemy.net/?p=407</guid>

					<description><![CDATA[One thing I love about Sitecore is the ability to extend and customize almost anything. And that also goes with the newly released Sitecore JSS. In the previous posts, I gave a very brief introduction and getting started with Sitecore JSS, and then I tried to recreate a very minimal JSS app without using any [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>One thing I love about Sitecore is the ability to extend and customize almost anything. And that also goes with the newly released Sitecore JSS.</p>



<p>In the previous posts, I gave a very brief introduction and getting started with Sitecore JSS, and then I tried to recreate a very minimal JSS app without using any out of the box client tools.</p>



<p>In this post I will show how to use the Sitecore JSS tools to reuse your own template.</p>



<span id="more-407"></span>



<h3 class="wp-block-heading">Basic Template Generation</h3>



<p>Sitecore JSS comes with tons of features and capabilities, the one I am exploring today is the <strong>jss create</strong> command, the <a href="https://jss.sitecore.com/docs/techniques/custom-create-templates">official documentation</a> already has a great starting point to let you know what&#8217;s there and how to extend it. Also, just typing in the command line <strong>jss create &#8211;help</strong> will give a great starting point.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1372" height="922" src="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-24-at-7.22.39-PM.png?fit=1024%2C688" alt="" class="wp-image-413" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-24-at-7.22.39-PM.png?w=1372&amp;ssl=1 1372w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-24-at-7.22.39-PM.png?resize=300%2C202&amp;ssl=1 300w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-24-at-7.22.39-PM.png?resize=1024%2C688&amp;ssl=1 1024w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-24-at-7.22.39-PM.png?resize=768%2C516&amp;ssl=1 768w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /><figcaption>jss create &#8211;help</figcaption></figure>



<p>So as you can see from the available options, there is already a couple few ways to make an app from a custom template.</p>



<ol class="wp-block-list"><li>By specifying your own repository using the <strong>&#8211;repository</strong>  parameter, this repository should be <strong>public</strong> and accessible from your command line (there is no way to point to a non github repo or a private repo, but there is a workaround).<ul><li>Also, works with <strong>&#8211;branch</strong> to change the active branch</li></ul></li><li>By specifying a folder on the local hard disk using the <strong>&#8211;source</strong> parameter with value having the folder containing the template (which as written in the tool Good for private templates.)</li></ol>



<p>One customization option here is to give the template generator a starting hostname using the <strong>&#8211;hostName</strong> parameter.</p>



<h3 class="wp-block-heading">Advanced Template Generation</h3>



<p>What actually happens when calling the <strong>jss create app <em>template&nbsp;</em></strong>a set of tasks are executed.</p>



<p>First, the cli tool tries to copy the template from the source (built-in, custom repo or source folder. Next it tries to run npm install, to get the folder ready for you. After installing the required packages, the tool starts setting the package name to &lt;the app name you chose&gt; some default renaming happens here. </p>



<p>Then it&#8217;s up to you and use the magic of <strong>jss-create.js</strong>, which is a file that you add in the source (repo or folder) that gets executed and self deleted from destination folder. You can use it for any customization, renaming or moving bits that you need to add. If you add some default files with &lt;tokens&gt; to be replaced upon creating new projects this is the right place to add your replacing logic.</p>



<h3 class="wp-block-heading">Sample demo</h3>



<p>In the last post, I built a bare bones jss application, I will reuse it and make it as a template to show off the power of jss create.</p>



<p>So for the sake of the demo, I copied the old bare-bones-jss-app into a new folder and named it bare-bones-jss-template and then ran this command.</p>



<pre class="wp-block-code"><code>jss create app-one bare-bones-jss-template -s /Users/amr/Projects/Blog</code></pre>



<p>As expected the cli did it&#8217;s job, a new folder name app-one was created with the contents of the template, npm install was called, and I ended up with the lovely ASCI Sitecore logo as shown here</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1826" height="1154" src="https://i2.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-05-at-10.24.31-PM.png?fit=1024%2C647" alt="" class="wp-image-419" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-05-at-10.24.31-PM.png?w=1826&amp;ssl=1 1826w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-05-at-10.24.31-PM.png?resize=300%2C190&amp;ssl=1 300w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-05-at-10.24.31-PM.png?resize=1024%2C647&amp;ssl=1 1024w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-05-at-10.24.31-PM.png?resize=768%2C485&amp;ssl=1 768w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-05-at-10.24.31-PM.png?resize=1536%2C971&amp;ssl=1 1536w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></figure>



<p>One thing to notice, the top yellow line <em>Template bare-bones-jss-template did not have a jss-create.js in its root to invoke. No template configuration will be performed.</em> And that means the application will just be a copy with no special names replacement done. </p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="2144" height="1036" src="https://i1.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-05-at-10.59.46-PM.png?fit=1024%2C495" alt="" class="wp-image-420" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-05-at-10.59.46-PM.png?w=2144&amp;ssl=1 2144w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-05-at-10.59.46-PM.png?resize=300%2C145&amp;ssl=1 300w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-05-at-10.59.46-PM.png?resize=1024%2C495&amp;ssl=1 1024w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-05-at-10.59.46-PM.png?resize=768%2C371&amp;ssl=1 768w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-05-at-10.59.46-PM.png?resize=1536%2C742&amp;ssl=1 1536w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-05-at-10.59.46-PM.png?resize=2048%2C990&amp;ssl=1 2048w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></figure>



<p>Now I will borrow the default <em>jss-create.js</em> in the react default template and show what happens.</p>



<pre class="wp-block-code"><code>const { applyNameToProject } = require('@sitecore-jss/sitecore-jss-cli/dist/create');
/**
 * @param {object} argv Arguments passed to `jss create` script
 * @param {string[]} nextSteps Array of default 'next steps' to show at the console
 * @returns {string[]} The next steps to display to the console user (enables customization from this script)
 */
module.exports = function createJssProject(argv, nextSteps) {
  console.log(`Executing create script: ${__filename}...`);

  applyNameToProject(__dirname, argv.name, argv.hostName);

  return nextSteps;
};</code></pre>



<p>After adding this file, we just need to add &#8220;@sitecore-jss/sitecore-jss-cli&#8221;: &#8220;^11.0.2&#8221; to devDependencies in package.json, since it&#8217;s required in the file. To understand what <strong>applyNameToProject</strong> does you can peek into the source code of that method <a href="https://github.com/Sitecore/jss/blob/master/packages/sitecore-jss-cli/src/create/index.ts">here</a>. You will figure out that it&#8217;s trying to find a config.appName entry from the package.json file to use it for renames. So let&#8217;s add that as well.</p>



<pre class="wp-block-code"><code>"config": {
    "appName": "bare-bones-jss-template"
  },</code></pre>



<p>And there you go, run again the jss create command line. And all files and settings are renamed for you to start deploying.</p>



<pre class="wp-block-code"><code>jss create app-two bare-bones-jss-template -s /Users/amr/Projects/Blog</code></pre>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="2154" height="1302" src="https://i2.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-06-at-3.03.31-AM.png?fit=1024%2C619" alt="" class="wp-image-421" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-06-at-3.03.31-AM.png?w=2154&amp;ssl=1 2154w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-06-at-3.03.31-AM.png?resize=300%2C181&amp;ssl=1 300w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-06-at-3.03.31-AM.png?resize=1024%2C619&amp;ssl=1 1024w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-06-at-3.03.31-AM.png?resize=768%2C464&amp;ssl=1 768w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-06-at-3.03.31-AM.png?resize=1536%2C928&amp;ssl=1 1536w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-06-at-3.03.31-AM.png?resize=2048%2C1238&amp;ssl=1 2048w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></figure>



<p>Now we are back on track, after poking around the default tooling to understand what is happening under the hood. Next is doing actual customization and adding your own stuff. renaming other files or creating new ones all from the beginning.</p>



<p>Even the list of steps that are displayed after the ASCI Sitecore logo can be customized. From within the jss-create.js file you can change/add to the nextSteps array.</p>



<pre class="wp-block-code"><code>  nextSteps.push('* Watch a movie');</code></pre>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="906" height="1434" src="https://i1.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-06-at-3.23.00-AM.png?fit=647%2C1024" alt="" class="wp-image-422" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-06-at-3.23.00-AM.png?w=906&amp;ssl=1 906w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-06-at-3.23.00-AM.png?resize=190%2C300&amp;ssl=1 190w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-06-at-3.23.00-AM.png?resize=647%2C1024&amp;ssl=1 647w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/03/Screen-Shot-2019-03-06-at-3.23.00-AM.png?resize=768%2C1216&amp;ssl=1 768w" sizes="auto, (max-width: 906px) 100vw, 906px" /></figure>



<p>I hope this post has been useful and beneficial to you, as it was a lot of fun and learning for me.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://amrelsehemy.net/2019/03/06/understanding-jss-create-for-sitecore-jss/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">407</post-id>	</item>
		<item>
		<title>Bare bones Sitecore JSS react application</title>
		<link>https://amrelsehemy.net/2019/02/19/bare-bones-sitecore-jss-react-application/</link>
					<comments>https://amrelsehemy.net/2019/02/19/bare-bones-sitecore-jss-react-application/#respond</comments>
		
		<dc:creator><![CDATA[amr]]></dc:creator>
		<pubDate>Tue, 19 Feb 2019 20:17:26 +0000</pubDate>
				<category><![CDATA[Archive]]></category>
		<category><![CDATA[Sitecore]]></category>
		<category><![CDATA[jss]]></category>
		<category><![CDATA[sitecore]]></category>
		<guid isPermaLink="false">http://amrelsehemy.net/?p=396</guid>

					<description><![CDATA[In the last post of getting started with Sitecore JSS, I  worte a brief introduction on what is actually Sitecore JSS, decribed the server and client components and finally showed how to run the out of box react template. I also described briefly what comes with the default template in terms of folder but didn&#8217;t [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In the <a href="https://amrelsehemy.net/2019/02/14/getting-started-with-sitecore-jss/">last post</a> of getting started with Sitecore JSS, I  worte a brief introduction on what is actually Sitecore JSS, decribed the server and client components and finally showed how to run the out of box react template. I also described briefly what comes with the default template in terms of folder but didn&#8217;t get into details of that.</p>
<p>In this post, I will build the simplest ever jss application without using the default template, and deploying it to Sitecore with the bare minimum, this will help to understand all the moving parts under the hood.</p>
<p><span id="more-396"></span></p>
<p>I will start of from <a href="https://github.com/facebook/create-react-app">facebook&#8217;s create react app</a> template (which is also used as a base for the default jss react template, it&#8217;s kind of a standard for bootstrapping react apps nowadays).</p>
<p>Let&#8217;s create the app, if you don&#8217;t already have create-react-app cli installed, follow the instructions <a href="https://github.com/facebook/create-react-app">here</a>.</p>
<pre>npx create-react-app bare-bones-jss-app</pre>
<p>This creates most of the work for us, now we have a react based application wired with some default settings, to see what you hae dne go into the folder and npm start, you will end up with localhost:3000, and the beautiful react nuclear logo spinning in place.</p>
<p>Our steps to accomplish are task is as follows:</p>
<ol>
<li>Add the application/site configuration</li>
<li>Add the applicaition items and artifacts</li>
<li>Move the build folder (packaged project) to Sitecore root.</li>
</ol>
<p>1- Adding a site configuration for Sitecore JSS</p>
<p>For Sitecore to recognize any site within it&#8217;s implementation, it needs to registered and configured appropriately.</p>
<p>From the default template /sitecore/config/app.config you will notice this description in the file</p>
<pre>&lt;!--
JSS Sitecore Configuration Patch File
This configuration file registers the JSS site with Sitecore,
and configures the Layout Service to work with it. 
Config patches need to be deployed to the Sitecore server.

Normally `jss deploy config` can do this for local development. 
To manually deploy, or to deploy via CI, this file can be placed in 
the `App_Config/Include` folder, or a subfolder of it, 
within the Sitecore site.
--&gt;</pre>
<p>So that&#8217;s what we are going to do, we will build it first then manually deploy it in the <strong>App_Config/Include</strong> folder. For the JSS sites/apps the minimum requirement is to have a configuration node for both a site and an application as follows:</p>
<pre>&lt;configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" 
                xmlns:set="http://www.sitecore.net/xmlconfig/set/" 
                xmlns:role="http://www.sitecore.net/xmlconfig/role/"&gt;
  &lt;sitecore&gt;
    &lt;sites&gt;
      &lt;site patch:before="site[@name='website']"
            inherits="website"
            name="bare-bones-jss-app"
            hostName="bare-bones.dev.local"
            rootPath="/sitecore/content/bare bones"
            startItem="/home"
            database="master" /&gt;
    &lt;/sites&gt;
    &lt;javaScriptServices&gt;
      &lt;apps&gt;
        &lt;app name="bare-bones-jss-app"
             sitecorePath="/sitecore/content/bare bones"
             useLanguageSpecificLayout="true"
             inherits="defaults"
        /&gt;
      &lt;/apps&gt;
    &lt;/javaScriptServices&gt;
  &lt;/sitecore&gt;
&lt;/configuration&gt;</pre>
<p>Second step is to add the minimum artifacts to operate a Sitecore JSS site, which are basically :</p>
<ol>
<li>An App</li>
<li>A route</li>
<li>A Layout</li>
</ol>
<p>All JSS item templates are added into your instance after installing the JSS server update package, the highlighted portion are the out of the box templates, they are all placed under Foundation folder, to adhere to the <a href="https://helix.sitecore.net">Helix</a> recommendation.</p>
<p><figure id="attachment_398" aria-describedby="caption-attachment-398" style="width: 435px" class="wp-caption alignnone"><img data-recalc-dims="1" loading="lazy" decoding="async" class="  wp-image-398 alignnone alignright" src="https://i0.wp.com/20.228.146.132/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-7.51.59-PM.png?resize=435%2C539" alt="Screen Shot 2019-02-19 at 7.51.59 PM" width="435" height="539" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-7.51.59-PM.png?w=504&amp;ssl=1 504w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-7.51.59-PM.png?resize=242%2C300&amp;ssl=1 242w" sizes="auto, (max-width: 435px) 100vw, 435px" /><figcaption id="caption-attachment-398" class="wp-caption-text">out of the box templates coming with JSS</figcaption></figure></p>
<p>Now create your items, as shown</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class=" size-full wp-image-399 alignnone" src="https://i0.wp.com/20.228.146.132/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-8.10.41-PM.png?resize=396%2C264" alt="Screen Shot 2019-02-19 at 8.10.41 PM" width="396" height="264" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-8.10.41-PM.png?w=396&amp;ssl=1 396w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-8.10.41-PM.png?resize=300%2C200&amp;ssl=1 300w" sizes="auto, (max-width: 396px) 100vw, 396px" /><img data-recalc-dims="1" loading="lazy" decoding="async" class=" size-full wp-image-400 alignnone" src="https://i0.wp.com/20.228.146.132/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-8.10.58-PM.png?resize=456%2C474" alt="Screen Shot 2019-02-19 at 8.10.58 PM" width="456" height="474" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-8.10.58-PM.png?w=456&amp;ssl=1 456w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-8.10.58-PM.png?resize=289%2C300&amp;ssl=1 289w" sizes="auto, (max-width: 456px) 100vw, 456px" /></p>
<p>After adding your 3 items, make sure to attach the Layout to the route.</p>
<p>Third and Final step is to build and copy the output bundle of the create react app to the sitecore instance folder, by default jss apps live under <span style="text-decoration: underline;"><strong>root/dist/</strong></span> which is configurable as most of the things in Sitecore.</p>
<p>Before building and copying, we just need to add Server Side Rendering support, since it is used by default in integrated mode and to add components in experience editor requires the server to return rendered HTML for it to find the component in.</p>
<p>Since it&#8217;s not the scope of this post to discuss SSR, I will not detail what was done/skipped, I just added a minimalistic server.js along with it&#8217;s webpack config, the full source code of this post is available <a href="https://github.com/AmrElsehemy/bare-bones-jss-app">here</a> to examine and explore different files.</p>
<p>Finally, after stitching all the parts, the result is charming, we have a minimal JSS app with LayoutService enabled, and runs in the Experience Editor.</p>
<p>In later posts, I will try to build up bits and pieces until I achieve the default template, so I can learn along the way.</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-403" src="https://i0.wp.com/20.228.146.132/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-10.06.58-PM.png?resize=2694%2C1648" alt="Screen Shot 2019-02-19 at 10.06.58 PM.png" width="2694" height="1648" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-10.06.58-PM.png?w=2694&amp;ssl=1 2694w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-10.06.58-PM.png?resize=300%2C184&amp;ssl=1 300w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-10.06.58-PM.png?resize=1024%2C626&amp;ssl=1 1024w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-10.06.58-PM.png?resize=768%2C470&amp;ssl=1 768w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-10.06.58-PM.png?resize=1536%2C940&amp;ssl=1 1536w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-19-at-10.06.58-PM.png?resize=2048%2C1253&amp;ssl=1 2048w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></p>
<p>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://amrelsehemy.net/2019/02/19/bare-bones-sitecore-jss-react-application/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">396</post-id>	</item>
		<item>
		<title>Getting started with Sitecore JSS</title>
		<link>https://amrelsehemy.net/2019/02/14/getting-started-with-sitecore-jss/</link>
					<comments>https://amrelsehemy.net/2019/02/14/getting-started-with-sitecore-jss/#respond</comments>
		
		<dc:creator><![CDATA[amr]]></dc:creator>
		<pubDate>Wed, 13 Feb 2019 22:44:29 +0000</pubDate>
				<category><![CDATA[Archive]]></category>
		<category><![CDATA[Sitecore]]></category>
		<category><![CDATA[jss]]></category>
		<category><![CDATA[sitecore]]></category>
		<guid isPermaLink="false">http://amrelsehemy.net/?p=388</guid>

					<description><![CDATA[I have been working on a mega project using Sitecore JSS, it even got pushed to production since TP4. Having said, I decided to start blogging about this awesome technology hopefully to give back to the community and to learn more through the process. So let&#8217;s begin. What is Sitecore JSS ? Sitecore JSS is a [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I have been working on a mega project using Sitecore JSS, it even got pushed to production since TP4.</p>
<p>Having said, I decided to start blogging about this awesome technology hopefully to give back to the community and to learn more through the process.</p>
<p>So let&#8217;s begin.<span id="more-388"></span></p>
<p><strong>What is Sitecore JSS ?</strong></p>
<blockquote>
<div class="mod" lang="en-EG" data-md="61">
<div class="LGOjhe" role="heading" aria-level="3" data-hveid="CAoQBw"><span class="ILfuVd"><b>Sitecore JSS</b> is a way to develop JavaScript-based frontends with a <b>Sitecore</b> backend.</span></div>
</div>
</blockquote>
<p>The official home of JSS is <a href="https://jss.sitecore.com" target="_blank" rel="noopener">https://jss.sitecore.com</a>, it&#8217;s a great resource for getting started I will try not to repeat what is already described greatly over there.</p>
<p><b>Sitecore JSS,</b> is an extension that works on sitecore 9.0.1 and later, JSS has two parts</p>
<ol>
<li>Server side, installed on Sitecore</li>
<li>Client side, can actually be anything (that can work with http)</li>
</ol>
<p><strong>JSS server side</strong> is a normal Sitecore Package with the regular sitecore artifacts (dlls, Views, configs, and of course sitecore items). This is a closed source part and has different versions for each supported Sitecore backend</p>
<p><strong>JSS client side</strong> is a mix of node npms and templates for React, Vue and Angular for web experiences, there is also an experimental template for React native for mobile. Not like the server side part, all the client side templates and tools are open-sourced here. <a href="https://github.com/Sitecore/jss">https://github.com/Sitecore/jss</a></p>
<p>I will follow up with more posts to get into each side in much more details.</p>
<p>So now let&#8217;s explore what comes out of the box when running the very first set of commands</p>
<pre>npm install -g @sitecore-jss/sitecore-jss-cli
jss create my-first-jss-app react
<span class="hljs-built_in">cd</span> my-first-jss-app
jss start</pre>
<p>And you have a running jss site and a folder ready to for your customizations as shown in these figures</p>
<p><figure id="attachment_390" aria-describedby="caption-attachment-390" style="width: 3354px" class="wp-caption alignnone"><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-390" src="https://i0.wp.com/20.228.146.132/wp-content/uploads/2019/02/Screen-Shot-2019-02-13-at-11.17.41-PM.png?resize=3354%2C1716" alt="Screen Shot 2019-02-13 at 11.17.41 PM" width="3354" height="1716" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-13-at-11.17.41-PM.png?w=3354&amp;ssl=1 3354w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-13-at-11.17.41-PM.png?resize=300%2C153&amp;ssl=1 300w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-13-at-11.17.41-PM.png?resize=1024%2C524&amp;ssl=1 1024w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-13-at-11.17.41-PM.png?resize=768%2C393&amp;ssl=1 768w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-13-at-11.17.41-PM.png?resize=1536%2C786&amp;ssl=1 1536w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-13-at-11.17.41-PM.png?resize=2048%2C1048&amp;ssl=1 2048w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-13-at-11.17.41-PM.png?w=3000&amp;ssl=1 3000w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /><figcaption id="caption-attachment-390" class="wp-caption-text">sample jss site running</figcaption></figure></p>
<p><figure id="attachment_391" aria-describedby="caption-attachment-391" style="width: 830px" class="wp-caption alignnone"><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-391" src="https://i0.wp.com/20.228.146.132/wp-content/uploads/2019/02/Screen-Shot-2019-02-13-at-11.18.09-PM.png?resize=830%2C672" alt="Screen Shot 2019-02-13 at 11.18.09 PM" width="830" height="672" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-13-at-11.18.09-PM.png?w=830&amp;ssl=1 830w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-13-at-11.18.09-PM.png?resize=300%2C243&amp;ssl=1 300w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2019/02/Screen-Shot-2019-02-13-at-11.18.09-PM.png?resize=768%2C622&amp;ssl=1 768w" sizes="auto, (max-width: 830px) 100vw, 830px" /><figcaption id="caption-attachment-391" class="wp-caption-text">default react template folder structure</figcaption></figure></p>
<p>For this blog post I will give a very brief introduction for the folders/files included in the default react template.</p>
<p><strong>data</strong> contains lots of yaml files which are used for two purposes, first to be used as a source of data when running in disconnected mode (no sitecore backend), second are used to build the items that get transferred to sitecore on deploy/importing jss apps (more on this in a later post)</p>
<p><strong>node_modules </strong> any javascript developers knows what&#8217;s this</p>
<p><strong>public</strong> holds all the public assets e.g. (fav.ico and index.html files)</p>
<p><strong>scripts</strong> since everything sitecore is super extensible, this folder has some helper scripts each having a separate role, (will describe each in a later post)</p>
<p><strong>server</strong> when deployed to sitecore, the application takes advantage of Server Side Rendering SSR, this folder has the entry point and configuration for server side rendering</p>
<p><strong>sitecore</strong> contains some secondary files that are not needed when working disconnected but are very important and define how things should work in sitecore when being deployed.</p>
<p><strong>src</strong> this should be the main entry point for all the client side application code that gets to be compiled for the end result.</p>
<p>That&#8217;s all of this short fast post.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://amrelsehemy.net/2019/02/14/getting-started-with-sitecore-jss/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">388</post-id>	</item>
		<item>
		<title>ASP.NET Core in Visual Studio for Mac</title>
		<link>https://amrelsehemy.net/2017/05/13/asp-net-core-in-visual-studio-for-mac/</link>
					<comments>https://amrelsehemy.net/2017/05/13/asp-net-core-in-visual-studio-for-mac/#respond</comments>
		
		<dc:creator><![CDATA[amr]]></dc:creator>
		<pubDate>Sat, 13 May 2017 00:11:52 +0000</pubDate>
				<category><![CDATA[Archive]]></category>
		<category><![CDATA[ASP.NET Core]]></category>
		<category><![CDATA[asp-net-core]]></category>
		<category><![CDATA[visual-studio-mac]]></category>
		<guid isPermaLink="false">http://amrelsehemy.net/?p=215</guid>

					<description><![CDATA[Exploring the default ASP.NET Core empty project on Visual Studio for Mac]]></description>
										<content:encoded><![CDATA[<p>So you all heard the news in #Build 2017, Visual Studio on Mac has been fully released and is General Available. To celebrate this release I will write few posts on building some different .net apps on my Mac.</p>
<p>As you already expect from the title, this article will be on ASP.NET Core I will make it short and simple.<span id="more-215"></span></p>
<p>The dummy app I will be building will be on Movies. Here is how it looks when you create a new project and pick ASP.NET Core Empty.</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-224" src="https://i0.wp.com/20.228.146.132/wp-content/uploads/2017/05/Screenshot-2017-05-13-00.53.28.png?resize=2880%2C1800" alt="Screenshot 2017-05-13 00.53.28.png" width="2880" height="1800" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-00.53.28.png?w=2880&amp;ssl=1 2880w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-00.53.28.png?resize=300%2C188&amp;ssl=1 300w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-00.53.28.png?resize=1024%2C640&amp;ssl=1 1024w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-00.53.28.png?resize=768%2C480&amp;ssl=1 768w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-00.53.28.png?resize=1536%2C960&amp;ssl=1 1536w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-00.53.28.png?resize=2048%2C1280&amp;ssl=1 2048w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></p>
<p>After choosing a name and creating the project, Visual Studio just gives you a plain web project with some nugets being restored, on the first run just as expected you get an old pretty Hello World in your default browser.</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-230" src="https://i0.wp.com/20.228.146.132/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.01.10.png?resize=2880%2C1800" alt="Screenshot 2017-05-13 01.01.10.png" width="2880" height="1800" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.01.10.png?w=2880&amp;ssl=1 2880w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.01.10.png?resize=300%2C188&amp;ssl=1 300w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.01.10.png?resize=1024%2C640&amp;ssl=1 1024w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.01.10.png?resize=768%2C480&amp;ssl=1 768w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.01.10.png?resize=1536%2C960&amp;ssl=1 1536w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.01.10.png?resize=2048%2C1280&amp;ssl=1 2048w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></p>
<p>Now let&#8217;s explore the template and understand what we get for free with this Empty template and start building up our application.</p>
<p>As shown in the previous image, we got two files generated for us Program.cs and Startup.cs and the Movies.csproj itself which contains relevant information to tell Visual Studio what to do with this applicaiton.</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-236" src="https://i0.wp.com/20.228.146.132/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.07.51.png?resize=1186%2C624" alt="Screenshot 2017-05-13 01.07.51.png" width="1186" height="624" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.07.51.png?w=1186&amp;ssl=1 1186w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.07.51.png?resize=300%2C158&amp;ssl=1 300w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.07.51.png?resize=1024%2C539&amp;ssl=1 1024w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.07.51.png?resize=768%2C404&amp;ssl=1 768w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></p>
<p>Now let&#8217;s examine the Program.cs file <img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-240" src="https://i0.wp.com/20.228.146.132/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.15.35.png?resize=1204%2C730" alt="Screenshot 2017-05-13 01.15.35.png" width="1204" height="730" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.15.35.png?w=1204&amp;ssl=1 1204w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.15.35.png?resize=300%2C182&amp;ssl=1 300w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.15.35.png?resize=1024%2C621&amp;ssl=1 1024w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.15.35.png?resize=768%2C466&amp;ssl=1 768w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></p>
<p>This file actually has a Main method, something we didn&#8217;t see for a while in Web projects, ASP.NET Core apps need a <em><strong>host</strong></em> to run. This host implements IWebHost interface, that exposes the features and services needed to start a host.</p>
<p>The lines above first create an instance of the WebHostBuilder, a class helper that builds and configures a host, first configuration stated is <strong>UseKestrel</strong> is actually telling the host to use <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel" target="_blank" rel="noopener noreferrer">Kestrel server</a>, the next configuration <strong>UseContentRoot</strong> is the telling the host where it should find content files to serve as you can see it takes the current directory as a parameter. <strong>UseIISIntegration</strong> on the other hand is added to support integration in IIS/IIS Express and is used to specify a reverse proxy to the internal server done by Kestrel. <strong>UseStartup</strong> tells the host how to configure middleware and services, and as you can see this is the link between the two files, it tells the host to use an instance of the Startup class in the other file. And Finally it builds this host and returns an instance configured for this role.</p>
<p>The next line <strong>host.Run()</strong> is the one that actually runs the web application and blocks the calling thread until host shutdown. There is also an alternative non-blocking method <strong>host.Start().</strong></p>
<p>The next file Startup.cs is the actual ASP.NET configuration that will be used, and we will revisit this file a lot in the subsequent posts and topics.<img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-258" src="https://i0.wp.com/20.228.146.132/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.37.20.png?resize=1894%2C1148" alt="Screenshot 2017-05-13 01.37.20" width="1894" height="1148" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.37.20.png?w=1894&amp;ssl=1 1894w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.37.20.png?resize=300%2C182&amp;ssl=1 300w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.37.20.png?resize=1024%2C621&amp;ssl=1 1024w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.37.20.png?resize=768%2C466&amp;ssl=1 768w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.37.20.png?resize=1536%2C931&amp;ssl=1 1536w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></p>
<p>There is not a lot to describe in this file, it is pretty simple (so far). Two methods are declared one of them for adding services. And the other for intial configuration.</p>
<p>As you can see dependency injection is built into .NET Core and natively supported, if you noticed the using statements, you will the Microsoft.Extensions.DependencyInjection to handle that. So all the parameters values will be located and binded in the runtime behind the scenes, all you have to do is ask for an object implementing an <strong>IApplicationBuilder</strong>, or<strong> IHostingEnvironment </strong>or even an<strong> ILoggerFactory</strong> and you will get a concrete implementation for you to use; there are a lot more like these to come when we explore more and get deeper into ASP.NET Core.</p>
<p>The first line in the method adds a Console logger, on Windows if you run using Kestrel, you would always get a Command window for you and you can see the log traces everytime you do something on the web page. Here on the Mac when using Visual Studio this Logger will be embeded inside the Application Output window.</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-271" src="https://i0.wp.com/20.228.146.132/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.47.43.png?resize=1130%2C420" alt="Screenshot 2017-05-13 01.47.43.png" width="1130" height="420" srcset="https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.47.43.png?w=1130&amp;ssl=1 1130w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.47.43.png?resize=300%2C112&amp;ssl=1 300w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.47.43.png?resize=1024%2C381&amp;ssl=1 1024w, https://i0.wp.com/amrelsehemy.net/wp-content/uploads/2017/05/Screenshot-2017-05-13-01.47.43.png?resize=768%2C285&amp;ssl=1 768w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></p>
<p>One intersting thing about ASP.NET Core, that it is really just a Core any service you need to be added or configured, you have to ask for it!! Even the old exception page (the yellow screen of death) which is now a cute light blue screen of death telling you what happend wrong, also not that we only tell the Application Builder to add this DeveloperExceptionPage only in Developement environment, this is a good practice because you don&#8217;t want to expose your internal code exceptions in production, you&#8217;d probably want to build a custom 500 Error page. Adding this developer exception page is actually adding a &#8220;Middleware&#8221; to the pipeline, a topic which we will talk about a lot soon.</p>
<p>And the last line is a terminating middleware to the pipeline command, that listens to the requests coming up to this server. It takes a delegate (handler) parameter and as you can see this is the place we are getting &#8220;Hello World&#8221; from, where we just write a plain text to the Repsonse of the current context.</p>
<p>That was all for this post, very basic no code was actually written, but I believe this post seves as an intrduction to ASP.NET Core and a beginner to the upcoming posts.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://amrelsehemy.net/2017/05/13/asp-net-core-in-visual-studio-for-mac/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">215</post-id>	</item>
	</channel>
</rss>
