A fullstack blog template built with Next.js and Supabase.
- ⚡️ Latest Next.js version and configuration
- 💾 Supabase for database for storage
- 🎨 Tailwind CSS for styling and Shadcn UI for components
- 📱 Responsive design
- 🔍 SEO optimized
This project provides two setup scripts - one for Unix-based systems (macOS, Linux) and one for Windows.
- Node.js 20+ (specified in .nvmrc)
- npm
- Supabase account (free tier available)
-
Clone this repository
-
Make the setup script executable:
chmod +x setup.sh
-
Run the setup script:
./setup.sh
-
Set up your Supabase environment variables:
- Create a project in Supabase
- Copy your Supabase URL and anon key
- Update
.env.localwith your Supabase credentials
-
Start the development server:
npm run dev
-
Clone this repository
-
Open PowerShell with administrator privileges
-
You may need to set the execution policy to run the script:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
-
Run the PowerShell setup script:
.\setup.ps1
-
Set up your Supabase environment variables:
- Create a project in Supabase
- Copy your Supabase URL and anon key
- Update
.env.localwith your Supabase credentials
-
Start the development server:
npm run dev
This template is designed to work with the Cursor IDE and its AI agent (composer). To get started:
-
Run with Cursor Composer
- Open Cursor IDE
- Press
Cmd + I(Mac) orCtrl + I(Windows/Linux) to open the Cursor Composer - Add both
.cursor/rules/base.mdcand.cursor/tasks/init.mdto the composer context - Use the following prompt:
Go through each task in the init.md file. After you complete each task, update the file to check off any task. Run builds and commits after each task. Continue with each task until you have checked off each one. After each story, do not take a screenshot. If you need more detail about a task, you can gather relevant files and pass the FULL file to the research agent.
-
Monitor Progress
- The agent will work through each task in order
- Tasks will be checked off automatically as they're completed
- Commits will be made after each task
- You can monitor progress in the cursor-tasks.md file
After setting up your Supabase project, you'll need to create the necessary tables and seed data:
- In your Supabase dashboard, navigate to the SQL Editor
- Create the required tables by running the SQL scripts in the
.cursor/tasks/init.mdfile - Seed the database with sample data using the provided queries
src/
├── app/ # Next.js App Router
│ ├── blog/ # Blog routes
│ │ ├── [slug]/ # Individual blog post route
│ │ └── page.tsx # Blog listing page
│ ├── layout.tsx # Root layout
│ └── page.tsx # Homepage
├── components/ # React components
│ ├── blog/ # Blog-specific components
│ │ ├── markdown-renderer.tsx
│ │ ├── post-card.tsx
│ │ ├── post-grid.tsx
│ │ └── post-header.tsx
│ ├── ui/ # Shadcn UI components
│ ├── footer.tsx # Site footer
│ └── header.tsx # Site header
└── lib/ # Utility functions
├── api.ts # API functions for Supabase
├── database.ts # TypeScript types for database
├── supabase.ts # Supabase client initialization
└── utils.ts # General utility functions
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
