<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Sebastian Goscinski</title>
    <description>The latest articles on Forem by Sebastian Goscinski (@sebiweise).</description>
    <link>https://forem.com/sebiweise</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1037802%2F9936f5ff-87c4-4a58-999b-95a4e7846120.jpeg</url>
      <title>Forem: Sebastian Goscinski</title>
      <link>https://forem.com/sebiweise</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sebiweise"/>
    <language>en</language>
    <item>
      <title>Getting Started with Auth0 and Next.js: A Step-by-Step Guide</title>
      <dc:creator>Sebastian Goscinski</dc:creator>
      <pubDate>Mon, 20 Nov 2023 07:42:12 +0000</pubDate>
      <link>https://forem.com/sebiweise/getting-started-with-auth0-and-nextjs-a-step-by-step-guide-2c4a</link>
      <guid>https://forem.com/sebiweise/getting-started-with-auth0-and-nextjs-a-step-by-step-guide-2c4a</guid>
      <description>&lt;p&gt;In today's digital era, securing your web applications is paramount. Authentication is a critical component of any app, and it's essential to manage it well. For developers using Next.js, integrating an authentication service can be a bit daunting. That's where Auth0 comes in a powerful authentication and authorization platform that simplifies this process. In this article, we'll walk you through the steps to get started with Auth0 and Next.js, securing your app effectively and efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is Auth0?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Auth0 is an authentication and authorization service that offers a lot of features out of the box, such as social login integrations, enterprise identity providers, passwordless login, and much more. It allows developers to implement complex authentication features with minimal effort.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is Next.js?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Next.js is a React framework that enables functionality such as server-side rendering and generating static websites for React-based web applications. It's a powerful tool for creating high-performance applications with an emphasis on a great developer experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Prerequisites&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Basic knowledge of JavaScript and React&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Node.js installed on your system&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A code editor (VSCode, Sublime Text, etc.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An Auth0 account (you can sign up for free at &lt;a href="https://auth0.com/"&gt;&lt;strong&gt;Auth0's website&lt;/strong&gt;&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 1: Set Up Your Auth0 Application&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;First, you need to set up an application in Auth0:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Log in to your Auth0 Dashboard.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on "Applications" in the sidebar and then "Create Application".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Give your application a name, choose "Single Page Web Applications", and click "Create".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the "Settings" tab, add &lt;a href="https://auth0.com/"&gt;&lt;code&gt;http://localhost:3000&lt;/code&gt;&lt;/a&gt; to the "Allowed Callback URLs", "Allowed Logout URLs", and "Allowed Web Origins".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scroll down and click "Save Changes".&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Make note of the &lt;code&gt;Domain&lt;/code&gt;, &lt;code&gt;Client ID&lt;/code&gt;, and &lt;code&gt;Client Secret&lt;/code&gt; from the settings page, as you will need these for your Next.js application.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 2: Bootstrap Your Next.js Application&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Create a new Next.js app by running the following command in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-next-app my-auth0-app
cd my-auth0-app

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create a new directory called &lt;code&gt;my-auth0-app&lt;/code&gt; with a starter Next.js application.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 3: Install Auth0 SDK for Next.js&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Auth0 provides an SDK that makes integration with Next.js a breeze. Install it using npm or yarn:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install @auth0/nextjs-auth0

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn add @auth0/nextjs-auth0

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Step 4: Set Up Environment Variables&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Create a &lt;code&gt;.env.local&lt;/code&gt; file in the root of your Next.js project and add the following environment variables with the values from your Auth0 application settings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AUTH0_SECRET='a_long_unique_value_like_a_guid'
AUTH0_BASE_URL='http://localhost:3000'
AUTH0_ISSUER_BASE_URL='https://YOUR_AUTH0_DOMAIN'
AUTH0_CLIENT_ID='YOUR_AUTH0_CLIENT_ID'
AUTH0_CLIENT_SECRET='YOUR_AUTH0_CLIENT_SECRET'

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;YOUR_AUTH0_DOMAIN&lt;/code&gt;, &lt;code&gt;YOUR_AUTH0_CLIENT_ID&lt;/code&gt;, and &lt;code&gt;YOUR_AUTH0_CLIENT_SECRET&lt;/code&gt; with the actual values from your Auth0 application.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 5: Configure Auth0 SDK&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Create a file called &lt;code&gt;auth0.js&lt;/code&gt; inside a new folder &lt;code&gt;utils&lt;/code&gt; in your project and initialize the Auth0 SDK like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { initAuth0 } from '@auth0/nextjs-auth0';

export default initAuth0({
  secret: process.env.AUTH0_SECRET,
  issuerBaseURL: process.env.AUTH0_ISSUER_BASE_URL,
  baseURL: process.env.AUTH0_BASE_URL,
  clientID: process.env.AUTH0_CLIENT_ID,
  clientSecret: process.env.AUTH0_CLIENT_SECRET,
  routes: {
    callback: '/api/auth/callback',
    postLogoutRedirect: '/'
  },
  session: {
    // The secret used to encrypt the cookie
    cookieSecret: process.env.AUTH0_SECRET,
    cookieLifetime: 60 * 60 * 8,
    storeIdToken: false,
    storeAccessToken: false,
    storeRefreshToken: false
  }
});

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configures the SDK with your Auth0 application settings.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 6: Create API Routes for Authentication&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In Next.js, API routes provide a solution to build your API with JavaScript and Node.js. Create the following two files in the &lt;code&gt;pages/api/auth&lt;/code&gt; directory:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;[...auth0].js&lt;/code&gt;: This will handle login, logout, and callback.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import auth0 from '../../../utils/auth0';

