<?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>DEV Community: Jeremy Camus</title>
    <description>The latest articles on DEV Community by Jeremy Camus (@jimmycamus).</description>
    <link>https://dev.to/jimmycamus</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%2F3390669%2F6b9f81ba-6504-4ea2-9a89-4225a5553983.jpeg</url>
      <title>DEV Community: Jeremy Camus</title>
      <link>https://dev.to/jimmycamus</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jimmycamus"/>
    <language>en</language>
    <item>
      <title>NestJS OAuth2 Starter: Google, GitHub, JWT, Redis, PostgreSQL – Ready for Production</title>
      <dc:creator>Jeremy Camus</dc:creator>
      <pubDate>Sat, 26 Jul 2025 21:17:36 +0000</pubDate>
      <link>https://dev.to/jimmycamus/nestjs-oauth2-starter-google-github-jwt-redis-postgresql-ready-for-production-225d</link>
      <guid>https://dev.to/jimmycamus/nestjs-oauth2-starter-google-github-jwt-redis-postgresql-ready-for-production-225d</guid>
      <description>&lt;p&gt;Are you tired of rebuilding the same authentication flow every time you start a NestJS project?&lt;/p&gt;

&lt;p&gt;I’ve created a robust NestJS starter template that includes everything you need to launch a secure, scalable application – with OAuth2 (Google &amp;amp; GitHub), JWT session management, Redis cache, PostgreSQL, environment validation, and full testing setup.&lt;/p&gt;

&lt;p&gt;Ideal for production-ready apps, prototypes, and team onboarding.&lt;/p&gt;

&lt;p&gt;👉 GitHub Repo: &lt;a href="https://github.com/JimmyCamus/nest-oauth2-template" rel="noopener noreferrer"&gt;https://github.com/JimmyCamus/nest-oauth2-template&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  ✅ Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;🧱 Modular NestJS 11+ structure&lt;/li&gt;
&lt;li&gt;🔐 OAuth2 via Google &amp;amp; GitHub&lt;/li&gt;
&lt;li&gt;🔑 JWT-based auth&lt;/li&gt;
&lt;li&gt;🚀 Redis for caching and session management&lt;/li&gt;
&lt;li&gt;🐘 PostgreSQL with TypeORM&lt;/li&gt;
&lt;li&gt;📦 Centralized &amp;amp; validated config&lt;/li&gt;
&lt;li&gt;📊 Logging with nestjs-pino&lt;/li&gt;
&lt;li&gt;🧪 Full unit &amp;amp; e2e tests&lt;/li&gt;
&lt;li&gt;📡 Health check endpoint&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🧪 Ready-to-use Endpoints
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;GET /auth/google → Redirects to Google login&lt;/li&gt;
&lt;li&gt;GET /auth/google/redirect → Handles Google callback&lt;/li&gt;
&lt;li&gt;GET /auth/github → Redirects to GitHub login&lt;/li&gt;
&lt;li&gt;GET /auth/github/redirect → Handles GitHub callback&lt;/li&gt;
&lt;li&gt;GET /auth/profile → Returns the logged-in user's profile (requires JWT)&lt;/li&gt;
&lt;li&gt;GET /health → Health check with app uptime and status&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🔧 Configuration
&lt;/h3&gt;

&lt;p&gt;All environment variables are validated at startup.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Includes config for:&lt;/li&gt;
&lt;li&gt;Google &amp;amp; GitHub OAuth&lt;/li&gt;
&lt;li&gt;JWT secrets&lt;/li&gt;
&lt;li&gt;PostgreSQL connection&lt;/li&gt;
&lt;li&gt;Redis host/password&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Just copy .env.example and replace with your own values.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔍 Why Use This Template?
&lt;/h3&gt;

&lt;p&gt;This is more than a simple starter — it's designed for real-world applications, with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OAuth2 auth fully configured with Passport strategies&lt;/li&gt;
&lt;li&gt;Token-based sessions via JWT&lt;/li&gt;
&lt;li&gt;Redis cache integration&lt;/li&gt;
&lt;li&gt;Validated and centralized environment configs&lt;/li&gt;
&lt;li&gt;Structured logs using nestjs-pino&lt;/li&gt;
&lt;li&gt;End-to-end and unit testing support&lt;/li&gt;
&lt;li&gt;Clean, extensible modular architecture&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Perfect for projects where you want to skip the boilerplate and focus on building.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you find it useful, give it a ⭐ and feel free to open an issue or PR with feedback or improvements!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>nestjs</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
