A comprehensive QR code generation and management platform built with Next.js, MongoDB, and Cloudinary.
- Dynamic QR Codes: Create QR codes that can be updated without reprinting
- Customization: Add logos, change colors, and customize QR appearance
- Analytics: Track scans, locations, devices, and more
- User Management: Free and Pro subscription plans
- Admin Portal: Complete admin dashboard for user and QR management
- Website Integration: Embed QR codes on any website (iframe, script, React component)
- Multiple QR Types: URL, Text, Email, Phone, WhatsApp, WiFi, UPI
- Framework: Next.js 16 (App Router)
- Database: MongoDB with Mongoose
- Authentication: NextAuth.js (Google OAuth + Email/Password)
- Image Storage: Cloudinary
- Styling: Tailwind CSS
- Charts: Recharts
- Payments: Stripe & Razorpay (optional)
- Node.js 18.x or higher
- MongoDB (local or MongoDB Atlas)
- Cloudinary account
- Google OAuth credentials (for Google Sign-in)
-
Clone the repository
git clone https://github.com/yourusername/smart-qr-saas.git cd smart-qr-saas -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local
Fill in all required environment variables (see
.env.example) -
Run the development server
npm run dev
Create a .env.local file with the following variables:
# Database
MONGODB_URI=mongodb://localhost:27017/smartqr
# NextAuth
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secret-key
# Public URL
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Google OAuth
GOOGLE_CLIENT_ID=your-client-id
GOOGLE_CLIENT_SECRET=your-client-secret
# Cloudinary
CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=your-api-key
CLOUDINARY_API_SECRET=your-api-secretSee .env.example for complete list.
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
- Push your code to GitHub
- Import project in Vercel
- Add environment variables in Vercel dashboard
- Deploy!
See VERCEL_DEPLOYMENT.md for detailed deployment guide.
To create an admin account:
node scripts/create-admin.jsOr update user role in MongoDB:
db.users.updateOne(
{ email: "your-email@example.com" },
{ $set: { role: "admin" } }
)See ADMIN_ACCESS.md for more details.
- Admin Access Guide - How to access and use admin portal
- Admin Capabilities - What admins can do
- Website Integration - How to embed QR codes
- Vercel Deployment - Complete deployment guide
smart-qr-saas/
├── app/ # Next.js App Router
│ ├── (auth)/ # Authentication pages
│ ├── (dashboard)/ # Dashboard pages
│ ├── admin/ # Admin portal
│ ├── api/ # API routes
│ └── embed/ # Public embed pages
├── components/ # React components
├── config/ # Configuration files
├── lib/ # Utility functions
├── models/ # Mongoose models
├── public/ # Static files
└── scripts/ # Utility scripts
- Passwords are hashed with bcrypt
- JWT-based authentication
- Protected API routes
- Environment variables for sensitive data
- CORS configured
- Rate limiting on preview API
This project is private and proprietary.
This is a private project. For issues or questions, contact the maintainer.
For support, check the documentation files or contact the development team.
Built with ❤️ using Next.js