{"id":18823055,"url":"https://github.com/sivamani-18/nextjs-boilerplate","last_synced_at":"2026-01-30T00:01:53.664Z","repository":{"id":250155097,"uuid":"833583256","full_name":"Sivamani-18/nextjs-boilerplate","owner":"Sivamani-18","description":"This is a boilerplate project for building a Next.js application with TypeScript, Tailwind CSS, dynamic routes, and theme toggling (light/dark mode).","archived":false,"fork":false,"pushed_at":"2024-08-28T10:07:09.000Z","size":4558,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T12:04:27.164Z","etag":null,"topics":["boilerplate","boilerplate-front-end","dark-light-theme","dark-mode","dynamic-routes","frontend","light-mode","nextjs","nextjs-boilerplate","nextjs-starter","nextjs-typescript-boilerplate","nextjs-typescript-tailwindcss","nextjs-typescript-template","react","starter-kit","tailwindcss","theme-switching","theme-toggling","typescript","web-development"],"latest_commit_sha":null,"homepage":"https://sivamani-18.github.io/nextjs-boilerplate/","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/Sivamani-18.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}},"created_at":"2024-07-25T10:41:48.000Z","updated_at":"2024-08-28T10:06:31.000Z","dependencies_parsed_at":"2024-07-25T14:28:33.174Z","dependency_job_id":"10cf280d-36e0-4d6e-a4ed-4c7c92dca586","html_url":"https://github.com/Sivamani-18/nextjs-boilerplate","commit_stats":null,"previous_names":["sivamani-18/nextjs-boilerplate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Sivamani-18/nextjs-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sivamani-18%2Fnextjs-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sivamani-18%2Fnextjs-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sivamani-18%2Fnextjs-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sivamani-18%2Fnextjs-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sivamani-18","download_url":"https://codeload.github.com/Sivamani-18/nextjs-boilerplate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sivamani-18%2Fnextjs-boilerplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28891319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T21:06:44.224Z","status":"ssl_error","status_checked_at":"2026-01-29T21:06:42.160Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["boilerplate","boilerplate-front-end","dark-light-theme","dark-mode","dynamic-routes","frontend","light-mode","nextjs","nextjs-boilerplate","nextjs-starter","nextjs-typescript-boilerplate","nextjs-typescript-tailwindcss","nextjs-typescript-template","react","starter-kit","tailwindcss","theme-switching","theme-toggling","typescript","web-development"],"created_at":"2024-11-08T00:52:36.892Z","updated_at":"2026-01-30T00:01:53.649Z","avatar_url":"https://github.com/Sivamani-18.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next.js Boilerplate\n\nThis is a boilerplate project for building a Next.js application with TypeScript, Tailwind CSS, dynamic routes, and theme toggling (light/dark mode).\n\n## Demo\n- \u003ca href=\"https://sivamani-18.github.io/nextjs-boilerplate/\" target=\"_blank\"\u003eExample Demo Link\u003c/a\u003e\n\n## Features\n\n- [Next.js](https://nextjs.org/) - The React framework for production.\n- [TypeScript](https://www.typescriptlang.org/) - Typed JavaScript at Any Scale.\n- [Tailwind CSS](https://tailwindcss.com/) - A utility-first CSS framework for rapid UI development.\n- Dynamic routes for blog posts.\n- Light and Dark mode theme toggling.\n- Loader displayed during theme transitions\n\n## Getting Started\n\n### Prerequisites\n\nEnsure you have the following installed:\n\n- [Node.js](https://nodejs.org/) (version 18.x or later)\n- [npm](https://www.npmjs.com/) or [Yarn](https://yarnpkg.com/)\n\n### Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/Sivamani-18/nextjs-boilerplate.git\n   cd nextjs-boilerplate\n   ```\n\n2. Install dependencies:\n   ```bash\n   npm install\n   # or\n   yarn install\n   ```\n\n3. Run the development server:\n   ```bash\n   npm run dev\n   # or\n   yarn dev\n   ```\n\n4. Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\n### Project Structure\n\n```\nmy-next-app/\n├── app/\n│   ├── blog/\n│   │   └── [slug]/\n│   │       └── page.tsx\n│   ├── dashboard/\n│   │   ├── analytics/\n│   │   │   └── page.tsx\n│   │   ├── settings/\n│   │   │   ├── password/\n│   │   │   │   └── page.tsx\n│   │   │   ├── profile/\n│   │   │   │   └── page.tsx\n│   │   │   └── page.tsx\n│   │   └── page.tsx\n│   ├── layout.tsx\n│   ├── page.tsx\n│   ├── globals.css\n├── components/\n│   ├── layout/\n│   │   ├── Header.tsx\n│   │   ├── Footer.tsx\n│   │   ├── Layout.tsx\n│   │   └── NavMenu.tsx\n│   ├── ui/\n│   │   ├── Button.tsx\n│   │   ├── Card.tsx\n│   │   ├── Loader.tsx\n│   │   └── ThemeToggle.tsx\n│   └── theme/\n│       └── useTheme.ts\n├── pages/\n│   ├── api/\n│   │   └── posts/\n│   │       └── [slug].ts\n├── public/\n├── styles/\n│   └── tailwind.css\n├── tailwind.config.js\n├── tsconfig.json\n└── ...\n```\n\n### Implementing Features\n\n#### Theme Toggle\n\nThe theme toggle is implemented using the `ThemeToggle` component, which switches between light and dark modes. It uses local storage to persist the theme preference across sessions.\n\n#### Loader\n\nA loader is displayed while the theme is being applied. This ensures a smooth user experience during theme transitions.\n\n### Customization\n\n#### Tailwind CSS Configuration\n\nYou can customize Tailwind CSS by modifying the `tailwind.config.js` file.\n\n```js\n/** @type {import('tailwindcss').Config} */\nmodule.exports = {\n  content: [\n    './app/**/*.{js,ts,jsx,tsx}',\n    './components/**/*.{js,ts,jsx,tsx}',\n  ],\n  darkMode: 'class', // Enable dark mode with the 'class' strategy\n  theme: {\n    extend: {\n      colors: {\n        primary: {\n          light: '#1DA1F2',\n          dark: '#0D6EFD',\n        },\n        background: {\n          light: '#ffffff',\n          dark: '#121212',\n        },\n        text: {\n          light: '#000000',\n          dark: '#ffffff',\n        },\n      },\n    },\n  },\n  plugins: [],\n};\n```\n\n### Adding New Pages\n\nTo add new pages, create a new directory or file in the `app` directory. For example, to add a new settings page under the dashboard:\n\n1. Create a new directory: `app/dashboard/settings/new-page`.\n2. Add a `page.tsx` file inside this directory with your component code.\n\n```tsx\n// app/dashboard/settings/new-page/page.tsx\nimport React from 'react';\n\nconst NewPage = () =\u003e {\n  return (\n    \u003cdiv\u003e\n      \u003ch1\u003eNew Page\u003c/h1\u003e\n    \u003c/div\u003e\n  );\n};\n\nexport default NewPage;\n```\n\n### API Routes\n\nAPI routes can be created in the `pages/api` directory. For example, the blog post data fetching is handled by an API route:\n\n```ts\n// pages/api/posts/[slug].ts\nimport type { NextApiRequest, NextApiResponse } from 'next';\n\nconst posts = {\n  'first-post': { title: 'First Post', content: 'This is the content of the first post.' },\n  'second-post': { title: 'Second Post', content: 'This is the content of the second post.' },\n};\n\ntype PostsType = typeof posts;\ntype PostSlug = keyof PostsType;\n\nexport default function handler(req: NextApiRequest, res: NextApiResponse) {\n  const { slug } = req.query;\n\n  if (typeof slug === 'string' \u0026\u0026 (slug in posts)) {\n    const post = posts[slug as PostSlug];\n    res.status(200).json(post);\n  } else {\n    res.status(404).json({ error: 'Post not found' });\n  }\n}\n```\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsivamani-18%2Fnextjs-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsivamani-18%2Fnextjs-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsivamani-18%2Fnextjs-boilerplate/lists"}