Skip to content

About

An AI-powered prompt management platform featuring multi-model optimization, version control, collaborative sharing, and a community prompt library.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

✨ NotePrompt

AI Prompt Management Platform

A modern, full-stack AI prompt management platform with multi-model optimization, community prompt library, and professional-grade editing tools.

Live Demo Β· Documentation Β· Report Bug

Next.js TypeScript React Tailwind CSS MySQL Docker License


πŸ“– Overview

NotePrompt is a production-ready AI prompt management platform built with Next.js 15. It provides a comprehensive workspace for creating, organizing, optimizing, and sharing AI prompts across multiple AI providers. Designed for both individual users and teams, it features a dual-mode editor, 17+ AI model integrations, a community-driven public prompt library with 15 curated categories, and a full admin dashboard.

🌐 Live at noteprompt.cn β€” Deployed on Alibaba Cloud with Docker, Nginx reverse proxy, and SSL.

Portfolio Highlights

  • Local revision includes the opt-in /optimizer workspace, attachment text extraction (text, PDF, DOCX, spreadsheets and image OCR), bilingual UI settings and provider diagnostics.

  • Set NEXT_PUBLIC_ENABLE_PROMPT_OPTIMIZER_V2=true before building to enable the new workspace. Provider settings and paid diagnostic probes require administrator authentication; attachment parsing requires sign-in.

  • See source-sync verification and deployment limits before deploying this revision.

  • Built as a complete SaaS-style product rather than a single-page demo: authentication, personal workspace, public library, admin dashboard, deployment scripts, and production reverse proxy are all included.

  • Designed around a real prompt-management workflow: users can draft, organize, optimize, publish, search, and reuse prompts across multiple model providers.

  • Shows full-stack engineering range: Next.js App Router, TypeScript, MySQL, Redis, JWT auth, Docker Compose, Nginx, email verification, and rate limiting.

  • Useful as a portfolio project because it demonstrates product thinking, backend API design, AI-provider integration, and deployable infrastructure in one repository.


🎯 Key Features

Prompt Management

  • Dual-Mode Editor β€” Switch between Standard and Professional editing modes with real-time preview
  • Folder Organization β€” Hierarchical folder system with drag-and-drop, custom descriptions, and nested structure
  • Version History β€” Automatic edit tracking with one-click rollback to any previous version
  • Global Search β€” Ctrl+K instant search across all prompts and folders
  • Tags & Categories β€” Organize prompts with 15 built-in categories and custom tagging

AI-Powered Optimization

  • 17+ AI Models β€” Integrated with DeepSeek (V3.2, R1), Kimi (K2.5, K2 Thinking), Qwen (3.5 Plus, 3 Max, Coder Plus), Zhipu GLM (5, 4.7, 4.6, 4.5)
  • Multi-Turn Optimization β€” Iterative prompt refinement through AI-guided conversations
  • Model Presets β€” Creative / Balanced / Precise temperature presets for different use cases
  • Auto-Fallback β€” Seamless failover between providers if one is unavailable

Community & Sharing

  • Public Prompt Library β€” Browse, search, and collect community-shared prompts
  • 15 Curated Categories β€” Writing, Programming, Education, Marketing, Creative Design, Data Analysis, Life Assistant, Translation, Productivity, AI Art, Academic Research, Social Media, Role-Playing, Content Creation, and more
  • Favorites & Likes β€” Save and engage with the best community prompts
  • One-Click Publish β€” Share your prompts to the public library instantly

Platform Features

  • Dark Mode β€” Light / Dark / System-following theme with smooth transitions
  • Admin Dashboard β€” Full platform management: user management, content moderation, usage statistics, featured content curation
  • JWT Authentication β€” Secure registration/login with bcrypt password hashing (12 rounds)
  • Email Verification β€” Optional email verification with rate-limited, brute-force-protected verification codes
  • Rate Limiting β€” Redis-backed rate limiting on all sensitive endpoints
  • Responsive Design β€” Fully optimized for desktop, tablet, and mobile

