A comprehensive Next.js 13+ starter template designed to kickstart your modern web applications with a powerful GitHub markdown-based blog system and enterprise-grade features.
- GitHub Markdown Integration: Write your blog posts in markdown files stored in the
MoL-blog-content/posts/directory - Automatic Path Generation: Scripts automatically discover and index all markdown files
- Frontmatter Support: Rich metadata support including title, date, description, tags, author, and status
- Category System: Organized blog categories with automatic navigation
- Role-Based Access: Public/private post visibility with user role management
- SEO Optimized: Built-in Open Graph and Twitter card support
- Tailwind CSS: Fully configured with custom design system
- Dark Mode: Built-in dark theme with smooth transitions
- Responsive Design: Mobile-first approach with responsive layouts
- Component Library: 50+ pre-built UI components
- Typography: Beautiful typography with Tailwind Typography plugin
- Clerk Integration: Complete authentication system with user management
- Role-Based Access Control: Admin, Contributor, and User roles
- Organization Support: Multi-tenant organization management
- Protected Routes: Secure page access based on user roles
- Stripe Integration: Complete payment processing setup
- Subscription Management: Recurring billing and subscription handling
- Webhook Support: Secure webhook handling for payment events
- Price Management: Dynamic pricing and product management
- Drizzle ORM: Type-safe database operations with SQLite
- Database Migrations: Version-controlled schema changes
- User Management: Complete user profile and organization data
- Route Management: Complex scheduling and route management system
- Time Tracking: Work time and shift management
- TypeScript: Full type safety throughout the application
- ESLint & Prettier: Code quality and formatting tools
- Testing Setup: Vitest and Playwright testing configuration
- Hot Reload: Fast development with Next.js dev server
- Path Aliases: Clean imports with
#/alias
MoMegaTemplate/
├── app/ # Next.js 13+ App Router
│ ├── blog/ # Blog system pages
│ ├── api/ # API routes
│ ├── ui/ # UI components
│ └── [slug]/ # Dynamic routes
├── MoL-blog-content/ # Blog content directory
│ └── posts/ # Markdown blog posts
├── ui/ # Reusable UI components
├── utils/ # Utility functions
├── db/ # Database schema and migrations
└── public/ # Static assets
- Node.js 20.0.x or later
- pnpm (recommended) or npm
-
Clone the repository
git clone <repository-url> cd MoMegaTemplate
-
Install dependencies
pnpm install
-
Set up environment variables
cp .env.example .env.local
Configure your environment variables:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYCLERK_SECRET_KEYSTRIPE_SECRET_KEYSTRIPE_WEBHOOK_SECRET- And other required variables
-
Initialize the blog content
pnpm run setup
-
Generate markdown paths
pnpm run generate-markdown-paths
-
Start the development server
pnpm dev
Visit http://localhost:3000 to see your application!
-
Add markdown files to
MoL-blog-content/posts/ -
Use frontmatter for metadata:
--- title: "Your Post Title" date: "2024-01-15" description: "Post description" tags: ["tag1", "tag2"] author: "Author Name" status: "public" # or "private" --- Your blog post content here...
-
Regenerate paths after adding posts:
pnpm run generate-markdown-paths
- Categories: Define in
blog-schema/categories-schema.json - File Structure: Organize posts in subdirectories
- Slug Generation: Automatic URL-friendly slug generation
- Access Control: Role-based post visibility
- Modify
tailwind.config.tsfor theme customization - Update
styles/globals.cssfor global styles - Customize components in the
ui/directory
- 50+ pre-built components in
ui/directory - Reusable blog components in
ui/blog-components/ - Customizable layouts and templates
- Modify
db/schema.tsfor data structure changes - Run migrations with Drizzle Kit
- Add new API routes in
app/api/
# Run unit tests
pnpm test
# Run E2E tests
pnpm test:playwright
# Run database tests
pnpm test:dbpnpm dev- Start development serverpnpm build- Build for productionpnpm start- Start production serverpnpm lint- Run ESLintpnpm prettier- Format code with Prettierpnpm generate-markdown-paths- Generate blog post pathspnpm stripe:listen- Listen to Stripe webhooks locally
- Connect your GitHub repository to Vercel
- Configure environment variables
- Deploy automatically on push
- Configure your preferred hosting platform
- Set up environment variables
- Run
pnpm buildand serve the output
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js for the amazing React framework
- Tailwind CSS for the utility-first CSS framework
- Clerk for authentication
- Stripe for payments
- Drizzle for database management
For support and questions:
- Create an issue in the repository
- Check the documentation
- Review the example implementations
MoMegaTemplate - Your all-in-one Next.js starter template with a powerful markdown blog system! 🚀