|
| 1 | +<a href="https://precedent.dev"> |
| 2 | + <img alt="Precedent – Building blocks for your Next project" src="https://precedent.dev/opengraph-image" /> |
| 3 | + <h1 align="center">Precedent</h1> |
| 4 | +</a> |
| 5 | + |
| 6 | +<p align="center"> |
| 7 | + Building blocks for your Next project |
| 8 | +</p> |
| 9 | + |
| 10 | +<p align="center"> |
| 11 | + <a href="https://twitter.com/steventey"> |
| 12 | + <img src="https://img.shields.io/twitter/follow/steventey?style=flat&label=steventey&logo=twitter&color=0bf&logoColor=fff" alt="Steven Tey Twitter follower count" /> |
| 13 | + </a> |
| 14 | + <a href="https://github.com/steven-tey/precedent"> |
| 15 | + <img src="https://img.shields.io/github/stars/steven-tey/precedent?label=steven-tey%2Fprecedent" alt="Precedent repo star count" /> |
| 16 | + </a> |
| 17 | +</p> |
| 18 | + |
| 19 | +<p align="center"> |
| 20 | + <a href="#introduction"><strong>Introduction</strong></a> · |
| 21 | + <a href="#one-click-deploy"><strong>One-click Deploy</strong></a> · |
| 22 | + <a href="#tech-stack--features"><strong>Tech Stack + Features</strong></a> · |
| 23 | + <a href="#author"><strong>Author</strong></a> |
| 24 | +</p> |
| 25 | +<br/> |
| 26 | + |
| 27 | +## Introduction |
| 28 | + |
| 29 | +Precedent is an opinionated collection of components, hooks, and utilities for your Next.js project. |
| 30 | + |
| 31 | +## One-click Deploy |
| 32 | + |
| 33 | +You can deploy this template to Vercel with the button below: |
| 34 | + |
| 35 | +[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fsteven-tey%2Fprecedent&project-name=precedent&repository-name=precedent&demo-title=Precedent&demo-description=An%20opinionated%20collection%20of%20components%2C%20hooks%2C%20and%20utilities%20for%20your%20Next%20project.&demo-url=https%3A%2F%2Fprecedent.dev&demo-image=https%3A%2F%2Fprecedent.dev%2Fopengraph-image&env=GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET,NEXTAUTH_SECRET&envDescription=How%20to%20get%20these%20env%20variables%3A&envLink=https%3A%2F%2Fgithub.com%2Fsteven-tey%2Fprecedent%2Fblob%2Fmain%2F.env.example&stores=%5B%7B"type"%3A"postgres"%7D%5D) |
| 36 | + |
| 37 | +You can also clone & create this repo locally with the following command: |
| 38 | + |
| 39 | +```bash |
| 40 | +npx create-next-app precedent --example "https://github.com/steven-tey/precedent" |
| 41 | +``` |
| 42 | + |
| 43 | +Then, install the dependencies with your package manager of choice: |
| 44 | + |
| 45 | +```bash |
| 46 | +npm i |
| 47 | +yarn |
| 48 | +pnpm i |
| 49 | +``` |
| 50 | + |
| 51 | +## Tech Stack + Features |
| 52 | + |
| 53 | +https://user-images.githubusercontent.com/28986134/212368288-12f41e37-aa8c-4e0a-a542-cf6d23410a65.mp4 |
| 54 | + |
| 55 | +### Frameworks |
| 56 | + |
| 57 | +- [Next.js](https://nextjs.org/) – React framework for building performant apps with the best developer experience |
| 58 | +- [Auth.js](https://authjs.dev/) – Handle user authentication with ease with providers like Google, Twitter, GitHub, etc. |
| 59 | +- [Prisma](https://www.prisma.io/) – Typescript-first ORM for Node.js |
| 60 | + |
| 61 | +### Platforms |
| 62 | + |
| 63 | +- [Vercel](https://vercel.com/) – Easily preview & deploy changes with git |
| 64 | +- [Vercel Postgres](https://vercel.com/postgres) – Serverless Postgres at the Edge |
| 65 | + |
| 66 | +### UI |
| 67 | + |
| 68 | +- [Tailwind CSS](https://tailwindcss.com/) – Utility-first CSS framework for rapid UI development |
| 69 | +- [Radix](https://www.radix-ui.com/) – Primitives like modal, popover, etc. to build a stellar user experience |
| 70 | +- [Framer Motion](https://framer.com/motion) – Motion library for React to animate components with ease |
| 71 | +- [Lucide](https://lucide.dev/) – Beautifully simple, pixel-perfect icons |
| 72 | +- [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) – Optimize custom fonts and remove external network requests for improved performance |
| 73 | +- [`ImageResponse`](https://nextjs.org/docs/app/api-reference/functions/image-response) – Generate dynamic Open Graph images at the edge |
| 74 | + |
| 75 | +### Hooks and Utilities |
| 76 | + |
| 77 | +- `useIntersectionObserver` – React hook to observe when an element enters or leaves the viewport |
| 78 | +- `useLocalStorage` – Persist data in the browser's local storage |
| 79 | +- `useScroll` – React hook to observe scroll position ([example](https://github.com/steven-tey/precedent/blob/main/components/layout/navbar.tsx#L12)) |
| 80 | +- `nFormatter` – Format numbers with suffixes like `1.2k` or `1.2M` |
| 81 | +- `capitalize` – Capitalize the first letter of a string |
| 82 | +- `truncate` – Truncate a string to a specified length |
| 83 | +- [`use-debounce`](https://www.npmjs.com/package/use-debounce) – Debounce a function call / state update |
| 84 | + |
| 85 | +### Code Quality |
| 86 | + |
| 87 | +- [TypeScript](https://www.typescriptlang.org/) – Static type checker for end-to-end typesafety |
| 88 | +- [Prettier](https://prettier.io/) – Opinionated code formatter for consistent code style |
| 89 | +- [ESLint](https://eslint.org/) – Pluggable linter for Next.js and TypeScript |
| 90 | + |
| 91 | +### Miscellaneous |
| 92 | + |
| 93 | +- [Vercel Analytics](https://vercel.com/analytics) – Track unique visitors, pageviews, and more in a privacy-friendly way |
| 94 | + |
| 95 | +## Author |
| 96 | + |
| 97 | +- Steven Tey ([@steventey](https://twitter.com/steventey)) |
0 commit comments