πŸ›  Tech Stack

Layer Technology
Frontend Next.js 15, React 18, TypeScript, Tailwind CSS 4
UI Components shadcn/ui, Radix UI, Lucide Icons
Backend Next.js App Router API Routes (Node.js)
Database MySQL 8.0
Caching Redis 7
Authentication JWT + bcrypt
Email Nodemailer
AI Providers DeepSeek, Kimi (Moonshot), Qwen (DashScope), Zhipu GLM
Deployment Docker Compose + Nginx + SSL

πŸš€ Getting Started

Prerequisites

  • Node.js 24 (the verified runtime and Docker base)
  • MySQL >= 8.0
  • Redis >= 6 (optional, for rate limiting)
  • At least one AI provider API key

1. Clone the Repository

git clone https://github.com/computersciencefreshmen/NotePrompt.git
cd NotePrompt

2. Install Dependencies

npm install

3. Configure Environment Variables

cp .env.example .env.local

Edit .env.local with your configuration:

# ── Database ─────────────────────────────────
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=agent_report

# ── Authentication ───────────────────────────
JWT_SECRET=your_jwt_secret_at_least_32_chars

# ── Redis (optional) ────────────────────────
REDIS_HOST=localhost
REDIS_PORT=6379

# ── AI API Keys (configure at least one) ────
DEEPSEEK_API_KEY=sk-xxx
KIMI_API_KEY=sk-xxx
QWEN_API_KEY=sk-xxx
ZHIPU_API_KEY=xxx.xxx

# ── Email (optional) ────────────────────────
SMTP_HOST=smtp.example.com
SMTP_PORT=465
SMTP_USER=your_email@example.com
SMTP_PASS=your_password
ENABLE_EMAIL_VERIFICATION=false

4. Initialize Database

mysql -u root -p agent_report < database/mysql-schema-new.sql

5. Start Development Server

npm run dev

Open http://localhost:3000 in your browser.


🐳 Docker Deployment

Deploy the full stack (App + MySQL + Redis + Nginx) with a single command:

# 1. Configure production environment
cp .env.example .env.production

# 2. Launch all services
docker-compose up -d

# 3. Access the application
# β†’ http://localhost (or your domain)

The Docker Compose stack includes:

  • note-prompt-app β€” Next.js application (port 3001)
  • docker_mysql8 β€” MySQL 8.0 with persistent volume
  • note-prompt-redis β€” Redis 7 for caching and rate limiting
  • note-prompt-nginx β€” Nginx reverse proxy with SSL termination

πŸ“ Project Structure

