Skip to content

Pollaro is a modern polling and survey platform built with Next.js, Prisma, and PostgreSQL. It allows users to easily create, share, and analyze polls with a clean, responsive UI. Designed for both simplicity and scalability, Pollaro supports customizable forms, real-time responses, and secure public sharing

Notifications You must be signed in to change notification settings

JayShende/Pollaro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

69 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Pollaro

Pollaro Logo

Build Forms & Polls That People Love to Answer

wakatime

TypeScript Next.js React Prisma PostgreSQL

πŸ“‹ Table of Contents

🎯 About

Pollaro is a modern, full-stack form and poll creation platform that makes it easy to build beautiful, interactive forms and collect responses efficiently. Built with cutting-edge technologies, Pollaro offers a seamless experience for both form creators and respondents.

Key Highlights

  • 🎨 Modern UI/UX - Beautiful, responsive design with Tailwind CSS
  • ⚑ Real-time Updates - Instant form updates and response tracking
  • πŸ” Secure Authentication - NextAuth.js with Google OAuth integration
  • πŸ“± Mobile-First - Fully responsive across all devices
  • πŸš€ High Performance - Built with Next.js 15 and optimized for speed
  • πŸ“Š Analytics - Built-in response analytics and insights
  • πŸ”§ Developer Friendly - TypeScript throughout, comprehensive error handling

✨ Features

Form Creation

  • Multiple Question Types
    • Short Answer
    • Long Answer (Textarea)
    • Multiple Choice
    • Checkbox
    • Dropdown
    • File Upload
  • Form Management
    • Drag & drop question ordering
    • Required/optional questions
    • Form preview
    • Publish/unpublish forms
  • Customization
    • Form titles and descriptions
    • Question validation
    • File upload restrictions

Response Collection

  • Anonymous Responses - No signup required for respondents
  • File Upload Support - Secure file uploads to AWS S3
  • Response Validation - Client and server-side validation
  • Duplicate Prevention - Prevents multiple responses from same user

Analytics & Management

  • Response Dashboard - View all responses in organized tables
  • Real-time Statistics - Live response counts and analytics
  • Export Capabilities - Download response data
  • Form Analytics - Track form performance and engagement

Technical Features

  • Monorepo Architecture - Turborepo for efficient development
  • Type Safety - Full TypeScript implementation
  • Database Management - Prisma ORM with PostgreSQL
  • File Storage - AWS S3 integration for file uploads
  • Authentication - NextAuth.js with multiple providers
  • API Proxy - Secure backend communication

πŸ›  Tech Stack

Frontend

  • Framework: Next.js 15 with App Router
  • UI Library: Radix UI + Custom Components
  • Styling: Tailwind CSS 4.x
  • State Management: TanStack Query (React Query)
  • Forms: React Hook Form + Zod validation
  • Authentication: NextAuth.js v5
  • Icons: Lucide React
  • Charts: Recharts

Backend

  • Runtime: Node.js with Express
  • Language: TypeScript
  • Database: PostgreSQL
  • ORM: Prisma
  • File Storage: AWS S3
  • Authentication: JWT + Google OAuth
  • Validation: Zod schemas

Development Tools

  • Monorepo: Turborepo
  • Package Manager: pnpm
  • Linting: ESLint
  • Formatting: Prettier
  • Type Checking: TypeScript

πŸ“ Project Structure

Pollaro/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ frontend/                 # Next.js frontend application
β”‚   β”‚   β”œβ”€β”€ app/                 # App Router pages and components
β”‚   β”‚   β”‚   β”œβ”€β”€ (protected)/     # Protected routes
β”‚   β”‚   β”‚   β”œβ”€β”€ auth/            # Authentication pages
β”‚   β”‚   β”‚   β”œβ”€β”€ pages/           # Page components
β”‚   β”‚   β”‚   └── api/             # API routes
β”‚   β”‚   β”œβ”€β”€ components/          # Reusable UI components
β”‚   β”‚   └── services/            # API services and queries
β”‚   └── backend/                 # Express.js backend API
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   β”œβ”€β”€ controller/      # Route controllers
β”‚       β”‚   β”œβ”€β”€ services/        # Business logic
β”‚       β”‚   β”œβ”€β”€ routes/          # API routes
β”‚       β”‚   └── middlewares/     # Custom middlewares
β”‚       └── prisma/              # Database schema
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ prisma/                  # Shared Prisma client
β”‚   β”œβ”€β”€ ui/                      # Shared UI components
β”‚   β”œβ”€β”€ eslint-config/           # Shared ESLint config
β”‚   └── typescript-config/       # Shared TypeScript config
└── README.md

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • pnpm (recommended) or npm
  • PostgreSQL database
  • AWS S3 bucket (for file uploads)

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/pollaro.git
    cd pollaro
  2. Install dependencies

    pnpm install
  3. Set up environment variables

    cp .env.example .env
    # Edit .env with your configuration
  4. Set up the database

    # Generate Prisma client
    pnpm db:generate
    
    # Run database migrations
    pnpm db:migrate
  5. Start the development servers

    # Start both frontend and backend
    pnpm dev
    
    # Or start individually
    pnpm dev --filter=frontend
    pnpm dev --filter=backend
  6. Access the application

