Skip to content

om-umrania/KnowNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProofNote

Convert learning into structured understanding. From papers and PDFs to knowledge graphs and social learning.

ProofNote is not another notes app—it's a conversion system. It takes raw learning material (handwritten notes, PDFs, screenshots, book highlights, classroom slides, rough ideas) and converts them into structured understanding, actionable insights, and shareable content.

Input: Paste a note, PDF excerpt, or classroom takeaway
Processing: AI extracts concepts, claims, questions, applications, and relationships
Output: Knowledge card, graph preview, discussion prompt, and social post


Quick Start

Prerequisites

  • Node.js 18+
  • Supabase account
  • Anthropic API key
  • Google OAuth credentials

5-Minute Setup

# 1. Clone repository
cd /Users/omumrania/Documents/GitHub/KnowNet

# 2. Install dependencies
npm install

# 3. Setup environment
cp .env.example .env.local
# Fill in your API keys and credentials

# 4. Setup database
# See SETUP.md for Supabase configuration

# 5. Run development server
npm run dev

# Visit http://localhost:3000

For detailed setup instructions, see SETUP.md.


Project Structure

KnowNet/
├── app/                          # Next.js App Router
│   ├── layout.tsx               # Root layout
│   ├── page.tsx                 # Landing page
│   ├── dashboard/               # User dashboard
│   ├── editor/                  # Note editor/converter
│   ├── graph/                   # Knowledge graph visualization
│   ├── auth/                    # Auth pages
│   └── api/                     # API routes
│       ├── notes/               # Note processing & CRUD
│       ├── auth/                # Authentication
│       └── upload/              # File uploads
├── components/                   # Reusable React components
│   ├── Editor/                  # Note input components
│   ├── KnowledgeCard/          # Card display components
│   ├── Graph/                   # Graph visualization
│   └── Shared/                  # Shared components
├── lib/                          # Utilities & helpers
│   ├── supabase.ts              # Supabase client
│   ├── types.ts                 # TypeScript types
│   ├── store.ts                 # Zustand store
│   └── utils/                   # Helper functions
├── public/                       # Static assets
├── styles/                       # Global styles
├── PHASE_1_PLAN.md              # Phase 1 detailed roadmap
├── ARCHITECTURE.md              # System architecture
├── DATABASE_SCHEMA.md           # Database schema & migrations
├── API_DESIGN.md                # API specification
└── SETUP.md                     # Setup instructions

Phase 1: MVP (Current)

Timeline: 2-3 weeks
Goal: Validate users want learning converted into structured output

Phase 1 Features

  • ✓ Paste note/text → process with AI
  • ✓ Generate summary, concepts, interpretation, applications
  • ✓ Preview knowledge card
  • ✓ Copy-ready social post
  • ✓ Save to personal library
  • ✓ Simple 2D knowledge graph visualization
  • ✓ Basic authentication (Google OAuth)

Success Criteria

  • End-to-end conversion loop works smoothly
  • Users can copy & publish output
  • Graph visualization is intuitive
  • 3+ users validate the MVP
  • No critical bugs

See PHASE_1_PLAN.md for complete roadmap.


Phase 2: Social Layer (Future)

  • User profiles & following
  • Public feed & discovery
  • Comments & discussions
  • Collaborative note-taking
  • Full persistent knowledge graph
  • Community features

Architecture

Tech Stack

  • Frontend: Next.js 14, React 18, Tailwind CSS, Shadcn UI
  • Backend: Next.js API Routes, NextAuth.js
  • Database: Supabase (PostgreSQL)
  • AI: Claude API (Anthropic)
  • Deployment: Vercel
  • State: Zustand
  • Graphs: React Force Graph or D3.js

Key Design Decisions

  1. Synchronous processing with streaming for long responses
  2. Client-side graph generation in Phase 1 (no persistent graph)
  3. JWT sessions stored in HTTP-only cookies
  4. RLS policies for data isolation
  5. Serverless deployment for easy scaling

See ARCHITECTURE.md for detailed system design.


Database

ProofNote uses Supabase PostgreSQL with the following tables:

  • users: User accounts (managed by NextAuth)
  • notes: Saved knowledge cards
  • concepts: Extracted concepts (Phase 2+)
  • relationships: Concept connections (Phase 2+)

All tables have:

  • UUID primary keys
  • RLS policies for security
  • Optimized indexes
  • JSONB fields for flexible data

See DATABASE_SCHEMA.md for complete schema.


API

RESTful JSON API with authentication, validation, and error handling.

Core Endpoints