export default async function auth(req, res) {
  try {
    await auth0.handleAuth(req, res);
  } catch (error) {
    console.error(error);
    res.status(error.status || 500).end(error.message);
  }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;me.js&lt;/code&gt;: This will show the user profile information.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import auth0 from '../../../utils/auth0';

export default async function me(req, res) {
  try {
    await auth0.handleProfile(req, res);
  } catch (error) {
    console.error(error);
    res.status(error.status || 500).end(error.message);
  }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Step 7: Add Authentication to Your Pages&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Now, you can use the Auth0 SDK in your React components to add authentication. Here's an example of how to implement a login button:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react';
import { useUser } from '@auth0/nextjs-auth0';

export default function Home() {
  const { user, error, isLoading } = useUser();

  return (
    &amp;lt;div&amp;gt;
      {isLoading &amp;amp;&amp;amp; &amp;lt;p&amp;gt;Loading...&amp;lt;/p&amp;gt;}
      {error &amp;amp;&amp;amp; &amp;lt;p&amp;gt;{error.message}&amp;lt;/p&amp;gt;}
      {user ? (
        &amp;lt;div&amp;gt;
          &amp;lt;h1&amp;gt;Welcome, {user.name}!&amp;lt;/h1&amp;gt;
          &amp;lt;p&amp;gt;&amp;lt;img src={user.picture} alt={user.name} /&amp;gt;&amp;lt;/p&amp;gt;
          &amp;lt;p&amp;gt;&amp;lt;a href="/api/auth/logout"&amp;gt;Logout&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
      ) : (
        &amp;lt;p&amp;gt;&amp;lt;a href="/api/auth/login"&amp;gt;Login&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
      )}
    &amp;lt;/div&amp;gt;
  );
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code checks if the user is authenticated and displays their name and a logout button. If the user is not authenticated, it shows a login button.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 8: Protecting Routes&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To protect a route and make it accessible only to authenticated users, you can use the &lt;code&gt;withPageAuthRequired&lt;/code&gt; higher-order component from the SDK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { withPageAuthRequired } from '@auth0/nextjs-auth0';

export const getServerSideProps = withPageAuthRequired();

export default function ProtectedPage() {
  return &amp;lt;div&amp;gt;This is a protected page&amp;lt;/div&amp;gt;;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Step 9: Deploying Your App&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;When you're ready to go live, don't forget to add the actual deployment URL to the "Allowed Callback URLs", "Allowed Logout URLs", and "Allowed Web Origins" in your Auth0 application settings.&lt;/p&gt;

&lt;p&gt;Deploy your Next.js app to Vercel, Netlify, or any other hosting provider that supports Node.js.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Congratulations! You've successfully integrated Auth0 with Next.js, providing robust authentication for your application. Auth0's platform makes managing users and their authentication states a breeze, allowing you to focus on developing the core features of your app.&lt;/p&gt;

&lt;p&gt;Remember to secure your user data, use environment variables to protect your secrets, and always keep your dependencies up to date. Security is an ever-evolving field, and staying informed is key.&lt;/p&gt;

&lt;p&gt;For more advanced topics, such as role-based access control and multi-factor authentication with Auth0 and Next.js, stay tuned to &lt;a href="https://auth0.com/"&gt;sebiweise.dev&lt;/a&gt;. Happy coding!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Getting Started with Clerk and Next.js: A Secure and Scalable Authentication Solution</title>
      <dc:creator>Sebastian Goscinski</dc:creator>
      <pubDate>Mon, 20 Nov 2023 07:42:11 +0000</pubDate>
      <link>https://forem.com/sebiweise/getting-started-with-clerk-and-nextjs-a-secure-and-scalable-authentication-solution-1ji4</link>
      <guid>https://forem.com/sebiweise/getting-started-with-clerk-and-nextjs-a-secure-and-scalable-authentication-solution-1ji4</guid>
      <description>&lt;p&gt;In the realm of modern web application development, authentication is a critical component that ensures only authorized users can access certain functionalities. &lt;a href="http://Clerk.dev"&gt;Clerk.dev&lt;/a&gt; is an authentication and user management system that simplifies the incorporation of secure sign-in and user management features into your applications. When combined with Next.js, Clerk provides developers with a scalable and secure authentication solution that can be easily integrated into your web app.&lt;/p&gt;

&lt;p&gt;In this advanced tutorial, we'll walk through setting up Clerk with a Next.js application, demonstrating how to implement a robust authentication flow.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Prerequisites&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Before diving into the integration process, ensure you have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Basic knowledge of React and Next.js.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Node.js and npm/yarn installed on your machine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A &lt;a href="http://Clerk.dev"&gt;Clerk.dev&lt;/a&gt; account (you can sign up for free to get started).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 1: Setting Up Next.js&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;First, let's create a new Next.js application if you haven't already done so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-next-app my-nextjs-app
cd my-nextjs-app

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Step 2: Installing Clerk&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Once your Next.js app is ready, install the Clerk Next.js SDK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install @clerk/nextjs

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Step 3: Configuring Clerk in Your Application&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;After installing the Clerk SDK, you need to configure Clerk to work with your Next.js app. Start by setting up your Clerk Frontend API and creating a &lt;code&gt;.env.local&lt;/code&gt; file in the root of your Next.js project with the following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NEXT_PUBLIC_CLERK_FRONTEND_API=your-clerk-frontend-api.clerk.app

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;a href="http://your-clerk-frontend-api.clerk.app"&gt;&lt;code&gt;your-clerk-frontend-api.clerk.app&lt;/code&gt;&lt;/a&gt; with the actual Frontend API value from your Clerk dashboard.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 4: Setting Up the ClerkProvider&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Wrap your application in the &lt;code&gt;ClerkProvider&lt;/code&gt; to manage the authentication state globally. Modify your &lt;code&gt;_app.js&lt;/code&gt; file to include the provider like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { ClerkProvider } from '@clerk/nextjs';
import { useRouter } from 'next/router';

function MyApp({ Component, pageProps }) {
  const { pathname } = useRouter();
  const isSignInOrSignUpPage = pathname.startsWith('/sign-in') || pathname.startsWith('/sign-up');

  return (
    &amp;lt;ClerkProvider {...pageProps}&amp;gt;
      {isSignInOrSignUpPage ? (
        &amp;lt;Component {...pageProps} /&amp;gt;
      ) : (
        &amp;lt;ProtectedRoute&amp;gt;
          &amp;lt;Component {...pageProps} /&amp;gt;
        &amp;lt;/ProtectedRoute&amp;gt;
      )}
    &amp;lt;/ClerkProvider&amp;gt;
  );
}

function ProtectedRoute({ children }) {
  const { isLoaded, isSignedIn } = useClerk();
  if (!isLoaded) return 'Loading...';
  if (!isSignedIn) {
    useRouter().push('/sign-in');
    return 'Redirecting to sign-in...';
  }
  return children;
}

export default MyApp;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This snippet ensures that Clerk is initialized and wraps your pages with a protected route component.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 5: Adding Sign-In and Sign-Up Pages&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Create sign-in and sign-up pages to handle user authentication. Clerk provides components to easily add these features:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// pages/sign-in.js
import { SignIn } from '@clerk/nextjs';

const SignInPage = () =&amp;gt; &amp;lt;SignIn path="/sign-in" routing="path" /&amp;gt;;
export default SignInPage;

// pages/sign-up.js
import { SignUp } from '@clerk/nextjs';

const SignUpPage = () =&amp;gt; &amp;lt;SignUp path="/sign-up" routing="path" /&amp;gt;;
export default SignUpPage;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Step 6: Using the useUser Hook&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Clerk's &lt;code&gt;useUser&lt;/code&gt; hook allows you to access the authenticated user's data. Here's an example of how to use it inside a component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useUser } from '@clerk/nextjs';

const UserProfile = () =&amp;gt; {
  const { user } = useUser();

  if (!user) {
    return &amp;lt;div&amp;gt;Loading...&amp;lt;/div&amp;gt;;
  }

  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;Welcome, {user.firstName}!&amp;lt;/h1&amp;gt;
      &amp;lt;p&amp;gt;Email: {user.emailAddresses[0].emailAddress}&amp;lt;/p&amp;gt;
    &amp;lt;/div&amp;gt;
  );
};

export default UserProfile;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Step 7: Running and Testing Your Application&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Now, run your Next.js application and navigate to the sign-in and sign-up pages to test the authentication flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run dev

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Visit &lt;a href="http://localhost:3000/sign-in"&gt;&lt;code&gt;http://localhost:3000/sign-in&lt;/code&gt;&lt;/a&gt; and &lt;a href="http://localhost:3000/sign-up"&gt;&lt;code&gt;http://localhost:3000/sign-up&lt;/code&gt;&lt;/a&gt; to see Clerk's authentication components in action.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;You've successfully integrated Clerk with your Next.js application, providing a scalable and secure authentication system. Clerk's simplicity and integration with Next.js allow you to focus more on building features rather than worrying about the complexities of managing user authentication.&lt;/p&gt;

&lt;p&gt;By following this guide, you have laid the groundwork for adding more advanced user management and security features to your application with Clerk. Continue to explore Clerk's documentation and Next.js to enhance your app's capabilities and provide an even richer user experience.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Planetscale: Overview and Benefits</title>
      <dc:creator>Sebastian Goscinski</dc:creator>
      <pubDate>Sun, 19 Nov 2023 21:40:13 +0000</pubDate>
      <link>https://forem.com/sebiweise/planetscale-overview-and-benefits-5797</link>
      <guid>https://forem.com/sebiweise/planetscale-overview-and-benefits-5797</guid>
      <description>&lt;p&gt;As web applications grow in complexity, the need for scalable and manageable databases becomes more pronounced. PlanetScale is a database platform that promises to address these needs, offering a MySQL-compatible, serverless database service built on the scalable foundation of Vitess.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is PlanetScale?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;PlanetScale is a fully managed database service designed to handle the demands of modern applications. It provides a serverless experience with the reliability of MySQL and the scalability of Vitess, a database clustering system for horizontal scaling of MySQL.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Key Benefits of PlanetScale&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scalability:&lt;/strong&gt; With its serverless architecture, PlanetScale can scale up or down automatically to match your application's needs without downtime.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Branching:&lt;/strong&gt; Unique to PlanetScale, branching allows developers to create database branches for features, testing, and staging environments, similar to Git branches for code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;No Lock-in:&lt;/strong&gt; Built on open-source technology, PlanetScale allows you to migrate your data in and out without being locked into a proprietary ecosystem.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Performance:&lt;/strong&gt; PlanetScale is designed to provide consistent performance, even with large, complex queries and high volumes of data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&gt; The platform offers end-to-end encryption and automatic backups, ensuring your data is secure and recoverable.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Ideal Use Cases&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;PlanetScale is well-suited for applications that require a robust, scalable database without the overhead of managing clustering and sharding. It's also an excellent choice for teams that want to adopt DevOps practices for database management.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;For developers and organizations that require a scalable, MySQL-compatible database with the benefits of modern DevOps practices, PlanetScale presents a powerful solution. Its serverless approach and unique branching feature make it an innovative player in the realm of cloud databases.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Implementing Fine-Grained Network Segmentation with Tailscale ACLs</title>
      <dc:creator>Sebastian Goscinski</dc:creator>
      <pubDate>Sun, 19 Nov 2023 21:36:59 +0000</pubDate>
      <link>https://forem.com/sebiweise/implementing-fine-grained-network-segmentation-with-tailscale-acls-3k0c</link>
      <guid>https://forem.com/sebiweise/implementing-fine-grained-network-segmentation-with-tailscale-acls-3k0c</guid>
      <description>&lt;p&gt;In recent posts, weve explored the fundamentals of Tailscale and how it can be integrated with pfSense, as well as an introduction to basic access control configurations. Building on that knowledge, its time to dive deeper into creating fine-grained network segmentation using Tailscales Access Control Lists (ACLs) for ultimate control over network traffic and user permissions.&lt;/p&gt;

&lt;p&gt;Proper segmentation is key in a well-architected network for both security and efficiency. In this article, we'll explore multiple scenarios showing how Tailscale ACLs can be used to carve out precise access for various user roles and resources within your network.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Scenario 1: Hosting Multiple Services on a Single Device&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The Challenge&lt;/strong&gt; : You have a server hosting multiple services, such as a web server on port 80 and an SSH service on port 22, and you want to grant access to these services to different user groups.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The ACL Strategy&lt;/strong&gt; :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Assign tags to the servers services, separating the web service from SSH.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Define user groups for web developers and system administrators.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create ACL rules to segment access.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example Configuration&lt;/strong&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "Groups": {
    "group:web-devs": ["dev1@example.com", "dev2@example.com"],
    "group:sysadmins": ["admin@example.com"]
  },
  "Tags": {
    "tag:web": ["100.101.102.1"],
    "tag:ssh": ["100.101.102.1"]
  },
  "ACLs": [
    {
      "Action": "accept",
      "Users": ["group:web-devs"],
      "Ports": ["tag:web:80"]
    },
    {
      "Action": "accept",
      "Users": ["group:sysadmins"],
      "Ports": ["tag:ssh:22"]
    }
  ]
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, only web developers have access to the web server, while only system administrators can SSH into the machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Scenario 2: Granular Access within the Companys Departments&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The Challenge&lt;/strong&gt; : The company has multiple departments, such as HR, Engineering, and Sales, requiring access to specific resources without exposing them to the entire network.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The ACL Strategy&lt;/strong&gt; :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Create tags for resources belonging to each department.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Define user groups per department.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Write ACL rules to establish access boundaries.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example Configuration&lt;/strong&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "Groups": {
    "group:hr": ["hr@example.com"],
    "group:engineering": ["eng@example.com"],
    "group:sales": ["sales@example.com"]
  },
  "Tags": {
    "tag:hr-resources": ["100.201.202.1"],
    "tag:engineering-resources": ["100.201.202.2"],
    "tag:sales-resources": ["100.201.202.3"]
  },
  "ACLs": [
    {
      "Action": "accept",
      "Users": ["group:hr"],
      "Ports": ["tag:hr-resources:*"]
    },
    {
      "Action": "accept",
      "Users": ["group:engineering"],
      "Ports": ["tag:engineering-resources:*"]
    },
    {

      "Action": "accept",
      "Users": ["group:sales"],
      "Ports": ["tag:sales-resources:*"]
    }
  ]
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configuration ensures that each department only accesses its designated resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Scenario 3: Time-Limited Access for Temporary Project Teams&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The Challenge&lt;/strong&gt; : You have teams working on short-term projects needing temporary access to certain parts of the network.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The ACL Strategy&lt;/strong&gt; :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Use Tailscales ephemeral key feature to create time-limited access for devices.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Assign temporary tags correlating with project resources.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Define ACL rules that expire along with the ephemeral keys.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example Configuration&lt;/strong&gt; :&lt;/p&gt;

&lt;p&gt;Create ephemeral keys manually in the Tailscale admin panel and apply the following ACLs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "Groups": {
    "group:project-alice": ["temporary-key-alice@example.com"],
    "group:project-bob": ["temporary-key-bob@example.com"]
  },
  "Tags": {
    "tag:project-resources": ["100.301.302.2"]
  },
  "ACLs": [
    {
      "Action": "accept",
      "Users": ["group:project-alice"],
      "Ports": ["tag:project-resources:8080"]
    },
    {
      "Action": "accept",
      "Users": ["group:project-bob"],
      "Ports": ["tag:project-resources:8080"]
    }
  ]
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The ephemeral keys expire based on the configuration you set, which automatically revokes the associated devices network access.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Scenario 4: Enforcing Different Access Levels for the Same User&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The Challenge&lt;/strong&gt; : A user needs different levels of access depending on whether they're on a corporate or personal device.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The ACL Strategy&lt;/strong&gt; :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Tag devices accordingly as corporate or personal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Define ACL rules to grant broad access from corporate devices and more limited access from personal devices.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example Configuration&lt;/strong&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "Groups": {
    "group:user-jane": ["jane@example.com"]
  },
  "Tags": {
    "tag:jane-personal": ["jane-personal-device"],
    "tag:jane-corporate": ["jane-corporate-device"]
  },
  "ACLs": [
    {
      "Action": "accept",
      "Users": ["group:user-jane"],
      "Ports": ["tag:jane-corporate:*"]
    },
    {
      "Action": "accept",
      "Users": ["group:user-jane"],
      "Ports": ["tag:jane-personal:443"]
    }
  ]
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this setup, Jane has unrestricted access from her corporate device, while her personal device is limited to HTTPS traffic.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Tailscales ACL system offers unrivaled flexibility for network segmentation and access control, proving indispensable in a modern, dynamic network environment. When deploying your ACL configurations, always validate and test each rule to ensure they align with your intended security policies and access requirements.&lt;/p&gt;

&lt;p&gt;Effective use of ACLs enhances both security and productivity, and with Tailscale, setups that were once complex and cumbersome are accessible and manageable. By engaging with scenarios like these, you can adapt solutions to fit your unique network topology and organizational needs.&lt;/p&gt;

&lt;p&gt;For more advanced tips and strategies on managing a secure and efficient network, keep connected with &lt;a href="https://sebiweise.dev/"&gt;&lt;strong&gt;sebiweise.dev&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Advanced Access Control Configuration with Tailscale: Practical Examples</title>
      <dc:creator>Sebastian Goscinski</dc:creator>
      <pubDate>Fri, 17 Nov 2023 14:00:13 +0000</pubDate>
      <link>https://forem.com/sebiweise/advanced-access-control-configuration-with-tailscale-practical-examples-2aip</link>
      <guid>https://forem.com/sebiweise/advanced-access-control-configuration-with-tailscale-practical-examples-2aip</guid>
      <description>&lt;p&gt;Tailscale's Access Control Lists (ACLs) are a powerful feature for securing your network. They allow fine-grained control over which users and devices can access specific resources. To give you a better understanding of how to implement advanced access controls, let's walk through some practical examples.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario 1: Role-Based Access to Servers
&lt;/h2&gt;

&lt;p&gt;Imagine you have two groups of machines in your network: development servers and production servers. You want your developers to access the development servers but not the production ones.&lt;/p&gt;

&lt;h3&gt;
  
  
  Defining Groups and Tags
&lt;/h3&gt;

&lt;p&gt;First, you'll need to create groups for your users and tags for your devices.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Groups": {
  "group:developers": ["alice@example.com", "bob@example.com"],
  "group:admins": ["admin@example.com"]
},
"Tags": {
  "tag:dev-server": ["100.100.100.1", "100.100.100.2"],
  "tag:prod-server": ["100.100.200.1", "100.100.200.2"]
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ACL Rules
&lt;/h3&gt;

&lt;p&gt;Next, define ACL rules to grant access to the developers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"ACLs": [
  {
    "Action": "accept",
    "Users": ["group:developers"],
    "Ports": ["tag:dev-server:*"]
  },
  {
    "Action": "accept",
    "Users": ["group:admins"],
    "Ports": ["*:*"]
  }
],

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, developers can access any port on the development servers, while admins have unrestricted access.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario 2: Restricting Access to Sensitive Services
&lt;/h2&gt;

&lt;p&gt;Now, let's say you have a financial service running on port 8443 that should only be accessible to the finance team.&lt;/p&gt;

&lt;h3&gt;
  
  
  Defining Groups
&lt;/h3&gt;

&lt;p&gt;Add your finance team members to a group.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Groups": {
  "group:finance": ["carol@example.com", "dave@example.com"]
},

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ACL Rules
&lt;/h3&gt;

