{"id":21019039,"url":"https://github.com/paalamugan/nextjs-web-oauth-project","last_synced_at":"2026-04-10T04:42:49.829Z","repository":{"id":62713627,"uuid":"561015169","full_name":"paalamugan/nextjs-web-oauth-project","owner":"paalamugan","description":"Web OAuth Project using ChakraUI, SCSS, Next.js, React, Redux, Redux Toolkit, TypeScript, and more.","archived":false,"fork":false,"pushed_at":"2022-11-07T14:26:27.000Z","size":856,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-20T12:44:48.015Z","etag":null,"topics":["boilerplate","chakra-ui","chakra-ui-react","commitlint","cypress","docker-compose","dockerfile","eslint-config","github-actions","jestjs","msw","nextjs","react","redux","redux-toolkit","tailwindcss","typescript","vercel"],"latest_commit_sha":null,"homepage":"https://nextjs-web-oauth.vercel.app","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/paalamugan.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}},"created_at":"2022-11-02T18:55:45.000Z","updated_at":"2022-11-10T11:02:10.000Z","dependencies_parsed_at":"2023-01-22T11:46:06.698Z","dependency_job_id":null,"html_url":"https://github.com/paalamugan/nextjs-web-oauth-project","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paalamugan%2Fnextjs-web-oauth-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paalamugan%2Fnextjs-web-oauth-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paalamugan%2Fnextjs-web-oauth-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paalamugan%2Fnextjs-web-oauth-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paalamugan","download_url":"https://codeload.github.com/paalamugan/nextjs-web-oauth-project/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243447642,"owners_count":20292455,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["boilerplate","chakra-ui","chakra-ui-react","commitlint","cypress","docker-compose","dockerfile","eslint-config","github-actions","jestjs","msw","nextjs","react","redux","redux-toolkit","tailwindcss","typescript","vercel"],"created_at":"2024-11-19T10:28:47.089Z","updated_at":"2025-12-30T19:50:18.468Z","avatar_url":"https://github.com/paalamugan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  Web OAuth Project\n\n🚀 Web OAuth ⚡️ Using with Next.js, TypeScript, ChakraUI, Google OAuth, Next Auth, ESLint, Prettier, Husky, Lint-Staged, Jest, Testing Library, Commitlint, VSCode, Netlify, SCSS.\n\n### Features\n\nDeveloper experience first:\n\n- ⚡ [Next.js](https://nextjs.org) for Static Site Generator\n- 🔥 Type checking [TypeScript](https://www.typescriptlang.org)\n- ✅ Strict Mode for TypeScript and React 18\n- 📏 Linter with [ESLint](https://eslint.org) (default NextJS, NextJS Core Web Vitals, Tailwind CSS and Airbnb configuration)\n- 💖 Code Formatter with [Prettier](https://prettier.io)\n- 🦊 Husky for Git Hooks\n- 🚫 Lint-staged for running linters on Git staged files\n- 🚓 Lint git commit with Commitlint\n- 📓 Write standard compliant commit messages with Commitizen\n- 🦺 Unit Testing with Jest and React Testing Library\n- 🧪 E2E Testing with Cypress\n- 💡 Absolute Imports using `@` prefix\n- 🗂 VSCode configuration: Debug, Settings, Tasks and extension for PostCSS, ESLint, Prettier, TypeScript, Jest\n- 🤖 SEO metadata, JSON-LD and Open Graph tags with Next SEO\n- ⚙️ [Bundler Analyzer](https://www.npmjs.com/package/@next/bundle-analyzer)\n- 🖱️ One click deployment with Vercel or Netlify (or manual deployment to any hosting services)\n- 🌈 Include a FREE minimalist theme\n- 💯 Maximize lighthouse score\n\nBuilt-in feature from Next.js:\n\n- ☕ Minify HTML \u0026 SCSS\n- 💨 Live reload\n- ✅ Cache busting\n\n### Philosophy\n\n- Minimal code\n- SEO-friendly\n- 🚀 Production-ready\n\n### Requirements\n\n- Node.js 14+ and yarn 1.22+ (or npm 6+)\n\n### Environment Variables\n\n### Getting started\n\nRun the following command on your local environment:\n\n```shell\ngit clone https://github.com/paalamugan/nextjs-web-oauth-project.git\ncd nextjs-web-oauth-project\nyarn install\n```\n\n**Environment configuration before we run the application**\n\n- Option 1\n\n  - Create `.env.local` file in the root directory and add the following environment variables:\n\n  ```shell\n  SITE_URL=http://localhost:3000 # http://localhost:3000\n  REGRES_API_BASE_URL=https://reqres.in/api # https://reqres.in/api\n  NEXTAUTH_SECRET=secret # random string\n  JWT_SECRET_KEY=secret # random string\n  NEXTAUTH_DEBUG=false # true or false\n  MONGODB_URI=mongodb://admin:adminpassword@localhost:27017/web-oauth # mongodb://admin:adminpassword@localhost:27017/web-oauth\n  GOOGLE_CLIENT_ID=\u003creplace-your-google-client-id\u003e # google client id\n  GOOGLE_CLIENT_SECRET=\u003creplace-your-google-client-secret\u003e # google client secret\n  ```\n\n- Option 2 \n\n  - Copy .env.example to .env.local and replace the values like above.\n\n  ```shell\n  cp -rf .env.example .env.local\n  ```\n\n**Make sure you have MongoDB installed and running on your local environment.**\n\n- If not then, please use the below command to run mongodb server before run the `yarn dev`.\n\n```shell\n  docker-compose up -d web-oauth-mongodb\n```\n\nThen, you can run locally in development mode with live reload:\n\n```shell\nyarn dev\n```\n\nOpen http://localhost:3000 with our favorite browser to see our project.\n\n### Run on application using docker-compose cli (Optional)\n\nBefore run the below command, We need to have docker installed in our local machine, if not please install it from [here](https://docs.docker.com/get-docker/).\n\n```shell\n  docker-compose up -d\n```\n\nRun Docker Compose with our custom environment file path using below command, by default it will use `.env` file or environment variables that we used inside `docker-compose.yml` file.\n\n```shell\ndocker-compose --env-file .env.local up -d\n```\n\n\n### Folder Structure\n\n```shell\n.\n├── README.md                       # README file\n├── __mocks__                       # Mocks for testing\n├── .github                         # GitHub folder\n├── .husky                          # Husky configuration\n├── .vscode                         # VSCode configuration\n├── public                          # Public assets folder\n├── cypress                         # Cypress folder e2e testing\n├── db                              # Init db configuration for docker-compose.yml\n├── msw                             # Mock Service Worker folder\n├── src\n│   ├── __tests__                   # Unit tests folder\n|   ├── api-helper                  # API helper folder\n│   ├── components                  # React components folder\n│   ├── constants                   # Constants folder\n│   ├── error-handlers              # Error handlers folder\n│   ├── hooks                       # React hooks folder\n│   ├── icons                       # Icons folder\n│   ├── layouts                     # Layouts components\n│   ├── lib                         # Library folder\n│   ├── page-components             # Nextjs Page components folder\n│   ├── pages                       # Next JS Pages\n│   ├── pages.test                  # Next JS Pages tests (this avoid test to treated as a Next.js pages)\n│   ├── providers                   # Providers folder\n│   ├── redux                       # Redux folder\n│   ├── styles                      # Global SCSS Styles folder\n│   ├── templates                   # Default template\n│   └── utils                       # Utility functions\n├── test-utils                      # Test utils folder\n├── typings                         # Additional Typescript typings\n├── .env.example                    # Environment variables example\n├── .eslintrc                       # ESLint configuration\n├── Dockerfile                      # Dockerfile for production\n├── docker-compose.yml              # Docker compose configuration\n├── commitlint.config.js            # Commitlint configuration\n├── cypress.config.js               # Cypress configuration\n├── tailwind.config.js              # Tailwind CSS configuration\n└── tsconfig.json                   # TypeScript configuration\n```\n\n### Deploy to production\n\nYou can see the results locally in production mode with:\n\n```shell\nyarn build\nyarn start\n```\n\nDockerfile is available for production deployment. You can build the image with:\n\n```shell\ndocker build -t web-oauth-app:latest .\n```\n\nYou can create an optimized production build with:\n\n```shell\nyarn build-prod\n```\n\nNow, Our app is ready to be deployed. All generated files are located at `out` folder, which you can deploy with any hosting service.\n\n### Testing\n\nAll tests are co-located with the source code inside the same directory. So, it makes it easier to find them. Unfortunately, it is not possible with the `pages` folder which is used by Next.js for routing. So, what is why we have a `pages.test` folder to write tests from files located in `pages` folder.\n\n### Deploy to Vercel\n\nDeploy this Web OAuth on Vercel in one click:\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/paalamugan/nextjs-web-oauth-project)\n\n### VSCode information (optional)\n\nIf you are VSCode users, you can have a better integration with VSCode by installing the suggested extension in `.vscode/extension.json`. The starter code comes up with Settings for a seamless integration with VSCode. The Debug configuration is also provided for frontend and backend debugging experience.\n\nWith the plugins installed on your VSCode, ESLint and Prettier can automatically fix the code and show you the errors. Same goes for testing, you can install VSCode Jest extension to automatically run your tests and it also show the code coverage in context.\n\nPro tips: if you need a project wide type checking with TypeScript, you can run a build with \u003ckbd\u003eCmd\u003c/kbd\u003e + \u003ckbd\u003eShift\u003c/kbd\u003e + \u003ckbd\u003eB\u003c/kbd\u003e on Mac.\n\n### Tips\n\n- Generate base64 secret key with below command\n```sh\nopenssl rand -base64 32\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaalamugan%2Fnextjs-web-oauth-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaalamugan%2Fnextjs-web-oauth-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaalamugan%2Fnextjs-web-oauth-project/lists"}