Nuxt Mkdirs
Open-source directory website template built with Nuxt 4
Live Demo ยท Documentation ยท Report Bug
โจ Features
- ๐จ 3 Homepage Layouts - Multiple styles, ready to use out of the box
- ๐ฆ Sanity CMS - Headless CMS, no database configuration needed
- ๐ Multiple Auth Methods - Google / GitHub OAuth login
- ๐ณ Payment Integration - Supports Stripe and Creem
- ๐ง Email Service - Resend for transactional emails + Newsletter
- ๐ค AI Auto-fill - Automatically extract website info with AI
- ๐ Dark Mode - Auto-follows system theme
- ๐ฑ Responsive Design - Perfect mobile adaptation
- โก NuxtHub Deploy - One-click deploy to Cloudflare
๐ธ Screenshot

๐ ๏ธ Tech Stack
| Category | Technology |
|---|---|
| Framework | Nuxt 4, Vue 3 |
| Styling | TailwindCSS 4, Radix Vue |
| CMS | Sanity |
| Auth | Auth.js |
| Payment | Stripe, Creem |
| Resend | |
| Deploy | NuxtHub (Cloudflare) |
๐ Quick Start
Prerequisites
- Node.js 18+
- pnpm 8+
Installation
# Clone the repository
git clone https://github.com/PBHAHAHA/Nuxt_Mkdirs.git
cd Nuxt_Mkdirs
# Install dependencies
pnpm install
# Copy environment variables
cp .env.example .env
# Start development server
pnpm dev
Visit http://localhost:3000 to see the result.
Build & Deploy
# Build for production
pnpm build
# Preview locally
pnpm preview
๐ Deployment
This project uses NuxtHub v0.10+ with Cloudflare Workers.
โ ๏ธ Note: NuxtHub Admin deployment will be deprecated on December 31, 2024. Please use Wrangler for deployment.
Deploy with Wrangler
- Copy the wrangler configuration:
cp wrangler.example.jsonc wrangler.jsonc
-
Edit
wrangler.jsoncand fill in your environment variables. -
Build and deploy:
pnpm build
npx wrangler deploy
Your site will be deployed to https://nuxt-mkdirs.<your-account>.workers.dev.
To use a custom domain, configure it in Cloudflare Dashboard > Workers & Pages > your project > Settings > Domains & Routes.
โ๏ธ Configuration Guide
1. Sanity CMS Setup
Nuxt Mkdirs uses Sanity as a headless CMS to manage all content data.
- Create a Sanity account
- Create a new project and get the Project ID
- Create an API Token (select Editor permission)
- Configure CORS origins
# .env configuration
NUXT_PUBLIC_SANITY_PROJECT_ID=your_project_id
NUXT_PUBLIC_SANITY_DATASET=production
NUXT_SANITY_API_TOKEN=your_api_token
- Deploy Sanity Studio
pnpm dlx sanity deploy

2. Email Setup (Resend)
- Create a Resend account
- Add and verify your domain
- Create an API Key

- Configure Audience ID (for Newsletter)

# .env configuration
NUXT_RESEND_API_KEY=re_xxxxx
[email protected]
NUXT_RESEND_AUDIENCE_ID=xxxxx
3. Payment Setup
Stripe (International)
NUXT_STRIPE_SECRET_KEY=sk_xxxxx
NUXT_STRIPE_WEBHOOK_SECRET=whsec_xxxxx
NUXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_xxxxx
Creem (China-friendly)
Creem supports registration with Chinese ID, more friendly for Chinese developers.
NUXT_CREEM_API_KEY=xxxxx
NUXT_CREEM_WEBHOOK_SECRET=xxxxx
NUXT_CREEM_TEST_MODE=true
NUXT_PUBLIC_CREEM_PRO_PRODUCT_ID=xxxxx
4. OAuth Authentication Setup
Google OAuth
- Visit Google Cloud Console
- Create an OAuth Client ID

# .env configuration
NUXT_AUTH_GOOGLE_CLIENT_ID=xxxxx
NUXT_AUTH_GOOGLE_CLIENT_SECRET=xxxxx
GitHub OAuth
- Visit GitHub Developer Settings
- Create an OAuth App
NUXT_AUTH_GITHUB_CLIENT_ID=xxxxx
NUXT_AUTH_GITHUB_CLIENT_SECRET=xxxxx
Auth Secret
# Generate secret
openssl rand -base64 32
# .env configuration
NUXT_AUTH_SECRET=your_generated_secret
5. AI Configuration (Optional)
Enable AI-powered auto-fill feature for website submissions.
# Choose AI provider: google, deepseek, openai
NUXT_AI_PROVIDER=google
# Google Generative AI (https://aistudio.google.com/apikey)
NUXT_GOOGLE_AI_API_KEY=xxxxx
# DeepSeek (https://platform.deepseek.com/api_keys)
NUXT_DEEPSEEK_API_KEY=xxxxx
# OpenAI (https://platform.openai.com/settings/organization/api-keys)
NUXT_OPENAI_API_KEY=xxxxx
When configured, users can click the "AI Auto-fill" button to automatically:
- Extract website name and description
- Generate detailed introduction
- Download and upload logo/images
- Suggest categories and tags
๐ Project Structure
nuxt-mkdirs/
โโโ app/
โ โโโ components/ # Vue components
โ โโโ composables/ # Composables
โ โโโ layouts/ # Layout components
โ โโโ pages/ # Page routes
โ โโโ utils/ # Utility functions
โโโ server/
โ โโโ api/ # API routes
โ โโโ utils/ # Server utilities
โโโ sanity/
โ โโโ schemas/ # Sanity schemas
โโโ public/ # Static assets
๐ค Contributing
Contributions are welcome! Please read the Contributing Guide.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
๐ License
This project is licensed under the MIT License.
๐ Support
If this project helps you, please consider:
๐ฎ Contact
- GitHub: @PBHAHAHA
