Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
w3cj committed Dec 31, 2024
2 parents 72ef34e + 2dda007 commit a39976c
Show file tree
Hide file tree
Showing 8 changed files with 489 additions and 483 deletions.
80 changes: 80 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
target-branch: "base"
groups:
updates:
applies-to: version-updates
patterns:
- "*"
update-types:
- "minor"
- "patch"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
target-branch: "nextui"
groups:
updates:
applies-to: version-updates
patterns:
- "*"
update-types:
- "minor"
- "patch"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
target-branch: "typesafe-env"
groups:
updates:
applies-to: version-updates
patterns:
- "*"
update-types:
- "minor"
- "patch"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
target-branch: "next-auth"
groups:
updates:
applies-to: version-updates
patterns:
- "*"
update-types:
- "minor"
- "patch"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
target-branch: "drizzle"
groups:
updates:
applies-to: version-updates
patterns:
- "*"
update-types:
- "minor"
- "patch"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
target-branch: "main"
groups:
updates:
applies-to: version-updates
patterns:
- "*"
update-types:
- "minor"
- "patch"
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/db/migrations/*
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License Copyright (c) 2024 w3cj

Permission is hereby granted, free of
charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the
following conditions:

The above copyright notice and this permission notice
(including the next paragraph) shall be included in all copies or substantial
portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
113 changes: 112 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,114 @@
# Next Start

A basic Next.js starter with sensible defaults for eslint, prettier, typescript and vscode.
A basic Next.js starter.

- [Next Start](#next-start)
- [Stack](#stack)
- [Branches](#branches)
- [Setup](#setup)
- [Resources](#resources)

## Stack

- Linting / Code Style
- [eslint](https://www.npmjs.com/package/eslint)
- [eslint-config-prettier](https://www.npmjs.com/package/eslint-config-prettier)
- [ESLint | Next.js](https://nextjs.org/docs/app/building-your-application/configuring/eslint#prettier)
- [eslint-plugin-check-file](https://www.npmjs.com/package/eslint-plugin-check-file)
- [Bulletproof React Guide](https://github.com/alan2207/bulletproof-react/blob/master/docs/project-standards.md#file-naming-conventions)
- [eslint-plugin-n](https://www.npmjs.com/package/eslint-plugin-n)
- [prettier](https://www.npmjs.com/package/prettier)
- [@trivago/prettier-plugin-sort-imports](https://www.npmjs.com/package/@trivago/prettier-plugin-sort-imports)
- [prettier-plugin-tailwindcss](https://www.npmjs.com/package/prettier-plugin-tailwindcss)
- [Automatic Class Sorting](https://tailwindcss.com/blog/automatic-class-sorting-with-prettier#how-classes-are-sorted)
- Environment Variables
- [dotenv](https://www.npmjs.com/package/dotenv)
- [dotenv-expand](https://www.npmjs.com/package/dotenv-expand)
- [@t3-oss/env-nextjs](https://www.npmjs.com/package/@t3-oss/env-nextjs)
- [Documentation](https://env.t3.gg/docs/nextjs)
- [cross-env](https://www.npmjs.com/package/cross-env)
- Styles / UI
- [tailwindcss](https://www.npmjs.com/package/tailwindcss)
- [@nextui-org/react](https://www.npmjs.com/package/@nextui-org/react)
- [NextUI](https://nextui.org/docs/guide/introduction)
- [next-themes](https://www.npmjs.com/package/next-themes)
- [@tabler/icons-react](https://www.npmjs.com/package/@tabler/icons-react)
- [Tabler Icon Search](https://tabler.io/icons)
- Validation
- [zod](https://www.npmjs.com/package/zod)
- [@conform-to/zod](https://www.npmjs.com/package/@conform-to/zod)
- [Conform | Next.js](https://conform.guide/integration/nextjs)
- [drizzle-zod](https://www.npmjs.com/package/drizzle-zod)
- [Drizzle Zod Docs](https://orm.drizzle.team/docs/zod)
- Forms
- [@conform-to/react](https://www.npmjs.com/package/@conform-to/react)
- Database
- [drizzle-orm](https://www.npmjs.com/package/drizzle-orm)
- [postgres](https://www.npmjs.com/package/postgres)
- [drizzle-kit](https://www.npmjs.com/package/drizzle-kit)
- Authentication
- [next-auth](https://www.npmjs.com/package/next-auth)
- [@auth/drizzle-adapter](https://www.npmjs.com/package/@auth/drizzle-adapter)
- [Auth.js Drizzle Adapter Documentation](https://authjs.dev/getting-started/adapters/drizzle)

## Branches

The main branch contains the entire setup. The following branches build on each other from top to bottom:

- [base](https://github.com/w3cj/next-start/tree/base)
- eslint / prettier settings
- [nextui](https://github.com/w3cj/next-start/tree/nextui)
- layout / styles
- dark / light theme toggle
- [typesafe-env](https://github.com/w3cj/next-start/tree/typesafe-env)
- typesafe environment variables
- [next-auth](https://github.com/w3cj/next-start/tree/next-auth)
- google oauth with no database
- [drizzle](https://github.com/w3cj/next-start/tree/drizzle) / [main](https://github.com/w3cj/next-start)
- basic drizzle schema with users / accounts / sessions

## Setup

1. Install dependencies:

```sh
pnpm install
```

2. Copy the `.env` file:

```sh
cp .env.example .env
```

3. Update the following values in the `.env` file:

```sh
NEXTAUTH_SECRET=your-value-here
GOOGLE_CLIENT_ID=your-value-here
GOOGLE_CLIENT_SECRET=your-value-here
```

4. Start the database:

```sh
docker compose up
```

5. Migrate the database:

```sh
pnpm run db:migrate
```

6. Start the app:

```sh
pnpm run dev
```

## Resources

- [Next.js Discord FAQs](https://nextjs-faq.com/)
- ["Module not found" error on deployment but build works fine locally](https://nextjs-faq.com/module-not-found-due-to-case-sensitivity)
- [Bulletproof React](https://github.com/alan2207/bulletproof-react)
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "next-start",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
Expand All @@ -18,7 +17,7 @@
"@t3-oss/env-nextjs": "^0.11.1",
"@tabler/icons-react": "^3.26.0",
"dotenv": "^16.4.7",
"dotenv-expand": "^11.0.6",
"dotenv-expand": "^12.0.1",
"drizzle-orm": "^0.38.3",
"drizzle-zod": "^0.6.1",
"framer-motion": "^11.15.0",
Expand All @@ -32,13 +31,13 @@
"zod": "^3.24.1"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@trivago/prettier-plugin-sort-imports": "^5.2.0",
"@types/node": "^22",
"@types/react": "^18",
"@types/react-dom": "^18",
"cross-env": "^7.0.3",
"drizzle-kit": "^0.30.1",
"eslint": "^8",
"eslint": "^9.17.0",
"eslint-config-next": "15.1.3",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-check-file": "^2.8.0",
Expand All @@ -48,5 +47,6 @@
"prettier-plugin-tailwindcss": "^0.6.9",
"tailwindcss": "^3.4.17",
"typescript": "^5"
}
},
"license": "MIT"
}
Loading

0 comments on commit a39976c

Please sign in to comment.