Setting up authentication that actually works
Sessions, cookies, OAuth callbacks, password reset, email verification - every project starts the same way.
Production-ready Next.js boilerplate with auth, email, and database and other necessary features to help you launch your startup in days instead of months.
/ modern stack
readyModern components, beautiful UI, dark-ready by default.
/ the problem
Weeks lost before you launch. You have a great idea - but you're stuck setting up auth, database, emails, and infrastructure instead of building your product.
Sessions, cookies, OAuth callbacks, password reset, email verification - every project starts the same way.
Schema design, Prisma setup, migration strategy, seed data, production connection pooling, row-level security.
Resend, Postmark, or SES. React Email templates. Domain authentication. Bounce handling. Reply-to routing.
Race conditions in middleware, CORS issues, broken redirects, mysterious 500s. Hours disappear into infrastructure.
Norcel gives you a production-grade stack on day one - so you can launch, not debug.
the solution
Stop wasting time on setup. Get authentication, database, emails, and database pre-configured with best practices. Ship your first version in days, iterate based on real user feedback, and scale when you're ready.
From purchase to first deploy
Production-grade code from day one
Auth flows that work. Email templates that render everywhere. Database migrations that just run. Just clone and start building.
Focus on what makes your product unique. Get paying customers while others are still setting up auth.
/ everything you need
Five pillars, wired together. The only thing left to build is the part that makes your product yours.
01 — authentication
User sign-up and login with Auth.js. Social providers, magic links, and email/password flows all configured.
Forgot password? Reset it
02 — performance
Streaming SSR + React Server Components, Edge middleware, run anywhere except Workers Image optimization baked in Static-first caching, with opt-in for dynamic
03 — email
Transactional emails via Resend. Verification, welcome, magic-link, password reset, and email-change ready to send. Receipts in v1.1.
Thanks for signing up. Your account is ready — head to the dashboard to get your first deploy live in 10 minutes.
04 — UI
shadcn/ui components styled with Tailwind. Dark mode, responsive, and accessible out of the box.
05 — database & beyond
Postgres with Supabase, SEO optimization, blog system, user dashboard, AI integration, and legal pages. Everything you need.
/ comparison
An honest comparison with the alternatives.
/ the bottom line
Best for speed. Launch in days with everything configured. One-time purchase, lifetime updates, and developer support.
Get NorcelMaximum control but months of setup time. You'll build auth, database, emails, and everything else yourself.
Free to start but often outdated or abandoned. Expect to debug integrations and fix broken features yourself.
* Open-source starters are free to download — factor in the 20–60 hours of integration work before "free" feels free.
We're launching Norcel to the first 100 founders at a special price - and we're throwing in a free UI kit to help you ship even faster.
A premium component library you can drop into any Next.js project. Marketing, dashboard, and auth flows - all dark-ready.
/ code showcase
Small, curated snippets — each one a design decision that makes the whole stack safer, faster, or easier to extend.
// lib/auth.ts — the rotation step inside the jwt callback
const iatMs = (token.iat ?? 0) * 1000;
const ttlMs = token.rememberMe
? REMEMBER_ME_SESSION_MS
: DEFAULT_SESSION_MS;
if (iatMs && shouldRotateJwt(iatMs, ttlMs)) {
// Bump iat so the cookie TTL is effectively extended.
token.iat = Math.floor(Date.now() / 1000);
}
export async function touchUserSession(
sessionId: string | undefined
): Promise<{ userId: string }> | null {
if (!sessionId) return null;
const row = await prisma.userSession.findUnique({
where: { sessionId },
});
if (!row) return null;
if (row.revokedAt) return null;
if (row.expiresAt < new Date()) return null;
await prisma.userSession.update({
where: { sessionId },
data: { lastSeenAt: new Date() },
});
return { userId: row.userId };
}
// lib/auth.config.ts — edge-safe, no providers, no adapter
export const authConfig: NextAuthConfig = {
providers: [],
session: { strategy: "jwt", maxAge: 30 * 24 * 60 * 60 },
secret: process.env.AUTH_SECRET,
callbacks: {
session({ session, token }) {
if (session.user) {
if (typeof token.id === "string") session.user.id = token.id;
if (token.role === "USER" || token.role === "ADMIN") {
session.user.role = token.role;
}
}
return session;
},
},
};
let argon2Promise: Promise<Argon2Module> | null = null;
async function getArgon2(): Promise<Argon2Module> {
if (!argon2Promise) {
argon2Promise = import("argon2");
}
return argon2Promise;
}
const HASH_OPTIONS = {
type: 2 as const, // argon2id
memoryCost: 19_456, // 19 MB
timeCost: 2,
parallelism: 1,
};
export async function hashPassword(plain: string): Promise<string> {
const argon2 = await getArgon2();
return argon2.hash(plain, HASH_OPTIONS);
}
const serverSchema = z.object({
NODE_ENV: z.enum(["development", "test", "production"])
.default("development"),
DATABASE_URL: z.string().url(),
AUTH_SECRET: z.string().min(16, "AUTH_SECRET must be at least 16 chars"),
EMAIL_PROVIDER: z.enum(["console", "resend", "smtp", "memory"])
.default("console"),
// ...
});
export const serverEnv = (() => {
if (typeof window !== "undefined") {
throw new Error("serverEnv must not be imported in the browser");
}
return parseServer();
})();
/ screenshots
Four real screens from the Norcel template — every one is a route you can run locally in under five minutes.
Every module on one page — auth, sessions, RBAC, design system.
Everything wired up — sessions, RBAC, audit log, billing-ready data.
Live user list, role management, security log out of the box.
/ why norcel
Built using modern authentication best practices - secure cookies, CSRF, rate limiting, verified email flows.
Structured for long-term maintainability with a clear separation of routes, services, and data access.
Save weeks of development time. Skip the email flows, OAuth wiring, and admin panel - it's all here.
Built to be sold, extended, and scaled. License it across your client work or your own product line.
/ trusted by
The project structure is easy to understand, and I was able to customize the authentication flow without fighting the framework.
Having authentication, organizations, and RBAC already wired together would save me a significant amount of setup time on a new SaaS project.
This is the kind of starter I look for—modern tooling, sensible architecture, and fewer decisions to make before I can start building features.
/ faq
Anything we missed? Email us at hello@norcel.dev and we'll get back fast.
Next.js 15 (App Router) with React 19 and TypeScript in strict mode, Auth.js v5 (NextAuth) for sessions, Prisma 5 on Supabase Postgres, Tailwind CSS v4 with a Vercel-inspired design-token system, Resend or SMTP for transactional email, and shadcn/ui primitives re-skinned to the brand. Every layer is decoupled — swap Postgres for Neon, Resend for Postmark, or extend the role model without fighting the framework.
Email + password with argon2id hashing, Google and GitHub OAuth, passwordless magic-link sign-in, email verification on signup, forgot/reset password, two-step email change with old sessions revoked, and a server-side session list users can revoke from /settings. Every flow is implemented as a typed server action — no hand-rolled fetch calls in the client.
Yes. Passwords are hashed with argon2id (memory-hard, OWASP-recommended), reset and verification tokens are stored as SHA-256 fingerprints rather than plaintext, sessions use HttpOnly + SameSite cookies with constant-time token comparison, and per-IP and per-account rate limiting is in place on sign-in, sign-up, forgot-password, and magic-link. The forgot-password and magic-link endpoints return identical responses for known and unknown emails to prevent user enumeration. A Dockerfile, GitHub Actions CI, and a typed, fail-fast env-var parser ship in the box.
Yes — USER, ADMIN, and SUPER_ADMIN roles seed out of the box, with requireAuth, requireAdmin, requireRole, and hasRole server guards you can call from any RSC, route handler, or server action. Edge middleware fast-fails unauthenticated traffic before the database is hit, and a full /admin panel lists users, lets you impersonate or soft-delete, and surfaces the security event log.
Everything. The brand tokens (colors, typography, spacing, radii, shadows) live in app/globals.css as Tailwind v4 @theme variables, so you re-skin the entire app by editing one file. The mesh-gradient hero, 100px pill CTAs, and Geist-on-canvas surfaces are utilities, not hard-coded values. Replacing the email provider, swapping Supabase for Neon or RDS, or extending the role model is a single config change rather than a refactor.
Yes — the complete Next.js project: every auth page, the admin panel, the Prisma schema and migrations, seed scripts, the design system, tests, the Dockerfile, and the CI workflow. Nothing is obfuscated, nothing is locked behind a runtime, and nothing phones home. You can read, modify, and self-host it.
Google and GitHub OAuth are wired in by default — drop the client IDs and secrets into .env and they work. Magic-link sign-in via Resend (or the SMTP or console provider) is included for passwordless flows. Adding more providers (Discord, Apple, etc.) is a single config entry; SAML is a larger integration and is on the roadmap.
Yes. The license is a standard commercial SaaS starter license — build and sell as many products as you like, including client work. See the /license page for the binding terms and a plain-language summary.
Phase 1 (this release) is the authentication, authorization, admin, and design-system module. The v1.1 backlog covers the enterprise-leaning additions buyers ask for: TOTP / WebAuthn two-factor authentication, OAuth-token encryption at rest, GDPR hard-delete, multi-tenant organizations with team invitations, a public REST or tRPC API, and a Sentry integration. Future modules such as billing and audit-log exports are planned for the 1.x line.
Security headers (CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy) are set in middleware. Accounts lock for 15 minutes after 5 failed sign-ins in a 15-minute window with exponential backoff on repeat lockouts. A SecurityEvent log records every sign-in, sign-out, password change, email change, and lockout for your admin audit trail. Accounts can be soft-deleted and restored by a super-admin, and the v1.1 release adds a GDPR-compliant hard-delete path.
Issues, setup questions, and bug reports are handled through the project repository. Because the product is source code that is yours the moment you download it, sales are final once the repository has been cloned. See the /license page for the full terms.
/ ship it
Skip weeks of authentication development and start building your product today.
Instant access · Lifetime updates · Commercial license