This is an easy-to-deploy Next.js starter template created by Ethan G.. It is designed to streamline development with modern tools, ensuring a fast and efficient workflow from setup to deployment.
This template leverages a modern tech stack for a smooth developer experience:
This template uses pnpm as the default package manager for faster dependency resolution and disk space efficiency. However, you can switch to npm
, yarn
, or bun
if preferred.
By default, this template enforces pnpm
. To use another package manager, follow these steps:
pnpm
EnforcementOpen package.json
and modify or remove the following lines:
"preinstall": "npx only-allow pnpm",
"prebuild": "pnpm run lint"
Run one of the following commands:
npm install # or yarn install, bun install
Now you're ready to start building! 🚀
First, clone the repository onto your local machine:
git clone https://github.com/egarrisxn/xostarter.git
cd xo-starter
Run the following command to install dependencies:
pnpm install
Launch the local development server:
pnpm dev
Once the server is running, open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx
. The page will auto-update as you edit the file. Now, get to building! 🚀
Easily customize your project by updating utils/config.ts
. This file centralizes important settings, allowing for quick adjustments without modifying multiple files.
This project utilizes shadcn/ui alongside Tailwind CSS v4.
Since Tailwind v4 is still new (as of 2/27), we are using the canary version of the shadcn/ui
CLI to add components. To install a UI component, run the following command, replacing [component]
with the actual component name:
pnpm dlx shadcn@canary add [component]
To customize the base UI colors, you'll need to reconfigure your CSS variables. Run:
pnpm dlx shadcn@canary init
This project uses next/font
for optimized font loading. By default, it includes Geist, a modern typeface by Vercel.
You can easily swap out the font for another one. I recommend using next/font
for built-in optimization or self-hosting fonts for better performance. Be mindful of font file sizes if sourcing them locally.
Since we are using the app router in Next.js 15, many metadata-related assets no longer need to be manually defined in the <Head>
of your layout. Instead, Next.js automatically picks them up when they are placed in the app
folder.
For example, the following files are already recognized by Next.js:
opengraph-image.png
& twitter-image.png
+ alt. txt files.favicon.ico
, apple-icon.png
, icon.svg
, & icon.png
.manifest.ts
, manifest.json
, manifest.webmanifest
, OR site.webmanifest
.robots.ts
OR robots.txt
& sitemap.ts
OR sitemap.xml
.Because of this, metadata properties like robots
, icons
, manifest
, and OpenGraph/Twitter images are commented out in layout.tsx
. They are left in the code for reference, but they are not necessary unless you want to override the default behavior.
If you need to customize metadata on a per-page basis, you can still define it manually inside a metadata
object in the corresponding page or layout file. Otherwise, Next.js will handle it automatically.
For generating favicons, icons, and a manifest.json
, I highly recommend visiting Real Favicon Generator and using their open-sourced tools.
This template includes Vercel Analytics for basic site tracking. After deployment, you can enable analytics through your Vercel dashboard.
If you prefer another analytics solution or are deploying elsewhere, simply uninstall the package and remove the import from layout.tsx
.
For a seamless deployment experience, use the Deploy button below to launch your project on Vercel.
Note: You are not limited to Vercel and may deploy this template on any platform that supports Next.js. However, in my experience, Vercel provides the fastest and most convenient setup.
To explore more about Next.js, check out these resources:
This project is licensed under the MIT license.
If you have any questions or need further assistance, feel free to reach out to me at github.com/garrisxn or send an email to [email protected] and I'll get back to you as soon as possible!