NotePrompt/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                    # Next.js App Router
β”‚   β”‚   β”œβ”€β”€ page.tsx            #   Landing page
β”‚   β”‚   β”œβ”€β”€ admin/              #   Admin dashboard
β”‚   β”‚   β”œβ”€β”€ api/v1/             #   RESTful API routes
β”‚   β”‚   β”‚   β”œβ”€β”€ auth/           #     Authentication (register, login, verify-email)
β”‚   β”‚   β”‚   β”œβ”€β”€ ai/             #     AI optimization endpoints
β”‚   β”‚   β”‚   β”œβ”€β”€ prompts/        #     User prompts CRUD
β”‚   β”‚   β”‚   β”œβ”€β”€ public-prompts/ #     Public prompt library
β”‚   β”‚   β”‚   β”œβ”€β”€ folders/        #     Folder management
β”‚   β”‚   β”‚   β”œβ”€β”€ favorites/      #     Favorites system
β”‚   β”‚   β”‚   β”œβ”€β”€ search/         #     Global search
β”‚   β”‚   β”‚   └── tags/           #     Tag management
β”‚   β”‚   β”œβ”€β”€ prompts/            #   Prompt workspace pages
β”‚   β”‚   β”œβ”€β”€ public-prompts/     #   Public library pages
β”‚   β”‚   β”œβ”€β”€ folders/            #   Folder view pages
β”‚   β”‚   └── settings/           #   User settings
β”‚   β”œβ”€β”€ components/             # Reusable React components
β”‚   β”‚   β”œβ”€β”€ ui/                 #   shadcn/ui base components
β”‚   β”‚   β”œβ”€β”€ AIOptimizeDialog.tsx #   AI optimization dialog
β”‚   β”‚   β”œβ”€β”€ Header.tsx          #   Navigation header
β”‚   β”‚   └── ...                 #   40+ components
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   └── ai.ts               # AI provider & model configuration
β”‚   β”œβ”€β”€ contexts/               # React Context providers
β”‚   β”‚   β”œβ”€β”€ AuthContext.tsx      #   JWT authentication state
β”‚   β”‚   └── ThemeContext.tsx     #   Theme management
β”‚   β”œβ”€β”€ hooks/                  # Custom React hooks
β”‚   β”œβ”€β”€ lib/                    # Utilities & services
β”‚   β”‚   β”œβ”€β”€ mysql-database.ts   #   Database access layer
β”‚   β”‚   β”œβ”€β”€ rate-limit.ts       #   Rate limiting
β”‚   β”‚   └── email-service.ts    #   Email service
β”‚   └── types/                  # TypeScript type definitions
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ mysql-schema-new.sql    # Full database schema
β”‚   └── migrations/             # SQL migrations
β”œβ”€β”€ nginx/
β”‚   └── nginx.conf              # Nginx config (Cloudflare-ready)
β”œβ”€β”€ docker-compose.yml          # Docker Compose orchestration
β”œβ”€β”€ Dockerfile                  # Multi-stage production build
└── package.json

πŸ”Œ API Reference

All API endpoints are prefixed with /api/v1/.

Method Endpoint Description
POST /auth/register Register a new account
POST /auth/login Login and receive JWT token
POST /auth/verify-email Verify email with 6-digit code
GET /prompts List user's prompts
POST /prompts Create a new prompt
PUT /prompts/:id Update a prompt
DELETE /prompts/:id Delete a prompt
GET /public-prompts Browse public prompt library
POST /public-prompts Publish a prompt
GET /folders List user's folders
POST /folders Create a new folder
POST /ai/optimize AI-powered prompt optimization
GET /search Global search
GET /favorites List favorites
POST /favorites Add to favorites
GET /categories List all categories
GET /tags List all tags

πŸ€– Supported AI Models

Provider Models Highlights
DeepSeek V3.2 Chat, R1 (Reasoner) Top-tier reasoning capability
Kimi (Moonshot) K2.5, K2 Thinking, Moonshot V1 (32K/128K) 128K context window
Qwen (Alibaba) 3.5 Plus, 3 Max, Coder Plus, Long, 3.5 Flash Best Chinese language support
Zhipu GLM GLM-5, GLM-4.7, GLM-4.7-Flash, GLM-4.6, GLM-4.5 128K context, up to 131072 tokens

πŸ”’ Security

  • Password Hashing β€” bcrypt with 12 salt rounds (OWASP recommended)
  • JWT Authentication β€” Secure token-based auth with httpOnly cookies
  • Rate Limiting β€” Redis-backed rate limiting on auth and API endpoints
  • Input Validation β€” Server-side validation on all user inputs
  • CSRF Protection β€” SameSite cookie policy
  • Brute Force Protection β€” Lockout after 5 failed verification attempts
  • Timing-Safe Comparison β€” crypto.timingSafeEqual for verification codes

πŸ“Έ Screenshots

πŸ“Œ Screenshots coming soon β€” visit noteprompt.cn for the live experience.


πŸ“„ License

This project is licensed under the MIT License.


Built with ❀️ using Next.js, TypeScript, and Tailwind CSS

⬆ Back to Top

About

An AI-powered prompt management platform featuring multi-model optimization, version control, collaborative sharing, and a community prompt library.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages