O Sistema Operacional Cognitivo para Professores
Pedagog.IA transforma fotos de provas em notas no diΓ‘rio de classe, automaticamente. CorreΓ§Γ£o em segundos, privacidade blindada, e planejamento baseado na BNCC.
- πΈ Scan-to-Grade: Fotografe a prova, receba a nota corrigida pela IA
- π Privacy Shield: Dados de alunos criptografados com
pgcrypto(LGPD compliant) - β‘ Async-First: Processamento em background via Supabase Edge Functions
- π Real-time Updates: NotificaΓ§Γ΅es instantΓ’neas via Supabase Realtime
- π± PWA Ready: Funciona offline para escolas com Wi-Fi instΓ‘vel
- π― BNCC Planning: (Roadmap) GeraΓ§Γ£o de provas baseada na Base Nacional Comum Curricular
| Layer | Technology |
|---|---|
| Frontend | Next.js 15 (App Router), React 19, Tailwind CSS |
| UI Components | Shadcn/UI, Radix UI |
| Backend | Supabase (PostgreSQL, Auth, Storage, Realtime) |
| Compute | Supabase Edge Functions (Deno) |
| AI | OpenAI GPT-4 Vision / Anthropic Claude (Mock for MVP) |
| State | TanStack Query, Zustand |
| Validation | Zod |
| Testing | Vitest, React Testing Library |
- Node.js 22+ (LTS)
- pnpm 9+
- Docker (for local Supabase)
- Supabase CLI (install:
npm i -g supabase)
# 1. Clone the repository
git clone https://github.com/your-org/pedagog_ai.git
cd pedagog_ai
# 2. Install dependencies
pnpm install
# 3. Copy environment variables
cp .env.example .env.local
# Edit .env.local with your Supabase credentials
# 4. Start local Supabase (Docker required)
npx supabase start
# 5. Run database migrations
npx supabase db reset
# 6. (Optional) Seed test data
psql -h localhost -p 54322 -U postgres -d postgres -f supabase/seed.sql
# 7. Start the development server (Runs on port 9901)
pnpm devOpen http://localhost:9901 π
Create a .env.local file with the following keys:
# App
NEXT_PUBLIC_APP_URL=http://localhost:9901
# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
# Stripe
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
# Web Push (VAPID Keys)
# Generate with: npx web-push generate-vapid-keys
NEXT_PUBLIC_VAPID_PUBLIC_KEY=your_public_key
VAPID_PRIVATE_KEY=your_private_key
VAPID_SUBJECT=mailto:support@pedagog.ia
# Auth
NEXTAUTH_SECRET=your_generated_secret # Generate with: openssl rand -base64 32
NEXTAUTH_URL=http://localhost:9901To test Stripe webhooks locally:
- Install Stripe CLI
- Login:
stripe login - Listen to events forwarding to port 9901:
stripe listen --forward-to localhost:9901/api/webhooks/stripe- Copy the
whsec_...secret to your.env.localasSTRIPE_WEBHOOK_SECRET.
pedagog_ai/
βββ app/ # Next.js App Router
β βββ (auth)/ # Public auth pages
β βββ (dashboard)/ # Protected dashboard routes
β βββ globals.css # Design system CSS variables
β βββ layout.tsx # Root layout with fonts
βββ components/ # React components
β βββ ui/ # Shadcn/UI components
β βββ landing/ # Landing page sections
βββ hooks/ # Custom React hooks
β βββ use-job-monitor.ts # Real-time job status hook
βββ lib/ # Utilities
β βββ supabase/ # Supabase clients
β βββ utils.ts # Helper functions
βββ server/ # Server-side logic
β βββ actions/ # Server Actions
β βββ exams.ts # Exam upload logic
β βββ students.ts # Student CRUD (encrypted)
βββ supabase/
β βββ functions/ # Edge Functions (Deno)
β β βββ process-job/ # Async job processor
β βββ migrations/ # Database schema
β βββ seed.sql # Test data
βββ types/ # TypeScript definitions
β βββ database.ts # Supabase types
βββ docs/ # Documentation
βββ tdd.md # Technical Design Doc
βββ ui_ux.md # Design System Spec
βββ SETUP.md # Detailed setup guide
Student names are never stored in plain text. We use PostgreSQL's pgcrypto extension:
- Client sends plain text name to Server Action
- Server Action calls RPC
create_secure_student - Database encrypts with
pgp_sym_encryptbefore storage - Decryption only happens server-side via
get_students_decryptedRPC
All tables have RLS enabled. Users can only access:
- Their own jobs (
background_jobs) - Students from their institution (
students) - Their own profile (
profiles)
# Run unit tests
pnpm test
# Run tests in watch mode
pnpm test --watch
# Type check
pnpm type-check
# Lint
pnpm lint- Setup Guide: Detailed installation and configuration
- Technical Design: Architecture and database schema
- UI/UX Spec: Design system and component guidelines
# Deploy to Vercel
vercel --prod# Deploy database migrations
npx supabase db push
# Deploy Edge Functions
npx supabase functions deploy process-job- Core OCR pipeline (Mock)
- Student encryption (Privacy Shield)
- Real-time job monitoring
- OpenAI GPT-4 Vision integration
- BNCC-based exam generation
- Web Push notifications
- Mobile app (React Native)
- Analytics dashboard
MIT License - See LICENSE for details.
We welcome contributions! Please read our Contributing Guide first.
- Email: support@pedagog.ia
- Discord: Join our community
- Issues: GitHub Issues
Built with β€οΈ for teachers who deserve their weekends back.