Skip to main content

Welcome to Pawtograder - Developer Guide

This guide will help you understand and contribute to the Pawtograder project. Learn about the architecture, development setup, and how to extend the system.

Getting Started

  • Local Setup - Set up your development environment and run Pawtograder locally

Feature Documentation

  • Surveys - Database schema, API, and implementation details for the survey system
  • Polls - Real-time polling system architecture, database schema, and hooks

Tech Stack

Pawtograder is built with modern web technologies:

LayerTechnology
FrontendNext.js 15, React 18, TypeScript
UI FrameworkChakra UI
BackendSupabase (PostgreSQL, Auth, Storage, Edge Functions)
State ManagementReact Hook Form, Refine, TanStack Query
TestingJest, Playwright

Repository Structure

platform/
├── app/ # Next.js app router pages
├── components/ # Reusable React components
├── hooks/ # Custom React hooks
├── types/ # TypeScript type definitions
├── utils/ # Utility functions
├── supabase/ # Database migrations and Edge Functions
├── tests/ # Test files
└── scripts/ # Build and utility scripts

Key Concepts

Row-Level Security (RLS)

Pawtograder uses Supabase's Row Level Security to enforce access control at the database level. Each table has policies that determine what data users can read, create, update, or delete based on their role.

User Roles

RoleDescription
studentCan view course content, submit assignments, respond to surveys
graderStudent permissions plus grading access
instructorFull course management access

Profiles

Users have both public and private profiles per course:

  • Public Profile: Visible to other course members (name, avatar)
  • Private Profile: Internal identifier for submissions and responses

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests: npm test and npx playwright test
  5. Submit a pull request