&lt;p&gt;Create a rule that specifies access to the financial service.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"ACLs": [
  {
    "Action": "accept",
    "Users": ["group:finance"],
    "Ports": ["100.100.300.1:8443"]
  }
],

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only members of the finance group can access the service on the specified port.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario 3: Enforcing Protocol-Specific Restrictions
&lt;/h2&gt;

&lt;p&gt;Suppose you want to allow SSH access to all servers for the IT support team, but you want to restrict SSH access from outside the office for everyone else.&lt;/p&gt;

&lt;h3&gt;
  
  
  Defining Groups and Tags
&lt;/h3&gt;

&lt;p&gt;Create a group for the IT support team and a tag for office-based devices.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Groups": {
  "group:it-support": ["eve@example.com", "frank@example.com"]
},
"Tags": {
  "tag:office": ["100.100.400.1", "100.100.400.2"]
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ACL Rules
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"ACLs": [
  {
    "Action": "accept",
    "Users": ["group:it-support"],
    "Ports": ["*:22"]
  },
  {
    "Action": "accept",
    "Users": ["group:all-users"],
    "Ports": ["tag:office:22"]
  }
],

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this scenario, the IT support team can SSH into any server regardless of location, while other users can only SSH from devices tagged as being in the office.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario 4: Dynamic Access Based on Device Tags
&lt;/h2&gt;

&lt;p&gt;Imagine you want to give contractors access to specific devices without exposing your entire network.&lt;/p&gt;

&lt;h3&gt;
  
  
  Defining Groups and Tags
&lt;/h3&gt;

&lt;p&gt;Create a group for contractors and tags for the devices they should access.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Groups": {
  "group:contractors": ["gary@example.com", "helen@example.com"]
},
"Tags": {
  "tag:contractor-device": ["100.100.500.1", "100.100.500.2"]
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ACL Rules
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"ACLs": [
  {
    "Action": "accept",
    "Users": ["group:contractors"],
    "Ports": ["tag:contractor-device:*"]
  }
],

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This rule allows contractors to connect to the devices with the &lt;code&gt;contractor-device&lt;/code&gt; tag on any port.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;These examples provide a glimpse into the versatility and strength of Tailscale's ACLs. When configuring ACLs, always start with the principle of least privilege, giving users only the access they need to perform their roles. Regularly review and update your ACLs as your network evolves.&lt;/p&gt;

&lt;p&gt;Remember, these are JSON configurations, so ensure that your syntax is correct to avoid errors. Use Tailscale's admin console to apply these ACLs, and always test your configurations to confirm that they work as intended.&lt;/p&gt;

&lt;p&gt;Tailoring access controls is a dynamic process that requires ongoing attention. By continuing to refine your Tailscale ACLs, you'll maintain a secure, efficient, and well-organized network.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Mastering Advanced Access Controls with Tailscale on Your Network</title>
      <dc:creator>Sebastian Goscinski</dc:creator>
      <pubDate>Fri, 17 Nov 2023 11:00:12 +0000</pubDate>
      <link>https://forem.com/sebiweise/mastering-advanced-access-controls-with-tailscale-on-your-network-36eo</link>
      <guid>https://forem.com/sebiweise/mastering-advanced-access-controls-with-tailscale-on-your-network-36eo</guid>
      <description>&lt;p&gt;In our previous discussions, we've delved into the basics of setting up Tailscale and integrating it with pfSense to create a secure, private network. However, the true power of Tailscale shines when you leverage its advanced Access Control Lists (ACLs) to fine-tune user permissions and network access. This time, let's dive deeper into configuring advanced access controls to ensure that your network is not only secure but also precisely tailored to the needs of your users and services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Tailscale ACLs
&lt;/h2&gt;

&lt;p&gt;Tailscale ACLs are JSON-formatted rules that dictate who can access what within your Tailscale network. These rules can be as broad or as granular as needed, controlling access based on user groups, device tags, and even specific ports and protocols.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Components of Tailscale ACLs:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Groups&lt;/strong&gt; : Define collections of users or devices for easier management.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tags&lt;/strong&gt; : Assign labels to devices to apply specific policies.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ACL Rules&lt;/strong&gt; : Specify which groups or tags can access certain resources, such as IP addresses, ports, and protocols.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Default Policies&lt;/strong&gt; : Set baseline permissions that apply when no other rules match.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1: Planning Your Access Structure
&lt;/h2&gt;

&lt;p&gt;Before diving into the Tailscale admin console, it's crucial to plan your access structure. Consider the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Which users need access to which resources?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Are there any services that should only be accessible by specific devices or user roles?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do you need to restrict certain types of traffic, such as SSH or RDP?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 2: Defining Groups and Tags
&lt;/h2&gt;

&lt;p&gt;Groups and tags are the building blocks of your ACLs. They help you organize your network entities for more straightforward rule application.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Identify the users and devices that require similar access levels and group them accordingly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create tags to represent roles, locations, or device types within your network.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 3: Writing ACL Rules
&lt;/h2&gt;

&lt;p&gt;With your groups and tags defined, you can start writing the ACL rules.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Log into the Tailscale admin console and navigate to the &lt;strong&gt;Access Controls&lt;/strong&gt; section.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Edit your ACLs by updating the JSON configuration. Here's an example of a rule that allows the &lt;code&gt;engineering&lt;/code&gt; group to access the SSH port on devices tagged as &lt;code&gt;dev-servers&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "ACLs": [
    {
      "Action": "accept",
      "Users": ["group:engineering"],
      "Ports": ["tag:dev-servers:22"]
    }
  ]
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Specify as many rules as needed to cover all the necessary access patterns within your network.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 4: Implementing Default Policies
&lt;/h2&gt;

