1.0.0 ⢠Published 5 months ago
@vidaize/nextjs-convex-clerk-starter v1.0.0
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
- Next.js 14 - React framework
- Convex - Backend database and real-time sync
- Clerk - Authentication and user management
- Tailwind CSS - Styling
- next-themes - Dark mode support
Getting Started
Prerequisites
- Node.js 18+
- pnpm (recommended) or npm
- Convex account
- Clerk account
Installation
- Clone the repository:
git clone https://github.com/VidAIze/NextJS-Convex-Clerk-Starter-Templete.git
cd NextJS-Convex-Clerk-Starter-Templete
- Install dependencies:
pnpm install
- 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=/
- Initialize Convex:
pnpm dlx convex dev
- 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.
1.0.0
5 months ago