1.0.0 • Published 5 months ago

@vidaize/nextjs-convex-clerk-starter v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Next.js Blog Template with Convex and Clerk

A modern, full-stack blog application built with Next.js, Convex, and Clerk. Features dark mode support, real-time updates, and authentication.

Features

  • šŸ” Authentication with Clerk
  • šŸ“ Real-time blog post creation and updates
  • šŸŒ“ Dark mode support with next-themes
  • šŸŽØ Modern UI with Tailwind CSS
  • šŸš€ Real-time database with Convex
  • šŸ”„ Optimistic updates
  • šŸ“± Fully responsive design
  • šŸ‘¤ User profiles and avatars

Tech Stack

Getting Started

Prerequisites

  • Node.js 18+
  • pnpm (recommended) or npm
  • Convex account
  • Clerk account

Installation

  1. Clone the repository:
git clone https://github.com/VidAIze/NextJS-Convex-Clerk-Starter-Templete.git
cd NextJS-Convex-Clerk-Starter-Templete
  1. Install dependencies:
pnpm install
  1. Create a .env.local file in the root directory and add your environment variables:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/
  1. Initialize Convex:
pnpm dlx convex dev
  1. Start the development server:
pnpm dev

The application should now be running at http://localhost:3000.

Project Structure

ā”œā”€ā”€ app/                    # Next.js app directory
│   ā”œā”€ā”€ blog/              # Blog page
│   ā”œā”€ā”€ dashboard/         # Dashboard page
│   ā”œā”€ā”€ sign-in/          # Sign in page
│   └── sign-up/          # Sign up page
ā”œā”€ā”€ components/            # React components
│   ā”œā”€ā”€ loading.tsx       # Loading states
│   ā”œā”€ā”€ theme-menu.tsx    # Theme switcher
│   └── providers/        # Context providers
ā”œā”€ā”€ convex/               # Convex backend
│   ā”œā”€ā”€ schema.ts        # Database schema
│   ā”œā”€ā”€ posts.ts         # Post-related functions
│   └── users.ts         # User-related functions
ā”œā”€ā”€ hooks/               # Custom React hooks
└── lib/                # Utility functions

Features in Detail

Authentication

  • Secure authentication with Clerk
  • Protected routes and API endpoints
  • User profile management

Blog System

  • Create and read blog posts
  • Real-time updates
  • Author information display
  • Formatted dates
  • Responsive layout

Theme System

  • System theme detection
  • Light and dark mode support
  • Persistent theme preference
  • Smooth theme transitions

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.