Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/greeenboi/nextjs-supabase-template
Template Repository that I use for my projects
https://github.com/greeenboi/nextjs-supabase-template
eslint husky nextjs14 prettier prettier-eslint shadcn-ui supabase supabase-auth supabase-ssr tailwindcss template template-repository transition-loader typescript
Last synced: 28 days ago
JSON representation
Template Repository that I use for my projects
- Host: GitHub
- URL: https://github.com/greeenboi/nextjs-supabase-template
- Owner: greeenboi
- License: mit
- Created: 2024-08-26T13:56:10.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2024-08-31T06:53:27.000Z (2 months ago)
- Last Synced: 2024-09-28T10:41:47.802Z (about 1 month ago)
- Topics: eslint, husky, nextjs14, prettier, prettier-eslint, shadcn-ui, supabase, supabase-auth, supabase-ssr, tailwindcss, template, template-repository, transition-loader, typescript
- Language: TypeScript
- Homepage:
- Size: 86.9 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NextJs 14 + Supabase SWR Starter Template
This is a starter template for Next.js 14 and Supabase with SWR.
## Getting Started
First, get this project by installing it:
```bash
npx degit greeenboi/nextjs-supabase-template```
## Environment Variables
Create a `.env.local` file in the root of the project and add the following environment variables:
```text
NEXT_PUBLIC_SUPABASE_URL=https://.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=
```## Running the Development Server
```bash
npm run dev
# or
pnpm run dev```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
## Features
The repository includes the following features:
- Supabase authentication ( [SWR](https://supabase.com/docs/guides/auth/server-side/nextjs) )
- [Shadcn UI](https://supabase.com/docs/guides/auth/server-side/nextjs) for styling ( sonner has been setup too )
- [SWR](https://swr.vercel.app/) for data fetching
- [prettier](https://prettier.io/) for code formatting
- [eslint](https://eslint.org/) for code linting
- [husky](https://typicode.github.io/husky/#/) for pre-commit hooks ( goto #husky for more info )
- [react-transition-progress](https://github.com/vercel/react-transition-progress) for page transition loader## Husky
Husky is a tool that can prevent bad `git commit`, `git push`, and more. It can be used to run scripts (like linting, tests, etc.) before committing or pushing code.
This repository uses Husky to run `eslint` and `prettier` before committing code. If there are any errors, Husky will prevent the commit.
To Use Husky:
```bash
git add -A
git commit -m "Your commit message"
```And Husky will run the `pre-commit` script before committing the code.
> To disable husky, remove the `lint-staged` field from the `package.json` file and delete the `.husky` folder.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
> made with 💖 by [greeenboi](https://github.com/greeenboi)