A gamified classroom management system built with Next.js 16 and Prisma.
Adopt virtual pets, score student performance, and make teaching fun.
ClassPet is a gamified classroom management and incentive system for K-12 classes. Students adopt and raise virtual pets, while teachers adjust points based on daily performance. Pets level up and change status based on scores, making classroom management engaging and effective.
- 🔐 Secure Auth System — NextAuth login with PIN code anti-cheat lock
- 👥 Data Isolation — Teacher-class-student data separation for privacy
- 🃏 Student Pet Cards — Real-time level, HP, status badges, and responsive layout
- 🎮 Gamified Scoring — Particle effects, level-up animations, and detailed history logs
- 🏪 Class Store — Redeem rewards with growth points, complete transaction ledger
- 📊 Group Management — Multiple grouping plans and real-time group dashboards
- ⏳ Pet Survival System — Hunger decay, weekend skip, holiday freeze, revive system
- 📅 Holiday Freeze — Automatically pauses pet status decay during vacations
- Framework: Next.js 16 (App Router)
- Database: SQLite / PostgreSQL + Prisma ORM
- Auth: Auth.js (NextAuth v5 Beta)
- UI: Tailwind CSS + shadcn/ui
- Animations: Framer Motion + Canvas Confetti
Ensure your server has Node.js (v20+) and PM2 installed.
在服务器管理系统中配置环境变量即可(也可以使用项目根目录的 .env 文件):
DATABASE_URL="file:./dev.db"
NEXTAUTH_SECRET="your-random-secret-key"
NEXTAUTH_URL="http://your-server-ip:port"
AUTH_TRUST_HOST=true# Install dependencies
npm install
# Push database schema
npx prisma db push
# Build for production
npm run build# Start and name the process
pm2 start npm --name "classpet" -- start
# Save for auto-restart on reboot
pm2 save
pm2 startupThis project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). Any modified version used publicly or hosted online must be open-sourced under the same license.
Note: This project only supports Chinese language at the moment.
Developed by: aiwandiannaodelele (龚奕帆) / Gong Yifan