&lt;p&gt;Default policies serve as the catch-all rules that apply when no other ACL rules match.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Decide on the least-privileged access level appropriate for your network.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Configure default policies to deny access by default, only allowing specific traffic as defined in your ACL rules.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 5: Testing and Verifying Access
&lt;/h2&gt;

&lt;p&gt;After configuring your ACLs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Apply the changes in the Tailscale admin console.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test the access controls by attempting to reach the resources defined in your ACL rules from various user accounts and devices.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Verify that the access patterns match your intentions and that there are no unintended permissions.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 6: Regularly Review and Update ACLs
&lt;/h2&gt;

&lt;p&gt;Maintaining secure access controls requires ongoing attention:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Review your ACLs periodically to ensure they remain relevant to your changing network needs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Update your ACLs as you onboard new services, users, or devices to the network.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Audit access logs to detect any unusual activity or access patterns that need addressing.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Advanced access controls are a cornerstone of network security, and Tailscale's ACLs offer a powerful mechanism to enforce precise access permissions within your network. By carefully planning your access structure and implementing granular ACL rules, you can create a secure environment that caters to the specific needs of your users and services.&lt;/p&gt;

&lt;p&gt;Remember, the strength of your network security lies not only in the tools you use but also in the policies you enforce. With Tailscale's advanced access controls, you have the power to create a robust, flexible, and secure network that supports the dynamic demands of your users.&lt;/p&gt;

&lt;p&gt;Keep experimenting, refining, and learning. Your network is a living entity, and with Tailscale's advanced access controls, you're well-equipped to keep it secure and efficient. For more tips, insights, and guides on network security and management, keep visiting &lt;a href="http://sebiweise.dev"&gt;sebiweise.dev&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Elevating Network Security: Integrating Tailscale with pfSense</title>
      <dc:creator>Sebastian Goscinski</dc:creator>
      <pubDate>Thu, 16 Nov 2023 11:00:12 +0000</pubDate>
      <link>https://forem.com/sebiweise/elevating-network-security-integrating-tailscale-with-pfsense-4f60</link>
      <guid>https://forem.com/sebiweise/elevating-network-security-integrating-tailscale-with-pfsense-4f60</guid>
      <description>&lt;p&gt;As the demand for secure remote access solutions grows, integrating Tailscale with pfSense offers a powerful combination for enhancing network security and connectivity. pfSense, an open-source firewall and router platform, is renowned for its reliability and comprehensive feature set. The recent introduction of the integrated Tailscale package allows pfSense users to leverage the simplicity and security of Tailscale's mesh VPN directly within their existing network infrastructure.&lt;/p&gt;

