An intelligent checksheet generation and management platform powered by Google Gemini AI. GenSheet enables organizations to create, execute, and manage checksheets efficiently for quality assurance, inspections, and compliance across various industries.
GenSheet is a modern web application built with Next.js that leverages AI to automatically generate comprehensive checksheets based on user requirements. It provides a complete workflow for creating, managing, and executing checklists with real-time reporting and analytics.
- AI-Powered Generation: Automatically generate detailed checksheets using Google Gemini AI based on industry and use case
- Drag-and-Drop Builder: Intuitive checksheet builder with drag-and-drop functionality
- Multiple Field Types: Support for various input types including checkboxes, numbers, text, photos, GPS, signatures, ratings, and more
- Role-Based Access: User management with role-based permissions (INSPECTOR, MANAGER, ADMIN)
- PDF Generation: Export completed checksheets and results as PDF documents
- Image Management: Integration with Cloudinary for image upload and storage
- Real-Time Reporting: View execution results and analytics in real-time
- Multi-Organization Support: Manage checksheets across multiple departments and locations
- Authentication: Secure authentication with NextAuth
- Database: PostgreSQL with Prisma ORM for robust data management
- Frontend: Next.js 16, React 19, TypeScript
- UI Components: Radix UI, Tailwind CSS
- Form Handling: React Hook Form with Zod validation
- AI: Google Generative AI (Gemini 2.0 Flash)
- Database: PostgreSQL with Prisma ORM
- Authentication: NextAuth v5
- Image Management: Cloudinary
- Charts: Recharts
- PDF Generation: jsPDF with AutoTable
- Drag & Drop: dnd-kit
app/ # Next.js app directory
(auth)/ # Authentication routes
(dashboard)/ # Protected dashboard routes
ai/ # AI checksheet generation
checksheets/ # Checksheet management
templates/ # Templates management
reports/ # Reporting and analytics
settings/ # User settings
(marketing)/ # Public marketing pages
api/ # API routes
ai/generate/ # AI generation endpoint
auth/ # Authentication endpoints
checksheets/ # Checksheet CRUD endpoints
results/ # Results endpoints
upload/ # File upload endpoints
components/ # React components
ui/ # Reusable UI components
lib/ # Utility libraries
auth.ts # NextAuth configuration
gemini.ts # Google AI integration
cloudinary.ts # Cloudinary integration
prisma.ts # Prisma client setup
utils.ts # Helper utilities
prisma/ # Database configuration
schema.prisma # Database schema
migrations/ # Database migrations
seed.js # Database seeding script
types/ # TypeScript type definitions
- Node.js 18+ and npm/yarn
- PostgreSQL database
- Google AI API key (for Gemini integration)
- Cloudinary account (for image management)
- NextAuth configuration
- Clone the repository:
git clone <repository-url>
cd gensheet- Install dependencies:
npm install- Set up environment variables:
# Create .env.local file with:
DATABASE_URL="postgresql://user:password@localhost:5432/gensheet"
GOOGLE_AI_API_KEY="your-google-ai-key"
CLOUDINARY_CLOUD_NAME="your-cloudinary-name"
CLOUDINARY_API_KEY="your-cloudinary-key"
CLOUDINARY_API_SECRET="your-cloudinary-secret"
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-random-secret"- Set up the database:
npm run prisma:generate
npm run prisma:migrate
npm run prisma:seed- Start the development server:
npm run devOpen http://localhost:3000 to see the application.
npm run dev- Start development servernpm run build- Build for productionnpm start- Start production servernpm run lint- Run ESLintnpm run prisma:generate- Generate Prisma clientnpm run prisma:migrate- Run database migrationsnpm run prisma:studio- Open Prisma Studio (database GUI)npm run prisma:seed- Seed database with initial data
The application includes models for:
- User: User accounts with roles and organization affiliation
- Organization: Multi-tenant organization management
- Checksheet: Template and execution records
- ChecksheetAssignment: User assignments to checksheets
- ChecksheetResult: Execution results and responses
- Checkpoint: Individual items within a checksheet
- Notification: User notifications and alerts
- VerificationToken: Email verification tokens
- Account/Session: NextAuth authentication records
- Navigate to the Checksheets section
- Click "Create New Checksheet"
- Choose AI Generation or Manual Builder
- For AI Generation: Provide requirements and let Gemini generate the checksheet
- For Manual: Use the drag-and-drop builder to add checkpoints
- Define field types, validation rules, and sections
- Save and publish the checksheet
- Navigate to Execute section
- Select a checksheet from available options
- Fill in all required fields
- Attach photos or files as needed
- Submit the execution
- Go to Reports section
- View analytics and completion rates
- Download results as PDF
- Generate compliance reports by department/location
GET/POST /api/checksheets- Manage checksheetsGET/POST /api/checksheets/[id]- Individual checksheet operationsPOST /api/checksheets/[id]/execute- Execute a checksheetGET/POST /api/results- Manage execution resultsPOST /api/ai/generate- Generate checksheet with AIPOST /api/upload- Upload files/images
The application uses NextAuth v5 with:
- Email/password authentication
- Optional OAuth providers
- Role-based access control (INSPECTOR, MANAGER, ADMIN)
- Session management with JWT tokens
- Use TypeScript for type safety
- Follow ESLint configuration
- Use Tailwind CSS for styling
- Component-based architecture
After modifying prisma/schema.prisma:
npm run prisma:migrate
npm run prisma:generateGuidelines for contributing:
- Create a feature branch
- Make your changes with clear commit messages
- Ensure code passes linting
- Submit a pull request with description
- Verify DATABASE_URL is correct
- Ensure PostgreSQL is running
- Check database credentials
- Verify GOOGLE_AI_API_KEY is valid
- Check API quota and rate limits
- Review error logs for specific issues
- Verify Cloudinary credentials
- Check file size limits
- Ensure internet connection for uploads
This project is private and proprietary.
For issues and feature requests, please contact the development team.