Available Scripts

# Development
pnpm dev                    # Start all apps in development mode
pnpm dev --filter=frontend # Start only frontend
pnpm dev --filter=backend  # Start only backend

# Building
pnpm build                  # Build all apps
pnpm build --filter=frontend # Build only frontend
pnpm build --filter=backend  # Build only backend

# Production
pnpm start                  # Start production servers

# Database
pnpm db:generate           # Generate Prisma client
pnpm db:migrate            # Run database migrations
pnpm db:studio             # Open Prisma Studio

# Code Quality
pnpm lint                  # Run ESLint
pnpm format               # Format code with Prettier
pnpm check-types          # Run TypeScript type checking

πŸ”§ Environment Variables

Frontend (.env.local)

NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secret-key
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
NEXT_PUBLIC_API_URL=http://localhost:8000

Backend (.env)

DATABASE_URL="postgresql://username:password@localhost:5432/pollaro"
JWT_SECRET=your-jwt-secret
AWS_ACCESS_KEY_ID=your-aws-access-key
AWS_SECRET_ACCESS_KEY=your-aws-secret-key
AWS_REGION=your-aws-region
AWS_S3_BUCKET=your-s3-bucket-name
CORS_ORIGIN=http://localhost:3000

πŸ“š API Documentation

Authentication Endpoints

  • POST /api/auth/signin - User sign in
  • POST /api/auth/signout - User sign out
  • GET /api/auth/session - Get current session

Form Management

  • GET /api/forms - Get user's forms
  • POST /api/forms - Create new form
  • GET /api/forms/:id - Get form details
  • PUT /api/forms/:id - Update form
  • DELETE /api/forms/:id - Delete form

Question Management

  • POST /api/questions - Create question
  • PUT /api/questions/:id - Update question
  • DELETE /api/questions/:id - Delete question

Response Management

  • POST /api/responses - Submit response
  • GET /api/responses/:formId - Get form responses
  • DELETE /api/responses/:id - Delete response

File Upload

  • POST /api/file/upload - Get presigned URL for file upload

🀝 Contributing

We welcome contributions to Pollaro! Here's how you can help:

Getting Started

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run tests and linting: pnpm lint && pnpm check-types
  5. Commit your changes: git commit -m 'Add amazing feature'
  6. Push to the branch: git push origin feature/amazing-feature
  7. Open a Pull Request

Development Guidelines

  • Follow the existing code style and conventions
  • Write meaningful commit messages
  • Add tests for new features
  • Update documentation as needed
  • Ensure all checks pass before submitting PR

Areas for Contribution

  • πŸ› Bug fixes
  • ✨ New features
  • πŸ“š Documentation improvements
  • 🎨 UI/UX enhancements
  • ⚑ Performance optimizations
  • πŸ§ͺ Test coverage improvements

Reporting Issues

  • Use the GitHub issue tracker
  • Provide detailed reproduction steps
  • Include system information
  • Add screenshots if applicable

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Next.js for the amazing React framework
  • Prisma for the excellent database toolkit
  • Radix UI for accessible component primitives
  • Tailwind CSS for the utility-first CSS framework
  • Turborepo for the monorepo build system

Made with ❀️ by the Pollaro Team

⭐ Star this repo β€’ πŸ› Report Bug β€’ ✨ Request Feature

About

Pollaro is a modern polling and survey platform built with Next.js, Prisma, and PostgreSQL. It allows users to easily create, share, and analyze polls with a clean, responsive UI. Designed for both simplicity and scalability, Pollaro supports customizable forms, real-time responses, and secure public sharing

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •