{"id":22390217,"url":"https://github.com/ilkaytech/advanced-mern-auth","last_synced_at":"2026-04-12T04:34:07.053Z","repository":{"id":265958751,"uuid":"896943257","full_name":"ilkaytech/Advanced-MERN-Auth","owner":"ilkaytech","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-21T11:40:11.000Z","size":16923,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-21T13:32:23.387Z","etag":null,"topics":["2fa-security","jwt-token","mongodb-database","nextjs","nodejs","rate-limiting","redis-cache","shadcn-ui","tailwind-css","typescript","zod"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ilkaytech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-01T17:26:03.000Z","updated_at":"2025-08-21T11:40:15.000Z","dependencies_parsed_at":"2025-02-01T03:27:28.714Z","dependency_job_id":"47d68c76-caf6-4269-ab51-1b937ca306e6","html_url":"https://github.com/ilkaytech/Advanced-MERN-Auth","commit_stats":null,"previous_names":["ilkaytech/advanced-mern-auth"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ilkaytech/Advanced-MERN-Auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilkaytech%2FAdvanced-MERN-Auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilkaytech%2FAdvanced-MERN-Auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilkaytech%2FAdvanced-MERN-Auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilkaytech%2FAdvanced-MERN-Auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ilkaytech","download_url":"https://codeload.github.com/ilkaytech/Advanced-MERN-Auth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilkaytech%2FAdvanced-MERN-Auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31704492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T21:17:31.016Z","status":"online","status_checked_at":"2026-04-12T02:00:06.763Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2fa-security","jwt-token","mongodb-database","nextjs","nodejs","rate-limiting","redis-cache","shadcn-ui","tailwind-css","typescript","zod"],"created_at":"2024-12-05T03:14:40.006Z","updated_at":"2026-04-12T04:34:07.037Z","avatar_url":"https://github.com/ilkaytech.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advanced Authentication System with Node.js, TypeScript, 2FA, JWT, Sessions \u0026 Next.js\n\nA full-stack, secure authentication boilerplate built using **Node.js**, **Express**, **TypeScript**, and **Next.js**. It includes modern auth features like **email verification**, **2FA**, **access \u0026 refresh tokens**, **cookie-based sessions**, and more — all production-ready.\n\n---\n\n## Key Features\n\n### Backend (Node.js + Express + TypeScript)\n\n- **Modular Architecture** — Clean, scalable folder structure\n- **MongoDB (Mongoose)** for schema modeling\n- **User Registration \u0026 Login**\n- **Email Verification with Resend**\n- **Password Reset via Email**\n- **Access \u0026 Refresh Tokens (JWT)**\n- **Secure Cookies for Session Management**\n- **Two-Factor Authentication (2FA)** using `speakeasy` and `qrcode`\n- **Passport.js with JWT strategy**\n- **Rate Limiting** middleware for brute-force protection\n- **Environment-based Config with dotenv**\n- **Validation with Zod**\n\n---\n\n### Frontend (Next.js + TypeScript + Tailwind CSS)\n\n- **Reusable Auth Forms** (Sign up / Login)\n- **Email Confirmation Page**\n- **Protected Routes with Middleware**\n- **User Dashboard with Session Info**\n- **2FA Setup \u0026 Verification Flow**\n- **Active Session Tracking \u0026 Management**\n- **Logout with Secure Session Termination**\n- **Light \u0026 Dark Mode UI**\n\n---\n\n## Getting Started\n\n### Backend\n\n```bash\ncd backend\nnpm install\nnpm run dev\n```\n\n\u003e Create a `.env` file and set up Mongo URI, JWT secrets, Resend API key, etc.\n\n### Frontend\n\n```bash\ncd frontend\nnpm install\nnpm run dev\n```\n\n---\n\n## 📌 Tech Stack\n\n- **Backend**: Node.js, Express, MongoDB, TypeScript, Passport, JWT\n- **Frontend**: Next.js, React, Tailwind CSS\n- **Security**: Bcrypt, JWT, 2FA, Cookie-based auth, Rate limiting\n- **Utilities**: Zod, Resend, dotenv, qrcode\n\n---\n\n## API Documentation\n\n**Swagger**\n\n- 🔗 [View Swagger UI](http://api-docs)\n- 🔗 [Download Swagger JSON](http://api-docs-json)\n\nYou can import the JSON file into tools like **Postman**\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"screenshots/swagger-ui.png\" alt=\"Swagger UI Screenshot\" width=\"600\" /\u003e\n\u003c/p\u003e\n\n---\n\nApplication Screenshots\n\n\u003cp align=\"center\"\u003e \u003ca href=\"screenshots/Sign in.png\" target=\"_blank\"\u003e\u003cimg src=\"screenshots/Sign in.png\" width=\"180\" alt=\"Sign In\" /\u003e\u003c/a\u003e \u003ca href=\"screenshots/Sign up.png\" target=\"_blank\"\u003e\u003cimg src=\"screenshots/Sign up.png\" width=\"180\" alt=\"Sign Up\" /\u003e\u003c/a\u003e \u003ca href=\"screenshots/Reset-password.png\" target=\"_blank\"\u003e\u003cimg src=\"screenshots/Reset-password.png\" width=\"180\" alt=\"Check Email\" /\u003e\u003c/a\u003e \u003ca href=\"screenshots/confirm-your-email.png\" target=\"_blank\"\u003e\u003cimg src=\"screenshots/confirm-your-email.png\" width=\"180\" alt=\"Confirm Email\" /\u003e\u003c/a\u003e \u003ca href=\"screenshots/account-confirmation.png\" target=\"_blank\"\u003e\u003cimg src=\"screenshots/account-confirmation.png\" width=\"180\" alt=\"Account Confirmation\" /\u003e\u003c/a\u003e \u003ca href=\"screenshots/check-your-email.png\" target=\"_blank\"\u003e\u003cimg src=\"screenshots/check-your-email.png\" width=\"180\" alt=\"2FA Setup\" /\u003e\u003c/a\u003e \u003ca href=\"screenshots/session-list.png\" target=\"_blank\"\u003e\u003cimg src=\"screenshots/session-list.png\" width=\"180\" alt=\"Session List\" /\u003e\u003c/a\u003e \u003ca href=\"screenshots/dashboard_1.png\" target=\"_blank\"\u003e\u003cimg src=\"screenshots/dashboard_1.png\" width=\"180\" alt=\"Dashboard\" /\u003e\u003c/a\u003e \u003ca href=\"screenshots/2FA-Setup.png\" target=\"_blank\"\u003e\u003cimg src=\"screenshots/2FA-Setup.png\" width=\"180\" alt=\"Reset Password\" /\u003e\u003c/a\u003e \u003ca href=\"screenshots/Log-out.png\" target=\"_blank\"\u003e\u003cimg src=\"screenshots/Log-out.png\" width=\"180\" alt=\"Logout\" /\u003e\u003c/a\u003e \u003ca href=\"screenshots/dark-mode.png\" target=\"_blank\"\u003e\u003cimg src=\"screenshots/dark-mode.png\" width=\"180\" alt=\"Dark Mode\" /\u003e\u003c/a\u003e \u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filkaytech%2Fadvanced-mern-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filkaytech%2Fadvanced-mern-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filkaytech%2Fadvanced-mern-auth/lists"}