precedent
precedent copied to clipboard
An opinionated collection of components, hooks, and utilities for your Next.js project.
Precedent
Building blocks for your Next project
Introduction · One-click Deploy · Tech Stack + Features · Author
Introduction
Precedent is an opinionated collection of components, hooks, and utilities for your Next.js project.
One-click Deploy
You can deploy this template to Vercel with the button below:
You can also clone & create this repo locally with the following command:
npx create-next-app precedent --example "https://github.com/steven-tey/precedent"
Tech Stack + Features
https://user-images.githubusercontent.com/28986134/212368288-12f41e37-aa8c-4e0a-a542-cf6d23410a65.mp4
Frameworks
- Next.js – React framework for building performant apps with the best developer experience
- Auth.js – Handle user authentication with ease with providers like Google, Twitter, GitHub, etc.
- Prisma – Typescript-first ORM for Node.js
Platforms
- Vercel – Easily preview & deploy changes with git
- Railway – Easily provision a PostgreSQL database (no login required)
UI
- Tailwind CSS – Utility-first CSS framework for rapid UI development
- Radix – Primitives like modal, popover, etc. to build a stellar user experience
- Framer Motion – Motion library for React to animate components with ease
- Lucide – Beautifully simple, pixel-perfect icons
@next/font– Optimize custom fonts and remove external network requests for improved performance@vercel/og– Generate dynamic Open Graph images on the edgereact-wrap-balancer– Simple React component that makes titles more readable
Hooks and Utilities
useIntersectionObserver– React hook to observe when an element enters or leaves the viewportuseLocalStorage– Persist data in the browser's local storageuseScroll– React hook to observe scroll position (example)nFormatter– Format numbers with suffixes like1.2kor1.2Mcapitalize– Capitalize the first letter of a stringtruncate– Truncate a string to a specified lengthuse-debounce– Debounce a function call / state update
Code Quality
- TypeScript – Static type checker for end-to-end typesafety
- Prettier – Opinionated code formatter for consistent code style
- ESLint – Pluggable linter for Next.js and TypeScript
Miscellaneous
- Vercel Analytics – Track unique visitors, pageviews, and more in a privacy-friendly way
Author
- Steven Tey (@steventey)