&lt;p&gt;In this advanced tutorial, we'll delve into setting up Tailscale on a pfSense router, creating a seamless bridge between the robust firewall capabilities of pfSense and the user-friendly, encrypted connectivity of Tailscale.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before proceeding, ensure you have the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A pfSense router with the latest stable version installed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Administrative access to the pfSense web interface.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A Tailscale account, which you can create at &lt;a href="https://tailscale.com"&gt;Tailscale's website&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1: Installing the Tailscale Package on pfSense
&lt;/h2&gt;

&lt;p&gt;Tailscale can be easily added to pfSense through its package system.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Log in to the pfSense web interface.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Navigate to &lt;strong&gt;System&lt;/strong&gt; &amp;gt; &lt;strong&gt;Package Manager&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Switch to the &lt;strong&gt;Available Packages&lt;/strong&gt; tab and search for "Tailscale."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Find the Tailscale package in the list and click on the &lt;strong&gt;Install&lt;/strong&gt; button.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Confirm the installation and wait for the process to complete.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 2: Configuring Tailscale on pfSense
&lt;/h2&gt;

&lt;p&gt;Once installed, Tailscale needs to be configured to communicate with your network.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;In the pfSense web interface, go to &lt;strong&gt;Services&lt;/strong&gt; &amp;gt; &lt;strong&gt;Tailscale&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You will be prompted to link your Tailscale account. Click on the provided link to authenticate through the Tailscale website.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After authentication, youll receive an auth key. Copy this key.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Return to the pfSense Tailscale settings page and paste the auth key into the appropriate field.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click &lt;strong&gt;Save&lt;/strong&gt; to apply the changes.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 3: Setting Up Devices
&lt;/h2&gt;

&lt;p&gt;With Tailscale active on your pfSense router, you can now set up devices to connect through the VPN.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install the Tailscale client on the devices you wish to connect.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Log in with your Tailscale account on each device and connect them to your Tailscale network.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 4: Managing Network Routes
&lt;/h2&gt;

&lt;p&gt;Tailscale on pfSense allows you to manage network routes directly within the Tailscale interface.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Access the Tailscale admin console through your Tailscale account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Navigate to the &lt;strong&gt;Machines&lt;/strong&gt; tab to see your pfSense router listed among other devices.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can configure the router to advertise specific routes to the Tailscale network, allowing devices connected to Tailscale to access various subnets behind the pfSense router.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 5: Configuring Access Controls
&lt;/h2&gt;

&lt;p&gt;Tailscale Access Controls (ACLs) can be used to manage permissions within your network.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;In the Tailscale admin console, go to the &lt;strong&gt;Access Controls&lt;/strong&gt; section.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Here you can create and manage user groups, assign roles, and set up ACLs to control access to network resources.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use the ACL tags feature to apply policies to devices, including your pfSense router.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 6: Securing Your Setup
&lt;/h2&gt;

&lt;p&gt;It's crucial to ensure your Tailscale and pfSense configurations adhere to best security practices.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Regularly update the Tailscale package on pfSense.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Keep your pfSense firmware up to date for the latest security patches.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Periodically review your Tailscale ACLs and remove any unnecessary permissions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use pfSense's firewall rules to further secure traffic entering and leaving the Tailscale network.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Integrating Tailscale with pfSense combines the ease and versatility of a mesh VPN with the robust security features of a leading firewall platform. By following the steps outlined in this guide, you can significantly enhance your network's security and flexibility, making remote access a breeze while maintaining strict control over your network traffic.&lt;/p&gt;

&lt;p&gt;As you continue to explore the capabilities of Tailscale within your pfSense environment, you'll uncover new ways to streamline connectivity and protect your digital assets. The integration of these two powerful tools is just the beginning of a journey towards a more secure and interconnected network infrastructure.&lt;/p&gt;

&lt;p&gt;Stay tuned to &lt;a href="http://sebiweise.dev"&gt;sebiweise.dev&lt;/a&gt; for more insights and tutorials on leveraging cutting-edge networking technologies to their full potential.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Can We Build Applications Without Backend with Next.js 14?</title>
      <dc:creator>Sebastian Goscinski</dc:creator>
      <pubDate>Wed, 15 Nov 2023 12:13:41 +0000</pubDate>
      <link>https://forem.com/sebiweise/can-we-build-applications-without-backend-with-nextjs-14-23k2</link>
      <guid>https://forem.com/sebiweise/can-we-build-applications-without-backend-with-nextjs-14-23k2</guid>
      <description>&lt;p&gt;In the ever-evolving landscape of web development, the traditional division between frontend and backend has been blurred by the advent of frameworks like Next.js. With the release of Next.js 14, this question has become even more pertinent: do we really need a separate backend to build robust applications?&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Rise of Fullstack Frameworks&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Next.js, initially a framework for server-rendered React applications, has matured into a fullstack solution that can handle a wide range of use cases. Fullstack frameworks like Next.js allow developers to create applications that are dynamic and interactive without necessarily having to manage a separate backend service.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Next.js 14: Whats New?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Next.js 14 introduces new features that further empower developers to build applications with minimal backend dependency. Some noteworthy highlights include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Edge API Routes:&lt;/strong&gt; Run your code directly on the edge, closer to your users, for faster API response times and dynamic content generation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Middleware Enhancements:&lt;/strong&gt; Improved middleware capabilities allow for more complex request processing before reaching your pages or API routes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Streaming Improvements:&lt;/strong&gt; Enhanced support for React Server Components and streaming responses to improve user experience and reduce load times.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Backend-Less Approach&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;With features like Edge API Routes, Next.js can now handle backend-like tasks, including authentication, data fetching, and content generation, directly on edge servers. This reduces the need for a traditional backend in some scenarios, as Next.js can communicate with databases or external APIs, process data, and serve it to the clientall without a separate backend layer.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Considerations and Limitations&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;While Next.js enables a backend-less approach for certain types of applications, its not a one-size-fits-all solution. Complex applications with heavy data processing, custom business logic, or specific compliance requirements may still benefit from a dedicated backend service.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Next.js 14 unquestionably empowers developers to build applications with fewer backend dependencies, but whether you can go entirely backend-less depends on your applications needs. As we continue to see improvements in serverless and edge capabilities, the line between frontend and backend will likely become even more indistinct.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Getting Started with Tailscale: Your Guide to a Secure, Private Network</title>
      <dc:creator>Sebastian Goscinski</dc:creator>
      <pubDate>Wed, 15 Nov 2023 10:44:19 +0000</pubDate>
      <link>https://forem.com/sebiweise/getting-started-with-tailscale-your-guide-to-a-secure-private-network-1n51</link>
      <guid>https://forem.com/sebiweise/getting-started-with-tailscale-your-guide-to-a-secure-private-network-1n51</guid>
      <description>&lt;p&gt;In the world of networking, security and simplicity rarely go hand in hand. However, an emerging service called Tailscale is changing the game by offering a secure, peer-to-peer, private network solution that's not just robust but also incredibly user-friendly. Whether you're a developer, a small business owner, or someone who values privacy, Tailscale can be the perfect fit for your networking needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Tailscale?
&lt;/h2&gt;

&lt;p&gt;Tailscale is a zero-config VPN that creates a secure network between your devices using the WireGuard protocol. It allows you to connect various devices as if they were on the same local network, no matter where they are in the world. Tailscale is built on top of a sophisticated mesh network to ensure that your data takes the most direct path possible, reducing latency and improving speed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Features:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Zero Configuration&lt;/strong&gt; : Tailscale is designed to work out of the box without the need for complex setup.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;End-to-End Encryption&lt;/strong&gt; : All traffic is encrypted from your device to the destination, ensuring privacy and security.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Works on Any Network&lt;/strong&gt; : Whether youre on a home network, corporate LAN, or a coffee shops Wi-Fi, Tailscale just works.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easy Access Management&lt;/strong&gt; : Control who has access to your network with simple, yet powerful ACLs (Access Control Lists).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automatic Updates&lt;/strong&gt; : The network is always kept secure with automatic updates that don't interrupt service.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Setting Up Tailscale
&lt;/h2&gt;

&lt;p&gt;Getting started with Tailscale is a straightforward process. Here's a step-by-step guide to get you up and running.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Create a Tailscale Account
&lt;/h3&gt;

&lt;p&gt;First, visit &lt;a href="https://tailscale.com"&gt;Tailscale's website&lt;/a&gt; and sign up for an account. You can use your Google, Microsoft, or GitHub account for a quick sign-up process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Install Tailscale
&lt;/h3&gt;

&lt;p&gt;Tailscale is available on a wide range of platforms, including Windows, macOS, Linux, iOS, and Android.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;For desktop platforms, download the respective installer from the Tailscale downloads page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For mobile devices, install Tailscale from the App Store or Google Play.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 3: Log In and Connect
&lt;/h3&gt;

&lt;p&gt;After installation, open Tailscale and log in using the account you created.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;On desktop, you may need to log in through your web browser.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;On mobile, you can log in directly through the app.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once logged in, toggle the switch to connect to your Tailscale network.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Add Devices
&lt;/h3&gt;

&lt;p&gt;To add more devices to your network, repeat steps 2 and 3 on each new device. Each device will appear in your Tailscale admin console, where you can manage connections and access rights.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Configure Access Controls
&lt;/h3&gt;

&lt;p&gt;Tailscale allows you to manage who can access what within your network. You can configure these settings in the admin console under the 'Access Control' tab.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Define user roles.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set up ACLs to restrict or allow access to certain devices or services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Group devices for easier management.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 6: Share Your Network
&lt;/h3&gt;

&lt;p&gt;For others to join your Tailscale network, they'll need to create their own Tailscale account. Once theyve done that, you can share your network with them via email invitation directly from the admin console.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tips for Using Tailscale Effectively
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Magic DNS&lt;/strong&gt; : Take advantage of Tailscale's Magic DNS feature, which assigns a unique, human-readable DNS name to each of your devices.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Subnet Routing&lt;/strong&gt; : If you have services on a local network that you want to access remotely, use Tailscales subnet routing to make them available over your Tailscale network.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Security Audits&lt;/strong&gt; : Regularly review your networks access controls to ensure that only authorized users have access to your network.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Tailscale is revolutionizing the way we think about VPNs by providing a secure, easy-to-manage, private network solution. By following the steps outlined above, you can set up your own Tailscale network and enjoy the benefits of seamless, encrypted communication between your devices.&lt;/p&gt;

&lt;p&gt;Whether you're looking to securely access your home server from anywhere in the world, manage a fleet of IoT devices, or simply share files between colleagues without the hassle of traditional VPNs, Tailscale has you covered. With its intuitive interface and robust security features, Tailscale is a must-try for anyone looking to enhance their networking experience.&lt;/p&gt;

&lt;p&gt;Take the plunge into a more secure, interconnected world with Tailscale. Your network will thank you for it.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Hasura: Building Scalable and Real-Time Applications - An Extensive Guide</title>
      <dc:creator>Sebastian Goscinski</dc:creator>
      <pubDate>Fri, 03 Mar 2023 13:11:00 +0000</pubDate>
      <link>https://forem.com/sebiweise/hasura-building-scalable-and-real-time-applications-an-extensive-guide-7b5</link>
      <guid>https://forem.com/sebiweise/hasura-building-scalable-and-real-time-applications-an-extensive-guide-7b5</guid>
      <description>&lt;p&gt;Building robust and scalable APIs is a critical aspect of modern web application development. However, designing and implementing an API can be a time-consuming and complex process. Enter Hasura, a platform that simplifies the development and deployment of GraphQL APIs. In this article, we'll explore the features and benefits of Hasura, how it simplifies API development, and how it can help businesses and developers to build scalable and secure APIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction to Hasura
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is Hasura?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://hasura.io/"&gt;Hasura&lt;/a&gt; is an open-source platform for building, deploying, and managing GraphQL APIs. It provides a range of tools and features that simplify the process of building APIs, including data modeling, real-time subscriptions, automated scaling and security, and team collaboration tools.&lt;/p&gt;

&lt;p&gt;At its core, Hasura provides a unified interface for querying and manipulating data across multiple data sources. This allows developers to create APIs that can be used by a wide range of clients, including mobile applications, web applications, and IoT devices.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why use Hasura for API development?
&lt;/h3&gt;

&lt;p&gt;There are several reasons why Hasura is an excellent choice for building APIs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ease of use:&lt;/strong&gt; Hasura's user-friendly interface and intuitive workflows make it easy for developers to get started with building APIs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-time subscriptions:&lt;/strong&gt; Hasura provides real-time subscriptions, which enable developers to build real-time applications that can respond to events as they happen.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated scaling and security:&lt;/strong&gt; Hasura automates the process of scaling and securing APIs, which reduces the need for manual intervention and ensures that APIs are secure and scalable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collaboration and team management:&lt;/strong&gt; Hasura provides a range of tools and features that enable multiple developers to work on a project simultaneously, including version control, team management, and collaboration tools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flexible deployment options:&lt;/strong&gt; Hasura can be deployed using a range of options, including Docker containers, Kubernetes, and Heroku.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Overall, Hasura simplifies the process of building and managing APIs, which can save businesses and developers a significant amount of time and effort.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started with Hasura
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Setting up a Hasura account
&lt;/h3&gt;

&lt;p&gt;To get started with Hasura, you'll first need to create an account here. You can sign up for a free account on the Hasura website, which provides access to a range of features and tools.&lt;/p&gt;

&lt;p&gt;Once you've signed up, you'll be taken to the Hasura dashboard, which provides an overview of your projects and allows you to create new projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating a new project
&lt;/h3&gt;

&lt;p&gt;To create a new project in Hasura, click the "Create a new project" button on the dashboard. You'll be prompted to provide a name for your project and choose a database type.&lt;/p&gt;

&lt;p&gt;Hasura supports a range of databases, including PostgreSQL, MySQL, and SQL Server. If you already have a database, you can connect it to Hasura by providing the connection details.&lt;/p&gt;

&lt;h3&gt;
  
  
  Overview of the Hasura console
&lt;/h3&gt;

&lt;p&gt;Once you've created a project, you'll be taken to the Hasura console, which provides an interface for managing your project. The console is divided into several sections, including:&lt;/p&gt;

&lt;p&gt;Data: Allows you to define data models and relationships, and manage your data sources.&lt;/p&gt;

&lt;p&gt;GraphQL: Provides an interface for querying your data using GraphQL.&lt;/p&gt;

&lt;p&gt;Events: Allows you to create and manage real-time subscriptions and triggers.&lt;/p&gt;

&lt;p&gt;Actions: Provides an interface for defining custom API actions.&lt;/p&gt;

&lt;p&gt;Remote Schemas: Allows you to integrate with external APIs using remote schemas.&lt;/p&gt;

&lt;p&gt;Settings: Provides a range of settings and configuration options for your project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building GraphQL APIs with Hasura
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Defining data models and relationships
&lt;/h3&gt;

&lt;p&gt;One of the key features of Hasura is its ability to define data models and relationships using a user-friendly interface. To define a new data model, navigate to the "Data" section of the Hasura console and click the "Create" button.&lt;/p&gt;

&lt;p&gt;You can then define the fields for your data model, set data types, and add constraints. Hasura supports a range of data types, including text, integers, booleans, and timestamps.&lt;/p&gt;

&lt;p&gt;Once you've defined your data models, you can define relationships between them. For example, if you have a "Users" data model and a "Posts" data model, you can define a relationship between them so that each user can have many posts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Querying data with GraphQL
&lt;/h3&gt;

&lt;p&gt;Hasura provides a GraphQL API that allows you to query your data using GraphQL. To use the GraphQL API, navigate to the "GraphQL" section of the Hasura console and use the GraphiQL interface to run queries.&lt;/p&gt;

&lt;p&gt;Hasura automatically generates GraphQL types and queries based on your data models, making it easy to get started with querying your data. For example, if you have a "Users" data model, you can query all users using the following GraphQL query:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;query {
  users {
    id
    name
    email
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Real-time subscriptions
&lt;/h3&gt;

&lt;p&gt;Hasura also provides &lt;a href="https://hasura.io/learn/graphql/intro-graphql/graphql-subscriptions/"&gt;real-time subscriptions&lt;/a&gt;, which allow you to build real-time applications that can respond to events as they happen. To create a real-time subscription, navigate to the "Events" section of the Hasura console and create a new subscription.&lt;/p&gt;

&lt;p&gt;You can then define the criteria for your subscription, such as when a new record is added to a data model. Hasura will automatically send updates to the subscription whenever the criteria are met.&lt;/p&gt;

&lt;h3&gt;
  
  
  Custom API actions
&lt;/h3&gt;

&lt;p&gt;Hasura also provides the ability to define custom API actions using its "Actions" feature. This allows you to define custom business logic and integrate with external APIs.&lt;/p&gt;

&lt;p&gt;To define a new action, navigate to the "Actions" section of the Hasura console and create a new action. You can then define the input and output types for your action, and write custom code to implement the action.&lt;/p&gt;

&lt;p&gt;Overall, Hasura provides a powerful and user-friendly platform for building GraphQL APIs. Its range of features and tools, including data modeling, real-time subscriptions, and custom API actions, make it an excellent choice for businesses and developers looking to build scalable and secure APIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploying and Scaling Hasura
&lt;/h2&gt;

&lt;p&gt;Deploying Hasura to production involves creating an environment that can support the application's needs. It is essential to have a scalable, secure, and stable environment that can handle the application's traffic.&lt;/p&gt;

&lt;p&gt;Hasura supports multiple deployment options that provide a streamlined way to deploy, manage, and scale your Hasura application.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hasura Cloud
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://hasura.io/cloud/"&gt;Hasura Cloud&lt;/a&gt; is the easiest and most streamlined way to deploy your Hasura application. With Hasura Cloud, you can easily deploy, manage, and scale your Hasura application without worrying about infrastructure or DevOps tasks.&lt;/p&gt;

&lt;p&gt;Hasura Cloud provides a range of features, including automatic scaling, real-time monitoring, and seamless integration with other cloud providers. It also provides a user-friendly interface for managing your Hasura application and simplifies the process of deploying your application to production.&lt;/p&gt;

&lt;p&gt;If you want to learn more about Hasura Cloud you can do it &lt;a href="https://hashnode.com/post/clepe6qzw001109jq0ip62j2k"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Kubernetes
&lt;/h3&gt;

&lt;p&gt;If you're comfortable with &lt;a href="https://kubernetes.io/"&gt;Kubernetes&lt;/a&gt;, you can also deploy Hasura to a Kubernetes cluster. Hasura provides official Helm charts and Kubernetes manifests for deploying your application to Kubernetes.&lt;/p&gt;

&lt;p&gt;Deploying your application to Kubernetes provides more control over your infrastructure and allows you to scale your application based on demand. However, it requires more DevOps expertise and may be more time-consuming to set up than using Hasura Cloud.&lt;/p&gt;

&lt;h3&gt;
  
  
  Docker Compose
&lt;/h3&gt;

&lt;p&gt;For smaller deployments or local development, you can deploy Hasura using Docker Compose. Hasura provides official Docker images that can be used with Docker Compose to deploy your application.&lt;/p&gt;

&lt;p&gt;Using Docker Compose allows you to easily spin up a local instance of your Hasura application for testing and development. However, it's not recommended for production deployments due to its limited scalability and lack of production-grade features.&lt;/p&gt;

&lt;h3&gt;
  
  
  Self-Hosted
&lt;/h3&gt;

&lt;p&gt;If you prefer to manage your own infrastructure, you can self-host Hasura. Hasura can be deployed to a wide range of platforms, including virtual machines, containers, and bare-metal servers. Self-hosting gives you complete control over your infrastructure, but it also requires more effort and resources to set up and manage. You can find more information on how to self-host Hasura in the official documentation &lt;a href="https://hasura.io/docs/latest/getting-started/docker-simple/"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you're looking for a suitable hosting provider check out my cloud hosting series &lt;a href="https://sebiweise.dev/series/cloud-hosting"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scaling Hasura
&lt;/h3&gt;

&lt;p&gt;Hasura can handle a significant amount of traffic, and it's easy to scale up or down depending on your application's needs.&lt;/p&gt;

&lt;p&gt;With Hasura Cloud, scaling is automatic, and you don't have to worry about managing servers or infrastructure. Hasura Cloud will scale your application based on the traffic and load it's receiving.&lt;/p&gt;

&lt;p&gt;With Kubernetes or self-hosting, you have to configure your environment to handle scaling. Kubernetes provides automatic scaling, but you need to configure it correctly. Self-hosting requires manual scaling, which can be time-consuming and error-prone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Collaborating and Managing Teams with Hasura
&lt;/h2&gt;

&lt;p&gt;Collaboration and teamwork are essential to building and managing a successful application. Hasura provides several tools that make it easy to collaborate and manage teams.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hasura Console
&lt;/h3&gt;

&lt;p&gt;Hasura Console is a web-based interface that allows you to manage your Hasura application's data and metadata. The console provides a range of features, including real-time data editing, metadata management, and version control.&lt;/p&gt;

&lt;p&gt;With the console, multiple team members can collaborate on the same Hasura application, and changes can be tracked and managed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hasura Migrations
&lt;/h3&gt;

&lt;p&gt;Hasura Migrations allow you to manage changes to your database schema in a collaborative and version-controlled way. Migrations are a set of SQL statements that can be executed to modify your database schema.&lt;/p&gt;

&lt;p&gt;With Hasura Migrations, you can track changes to your schema and easily share them with your team members. Migrations can be version controlled, making it easy to collaborate and manage changes to your database schema.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hasura Actions
&lt;/h3&gt;

&lt;p&gt;Hasura Actions provide a way to extend Hasura's GraphQL API with custom business logic. With Hasura Actions, you can execute arbitrary code and integrate with external services.&lt;/p&gt;

&lt;p&gt;Hasura Actions can be used to implement complex business workflows and integrate with external systems. Actions can be version controlled and managed, making it easy to collaborate and manage your application's functionality.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hasura Permissions
&lt;/h3&gt;

&lt;p&gt;Hasura Permissions provide a way to manage access control to your Hasura application's data. With Hasura Permissions, you can define fine-grained access control rules that restrict or grant access to your application's data.&lt;/p&gt;

&lt;p&gt;Permissions can be defined on tables, columns, and rows, making it easy to manage access to your application's data. Permissions can also be version controlled, making it easy to collaborate and manage access control rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monitoring and Analytics with Hasura
&lt;/h2&gt;

&lt;p&gt;Monitoring and analytics are essential to ensuring the smooth operation and optimal performance of your Hasura application. Hasura provides several tools that make it easy to monitor and analyze your application's performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hasura Metrics
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://hasura.io/docs/latest/observability/usage/"&gt;Hasura Metrics&lt;/a&gt; is a built-in monitoring solution that provides real-time metrics for your Hasura application. With Hasura Metrics, you can monitor the performance of your application and quickly identify any performance bottlenecks.&lt;/p&gt;

&lt;p&gt;Hasura Metrics provides a range of metrics, including query latency, query count, and error rates. You can use these metrics to identify areas where your application can be optimized and improved.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hasura Tracing
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://hasura.io/docs/latest/observability/index/"&gt;Hasura Tracing&lt;/a&gt; is a tool that allows you to trace the execution of your Hasura GraphQL API. With Hasura Tracing, you can identify performance bottlenecks and optimize your application's performance.&lt;/p&gt;

&lt;p&gt;Hasura Tracing provides a detailed view of each GraphQL query and its execution time. You can use this information to optimize your database queries and improve your application's performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hasura Logs
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://hasura.io/docs/latest/observability/errors/"&gt;Hasura Logs&lt;/a&gt; provide a detailed view of your application's activity and performance. With Hasura Logs, you can track errors, monitor performance, and identify potential issues.&lt;/p&gt;

&lt;p&gt;Hasura Logs provide a range of logs, including server logs, query logs, and error logs. You can use these logs to troubleshoot issues and optimize your application's performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use Cases for Hasura
&lt;/h2&gt;

&lt;p&gt;Hasura is a versatile tool that can be used in a wide range of use cases. Here are some examples of how you can use Hasura in your projects:&lt;/p&gt;

&lt;h3&gt;
  
  
  Building Real-time Applications
&lt;/h3&gt;

&lt;p&gt;Hasura makes it easy to build real-time applications that require data to be updated in real-time. You can use Hasura to build chat applications, real-time dashboards, or multiplayer games that require real-time updates.&lt;/p&gt;

&lt;p&gt;Hasura provides real-time subscriptions, which allow clients to subscribe to changes in the database. With Hasura subscriptions, you can build real-time applications that are scalable, reliable, and efficient.&lt;/p&gt;

&lt;h3&gt;
  
  
  Building Microservices
&lt;/h3&gt;

&lt;p&gt;Hasura can be used to build microservices that communicate with each other using GraphQL APIs. Hasura provides a centralized GraphQL API that can be used to access data from multiple microservices.&lt;/p&gt;

&lt;p&gt;With Hasura, you can build microservices that are scalable, decoupled, and easy to maintain. Hasura's GraphQL API provides a unified interface that makes it easy to access data from multiple microservices.&lt;/p&gt;

&lt;h3&gt;
  
  
  Building Serverless Applications
&lt;/h3&gt;

&lt;p&gt;Hasura can be used to build serverless applications that can be deployed on platforms like AWS Lambda or Google Cloud Functions. Hasura provides a GraphQL engine that can be used to build serverless applications that require access to data.&lt;/p&gt;

&lt;p&gt;With Hasura, you can build serverless applications that are scalable, cost-effective, and easy to maintain. Hasura's GraphQL API provides a unified interface that makes it easy to access data from serverless functions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Building Progressive Web Applications
&lt;/h3&gt;

&lt;p&gt;Hasura can be used to build progressive web applications (PWAs) that are fast, reliable, and responsive. Hasura provides a GraphQL API that can be used to access data from the backend.&lt;/p&gt;

&lt;p&gt;With Hasura, you can build PWAs that are optimized for performance, offline usage, and mobile devices. Hasura's GraphQL API provides a unified interface that makes it easy to access data from the backend.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Hasura is a powerful tool that simplifies the process of building scalable and efficient applications. With its real-time subscriptions, centralized GraphQL API, and easy-to-use interface, Hasura makes it easy to build real-time applications, microservices, serverless applications, and progressive web applications.&lt;/p&gt;

&lt;p&gt;The features provided by Hasura make it an excellent choice for developers who want to build modern applications with real-time capabilities. Whether you're building a chat application, a real-time dashboard, or a multiplayer game, Hasura's real-time subscriptions and GraphQL API make it easy to build scalable and reliable applications.&lt;/p&gt;

&lt;p&gt;Moreover, Hasura's support for microservices and serverless functions makes it an excellent choice for developers who want to build scalable and efficient applications. With Hasura, you can easily build microservices that are decoupled, scalable, and easy to maintain. Similarly, Hasura's GraphQL API makes it easy to access data from serverless functions and build serverless applications that are scalable and cost-effective.&lt;/p&gt;

&lt;p&gt;In conclusion, Hasura is a powerful tool that simplifies the process of building modern applications. Its features make it easy to build real-time applications, microservices, serverless applications, and progressive web applications. Whether you're building a new application or migrating an existing one, Hasura can help you build scalable and efficient applications with ease.&lt;/p&gt;

</description>
      <category>hasura</category>
      <category>cloud</category>
      <category>graphql</category>
      <category>api</category>
    </item>
    <item>
      <title>Hasura Cloud: Building Scalable and Secure GraphQL APIs Made Easy</title>
      <dc:creator>Sebastian Goscinski</dc:creator>
      <pubDate>Fri, 03 Mar 2023 13:03:18 +0000</pubDate>
      <link>https://forem.com/sebiweise/hasura-cloud-building-scalable-and-secure-graphql-apis-made-easy-3fp9</link>
      <guid>https://forem.com/sebiweise/hasura-cloud-building-scalable-and-secure-graphql-apis-made-easy-3fp9</guid>
      <description>&lt;p&gt;&lt;a href="https://hasura.io/cloud/" rel="noopener noreferrer"&gt;Hasura Cloud&lt;/a&gt; is a fully managed GraphQL API platform that simplifies and streamlines the process of building, deploying, and managing GraphQL APIs. It enables developers to build scalable and secure GraphQL APIs with minimal effort, allowing them to focus on developing their applications rather than managing their infrastructure. In this blog post, we'll explore the features and benefits of Hasura Cloud, and how it can help businesses and developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Easy Set-Up and Deployment
&lt;/h2&gt;

&lt;p&gt;One of the main benefits of Hasura Cloud is that it makes setting up and deploying GraphQL APIs easy and fast. It offers a range of deployment options, including Docker containers, Kubernetes, and Heroku. Additionally, Hasura Cloud provides a range of templates and examples that can help developers get started quickly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-Time GraphQL Subscriptions
&lt;/h2&gt;

&lt;p&gt;Hasura Cloud provides real-time GraphQL subscriptions, which enable developers to build real-time applications that can respond to events as they happen. This feature is particularly useful for building chat applications, stock market apps, or any other application that requires real-time updates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Automated Security and Scaling
&lt;/h2&gt;

&lt;p&gt;Hasura Cloud provides automated security and scaling features, which ensure that your APIs are secure and scalable. Its security features include rate limiting, role-based access control, and end-to-end encryption. Its scaling features include automatic load balancing, auto-scaling, and horizontal scaling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Collaboration and Team Management
&lt;/h2&gt;

&lt;p&gt;Hasura Cloud enables collaboration and team management, which allows multiple developers to work on a project simultaneously. Its collaboration features include shared databases, version control, and team management tools. Additionally, Hasura Cloud integrates with popular development tools such as GitHub and GitLab.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advanced Analytics and Monitoring
&lt;/h2&gt;

&lt;p&gt;Hasura Cloud provides advanced analytics and monitoring features, which enable developers to monitor and optimize the performance of their APIs. Its monitoring features include error tracking, latency tracking, and request tracking. Additionally, Hasura Cloud provides a range of analytics features, including usage tracking, API performance monitoring, and user behavior analytics.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Hasura Cloud is a powerful and flexible platform that simplifies the process of building, deploying, and managing GraphQL APIs. Its easy set-up and deployment, real-time subscriptions, automated security and scaling, collaboration and team management, and advanced analytics and monitoring features make it an excellent choice for businesses and developers who are looking to build scalable and secure GraphQL APIs. If you're looking to simplify the process of building and managing GraphQL APIs, Hasura Cloud is definitely worth considering.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>learning</category>
    </item>
    <item>
      <title>Next.js &amp; TailwindUI insert Inter font family</title>
      <dc:creator>Sebastian Goscinski</dc:creator>
      <pubDate>Fri, 03 Mar 2023 13:00:34 +0000</pubDate>
      <link>https://forem.com/sebiweise/nextjs-tailwindui-insert-inter-font-family-aoh</link>
      <guid>https://forem.com/sebiweise/nextjs-tailwindui-insert-inter-font-family-aoh</guid>
      <description>&lt;p&gt;In this short post I will show you how to easily integrate the &lt;a href="https://fonts.google.com/specimen/Inter"&gt;Inter font family&lt;/a&gt; for &lt;a href="https://tailwindui.com/"&gt;TailwindUI&lt;/a&gt; in &lt;a href="https://nextjs.org/"&gt;Next.js&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next.js Document setup
&lt;/h2&gt;

&lt;p&gt;To integrate the &lt;code&gt;Inter font family&lt;/code&gt; into your Next.js application you have to create a custom document page, just create the file &lt;code&gt;_document.tsx&lt;/code&gt; and insert the following code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Document&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Html&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Head&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Main&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;NextScript&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;DocumentContext&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;next/document&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MyDocument&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Document&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;getInitialProps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;DocumentContext&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;initialProps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getInitialProps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;initialProps&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Html&lt;/span&gt; &lt;span class="nx"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;de&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;h-full&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Head&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;link&lt;/span&gt;
                        &lt;span class="nx"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://rsms.me/inter/inter.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
                        &lt;span class="nx"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;stylesheet&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
                    &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
                &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Head&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;                &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;h-full&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Main&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
                    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;NextScript&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
                &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/body&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Html&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;MyDocument&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Tailwind Configuration
&lt;/h2&gt;

&lt;p&gt;To activate the &lt;code&gt;Inter font family&lt;/code&gt; in &lt;a href="https://tailwindcss.com/"&gt;TailwindCSS&lt;/a&gt; you just have to extend the &lt;code&gt;theme&lt;/code&gt; property and specify your own &lt;code&gt;fontFamily&lt;/code&gt; using the following code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;defaultTheme&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tailwindcss/defaultTheme&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="kr"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;extend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;fontFamily&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;sans&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Inter var&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;defaultTheme&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fontFamily&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sans&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>nextjs</category>
      <category>tailwindcss</category>
      <category>typescript</category>
      <category>tailwindui</category>
    </item>
  </channel>
</rss>