Method Endpoint Purpose
POST /api/notes/process Convert input to knowledge card
POST /api/notes/save Save card to database
GET /api/notes List user's notes
GET /api/notes/:id Get single note
PUT /api/notes/:id Update note
DELETE /api/notes/:id Delete note

See API_DESIGN.md for complete API specification.


Development

Local Development

# Start dev server
npm run dev

# Run tests
npm test

# Run linter
npm run lint

# Type check
npm run type-check

Environment Variables

Create .env.local with:

NEXT_PUBLIC_SUPABASE_URL=...
NEXT_PUBLIC_SUPABASE_ANON_KEY=...
SUPABASE_SERVICE_ROLE_KEY=...
NEXTAUTH_SECRET=...
NEXTAUTH_URL=http://localhost:3000
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...
ANTHROPIC_API_KEY=...

Database Migrations

# Create new migration
supabase migration new <name>

# Apply migrations locally
supabase db push

# Reset database
supabase db reset

Deployment

Vercel Deployment

# Connect repository to Vercel
# Add environment variables in Vercel dashboard
# Deploy

vercel

Environment Configuration

  1. Set all .env variables in Vercel dashboard
  2. Update OAuth redirect URIs with production URL
  3. Update database URLs if using production database
  4. Test deployment with real users

Security

Authentication

  • Google OAuth via NextAuth.js
  • JWT sessions in HTTP-only cookies
  • CSRF protection built-in

Database

  • Row Level Security (RLS) on all tables
  • Users isolated to their own data
  • Service role key only used on server-side

API

  • Input validation on all endpoints
  • Rate limiting on expensive operations
  • Sanitization of user inputs
  • Timeout protection for long-running operations

Performance Targets

  • API response: < 2s for note processing
  • Page load: < 2s (First Contentful Paint)
  • Database queries: < 100ms
  • Graph visualization: 60 FPS

Monitoring & Analytics

Frontend

  • Vercel Analytics for page performance
  • Error tracking (Sentry optional)
  • User flow monitoring

Backend

  • API latency metrics
  • Error rate monitoring
  • Database query performance
  • Cost tracking (API usage)

Known Limitations (Phase 1)

  • ⚠️ No multi-language support (English only)
  • ⚠️ PDF parsing is basic text extraction
  • ⚠️ Graph visualization limited to 3-8 concepts
  • ⚠️ No collaborative editing
  • ⚠️ No offline support
  • ⚠️ Mobile experience is basic (optimized for desktop)

Contributing

Development Workflow

  1. Create feature branch: git checkout -b feature/my-feature
  2. Make changes and commit: git commit -m "Add feature"
  3. Push to remote: git push origin feature/my-feature
  4. Create pull request for review

Code Standards

  • TypeScript for type safety
  • ESLint for code quality
  • Prettier for formatting
  • Tests for critical paths
  • Clear commit messages

Resources

Documentation

External References

Reference Projects

  • Portfolio Knowledge Graph: /Users/omumrania/Documents/GitHub/Personal Project/portfolio/app/graph
  • KMS Google ADK: /Users/omumrania/Documents/GitHub/Personal Project/KMS-Google-ADK
  • Sakhi AI Chatbot: /Users/omumrania/Documents/GitHub/sakhi-ai-main

FAQ

Why not build as a static knowledge graph?

ProofNote focuses on conversion over storage. Phase 1 proves users want their learning converted quickly and shared. Phase 2 adds the persistent graph layer.

How does the AI know what to extract?

Claude API is prompted with:

  • Source type context (classroom note vs. book highlight)
  • Intended audience (self vs. public)
  • Extraction framework (5-7 key concepts max)
  • Example outputs for consistency

What if Claude API fails?

We implement:

  • Exponential backoff retries (3 attempts)
  • Graceful fallbacks (simpler summaries)
  • Clear error messages to users
  • Rate limiting to prevent cascading failures

Can users export their data?

Phase 2 feature. Currently, users can copy/paste card content and export notes as JSON.


Timeline

Phase Focus Timeline Status
1 MVP conversion loop 2-3 weeks IN PROGRESS
2 Social layer 3-4 weeks Planned
3 Community features 4-5 weeks Planned
4 AI agent avatar TBD Planned

Contact & Support

Creator: Om Umrania
Email: omumrania2020@gmail.com
Repository: GitHub - KnowNet


License

MIT License - See LICENSE file for details


Last Updated: 2026-06-27
Status: Phase 1 - Planning & Setup
Version: 0.1.0 (Pre-MVP)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors