Skip to content

Commit

Permalink
feat(repo): init nextjs project
Browse files Browse the repository at this point in the history
Initialized the NextJS project with pnpm. Added essential local ci configs like husky and
lintstaged. Added shadcn. Added t3-env. Updated the dependabot yaml so that node types don't get
changed without manual input.
  • Loading branch information
rikhall1515 committed Apr 7, 2024
1 parent 25ff8e5 commit 83a365b
Show file tree
Hide file tree
Showing 37 changed files with 5,684 additions and 25 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["next/core-web-vitals", "prettier"]
}
53 changes: 28 additions & 25 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,54 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: '/'
directory: "/"
schedule:
interval: monthly
labels:
- 'github_actions:pull-request'
- "github_actions:pull-request"
commit-message:
prefix: meta
open-pull-requests-limit: 10
- package-ecosystem: npm # See documentation for possible values
directory: '/' # Location of package manifests
directory: "/" # Location of package manifests
schedule:
interval: 'monthly'
interval: "monthly"
versioning-strategy: increase
labels:
- 'github_actions:pull-request'
- "github_actions:pull-request"
commit-message:
prefix: meta
groups:
lint:
patterns:
- '@typescript-eslint/*'
- 'eslint'
- 'eslint-*'
- 'stylelint'
- 'stylelint-*'
- "@typescript-eslint/*"
- "eslint"
- "eslint-*"
- "stylelint"
- "stylelint-*"
exclude-patterns:
- 'eslint-plugin-storybook'
- "eslint-plugin-storybook"
next-js:
patterns:
- 'next'
- 'turbo'
- 'next-mdx-remote'
- 'next-sitemap'
- 'next-themes'
- '@vercel/*'
- "next"
- "turbo"
- "next-mdx-remote"
- "next-sitemap"
- "next-themes"
- "@vercel/*"
react:
patterns:
- 'react'
- 'react-dom'
- '@types/react'
- '@types/react-dom'
- "react"
- "react-dom"
- "@types/react"
- "@types/react-dom"
tailwind:
patterns:
- '@savvywombat/tailwindcss-grid-areas'
- 'prettier-plugin-tailwindcss'
- 'tailwindcss'
- "@savvywombat/tailwindcss-grid-areas"
- "prettier-plugin-tailwindcss"
- "tailwindcss"
ignore:
# Manually update major versions of @types/node with the version specified within .nvmrc
- dependency-name: "@types/node"
update-types: ["version-update:semver-major"]
open-pull-requests-limit: 10

36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# lint and format staged files
npx lint-staged

# verify typescript staged files
npx tsc --build .
1 change: 1 addition & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm run build
1 change: 1 addition & 0 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
exec < /dev/tty && npx cz --hook || true
14 changes: 14 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
// Type check TypeScript files
"*/**/*.(ts|tsx)": () => "npx tsc --noEmit",

// Lint & Prettify TS and JS files
"*/**/*.(ts|tsx|js)": [
`prettier --write`,
`eslint`
],

// Prettify only Markdown and JSON files
"*/**/*.(md|json|css)":
`prettier --write`,
};
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
17 changes: 17 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.husky
dist
.next
.cache
package-lock.json
pnpm-lock.yaml
public
node_modules
next-env.d.ts
next.config.mjs
package.json
postcss.config.js
tailwind.config.ts
tsconfig.json
components.json
.lintstagedrc.js
.vercel
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"plugins": ["prettier-plugin-tailwindcss"],
"trailingComma": "es5",
"semi": true,
"singleQuote": false,
"printWidth": 80
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"editor.formatOnPaste": true,
"editor.formatOnSave": true
}
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
Binary file added app/favicon.ico
Binary file not shown.
76 changes: 76 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;

--card: 0 0% 100%;
--card-foreground: 222.2 84% 4.9%;

--popover: 0 0% 100%;
--popover-foreground: 222.2 84% 4.9%;

--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;

--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;

--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;

--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;

--destructive: 0 84.2% 60.2%;
--destructive-foreground: 210 40% 98%;

--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;
--ring: 222.2 84% 4.9%;

--radius: 0.5rem;
}

.dark {
--background: 222.2 84% 4.9%;
--foreground: 210 40% 98%;

--card: 222.2 84% 4.9%;
--card-foreground: 210 40% 98%;

--popover: 222.2 84% 4.9%;
--popover-foreground: 210 40% 98%;

--primary: 210 40% 98%;
--primary-foreground: 222.2 47.4% 11.2%;

--secondary: 217.2 32.6% 17.5%;
--secondary-foreground: 210 40% 98%;

--muted: 217.2 32.6% 17.5%;
--muted-foreground: 215 20.2% 65.1%;

--accent: 217.2 32.6% 17.5%;
--accent-foreground: 210 40% 98%;

--destructive: 0 62.8% 30.6%;
--destructive-foreground: 210 40% 98%;

--border: 217.2 32.6% 17.5%;
--input: 217.2 32.6% 17.5%;
--ring: 212.7 26.8% 83.9%;
}
}

@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}
22 changes: 22 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";

const inter = Inter({ subsets: ["latin"] });

export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
};

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
);
}
Loading

0 comments on commit 83a365b

Please sign in to comment.