Your AI-Powered Study Companion
Transform your learning experience with intelligent document processing, AI-generated quizzes, and collaborative study features.
SmartNotes AI is a cutting-edge educational platform that revolutionizes how students interact with study materials. By leveraging advanced AI technologies, it transforms static documents into interactive learning experiences through intelligent processing, contextual Q&A, automated quiz generation, and collaborative study environments.
- Enhanced Comprehension: AI-powered analysis helps students understand complex materials
- Active Learning: Automated quizzes and interactive features promote engagement
- Collaborative Study: Real-time sessions enable peer learning and knowledge sharing
- Progress Tracking: Comprehensive analytics help students monitor their learning journey
Transform any PDF, DOC, or TXT file into an AI-ready knowledge base:
- Intelligent Text Extraction: Advanced parsing for clean, structured content
- AI Vectorization: Convert documents into searchable knowledge vectors
- Auto-Categorization: Smart tagging and subject assignment
- Content Summarization: Generate concise summaries for quick review
Get instant, contextual answers to your study questions:
- Document-Based Responses: Answers derived directly from your uploaded materials
- Follow-Up Suggestions: AI-generated related questions for deeper exploration
- Real-World Examples: Contextual examples to enhance understanding
- Confidence Scoring: Know how reliable each answer is with confidence indicators
Create personalized quizzes from your documents:
- Adaptive Difficulty: Questions tailored to your learning level
- Multiple Formats: Multiple-choice, short-answer, and essay questions
- Time Constraints: Customizable time limits for focused practice
- Performance Analytics: Track quiz scores and improvement over time
Study together, even when apart:
- Real-Time Chat: Instant messaging with study partners
- Document Sharing: Collaborative access to uploaded materials
- Group Learning: Multi-user study environments for peer interaction
- Session History: Review past collaborative sessions
Monitor your learning journey with comprehensive insights:
- Study Time Metrics: Track hours spent on different subjects
- Performance Trends: Visualize quiz scores and improvement patterns
- Streak Counters: Maintain motivation with daily study streaks
- Goal Management: Set and track weekly learning objectives
Celebrate milestones with a rewarding badge system:
- Study Milestones: Recognition for consistent learning habits
- Quiz Mastery: Badges for quiz performance achievements
- Collaboration Rewards: Recognition for active participation in study groups
- Progress Indicators: Visual feedback on learning advancement
| Layer | Technology | Purpose |
|---|---|---|
| Framework | Next.js 15 | App Router, SSR, and optimized performance |
| Language | TypeScript | Type safety and enhanced developer experience |
| UI Components | shadcn/ui + Radix UI | Accessible, customizable UI components |
| Styling | Tailwind CSS v4 | Utility-first CSS framework |
| Icons | Lucide React | Beautiful, consistent iconography |
| Forms | React Hook Form + Zod | Form validation and management |
| Database | Supabase | PostgreSQL with Row Level Security |
| Authentication | Custom JWT-based service | Secure user authentication and sessions |
| State Management | React Context API | Application state handling |
| Notifications | Sonner | Toast notifications |
| AI Integration | OpenAI API | Natural language processing and generation |
src/
βββ app/ # Next.js App Router structure
β βββ api/ # API routes for backend functionality
β β βββ auth/ # Authentication endpoints
β β βββ chat/ # AI chat and session management
β β βββ documents/ # Document processing APIs
β β βββ quizzes/ # Quiz generation and management
β βββ auth/ # Authentication pages
β βββ dashboard/ # Main dashboard with feature modules
β βββ subjects/ # Subject management interface
βββ components/ # Reusable UI components
β βββ auth/ # Login and registration components
β βββ dashboard/ # Dashboard layout and navigation
β βββ documents/ # Document management UI
β βββ layout/ # Core layout components
β βββ ui/ # shadcn/ui component library
βββ contexts/ # React context providers
β βββ AuthContext.tsx # Authentication state management
βββ lib/ # Business logic and services
β βββ ai-service.ts # AI integration layer
β βββ api-client.ts # API communication utilities
β βββ api-utils.ts # API helper functions
β βββ auth.ts # Authentication service
β βββ chat-session-service.ts # Chat session management
β βββ documents-service.ts # Document processing service
β βββ quizzes-service.ts # Quiz generation service
β βββ setup-db.ts # Database initialization
β βββ storage.ts # Local storage utilities
β βββ subjects-service.ts # Subject management service
βββ types/ # TypeScript definitions
βββ index.ts # Core data models and interfaces
interface User {
id: string;
email: string;
name: string;
role: 'student' | 'admin';
avatar?: string;
createdAt: string;
lastLoginAt: string;
}interface Subject {
id: string;
name: string;
description?: string;
color: string;
userId: string;
createdAt: string;
updatedAt: string;
}interface Document {
id: string;
title: string;
content: string;
type: 'pdf' | 'note' | 'study-guide';
subjectId: string;
userId: string;
fileUrl?: string;
extractedText?: string;
isProcessed: boolean;
tags: string[];
createdAt: string;
updatedAt: string;
}interface Quiz {
id: string;
title: string;
description?: string;
subjectId: string;
userId: string;
questions: Question[];
timeLimit?: number;
difficulty: 'easy' | 'medium' | 'hard';
isActive: boolean;
createdAt: string;
updatedAt: string;
}interface StudySession {
id: string;
title: string;
subjectId: string;
userId: string;
participants: string[];
isActive: boolean;
sharedDocuments: string[];
messages: ChatMessage[];
createdAt: string;
updatedAt: string;
}-
Clone the repository
git clone <repository-url> cd smartnotes-ai
-
Install dependencies
bun install
-
Environment setup
cp env.example .env # Update environment variables as needed -
Database initialization
bun run setup-db
# Development mode
bun dev
# Production build
bun run build
# Production server
bun run startThe application will be available at http://localhost:3000
-
Document Upload
- Navigate to Dashboard β Documents
- Upload a PDF or create a text note
- Wait for AI processing (simulated in mock version)
-
AI Chat Interaction
- Go to Dashboard β AI Chat
- Ask questions about your uploaded documents
- Explore suggested follow-up questions
-
Quiz Generation
- Visit Dashboard β Quizzes
- Create a new quiz from your documents
- Customize difficulty and time settings
-
Progress Monitoring
- Check Dashboard β Progress for analytics
- Review Dashboard β Achievements for badges
Supabase database implements RLS to ensure users only access their own data:
-- Example RLS policy
CREATE POLICY "Users can only access their own documents"
ON documents FOR ALL USING (user_id = auth.uid());- JWT-based session management
- Secure token refresh mechanisms
- Protected API routes with middleware
- Client-side localStorage for mock persistence
Proper CORS headers configured for iframe embedding:
headers: [
{
key: "Access-Control-Allow-Origin",
value: "*", // Restricted in production
},
{
key: "Content-Security-Policy",
value: "frame-ancestors 'self' *",
},
]| Package | Version | Purpose |
|---|---|---|
next |
15.2.4 | Framework |
react |
19.x | UI Library |
typescript |
5.x | Type Safety |
tailwindcss |
4.x | Styling |
lucide-react |
0.454.0 | Icons |
@radix-ui/* |
latest | UI Components |
react-hook-form |
7.x | Form Handling |
zod |
3.x | Validation |
openai |
5.x | AI Integration |
pdfjs-dist |
5.x | PDF Processing |
mammoth |
1.x | DOCX Processing |
recharts |
2.x | Data Visualization |
sonner |
1.x | Notifications |
- Use
"use client"directive for client components - Implement Suspense boundaries for async components
- Follow shadcn/ui component patterns for consistency
- Maintain proper TypeScript typing
- Prefer React Context for global state
- Use localStorage for mock persistence
- Implement proper loading and error states
- Wrap components with appropriate error boundaries
- Provide user-friendly error messages
- Log errors for debugging purposes
- Mobile-first approach with Tailwind CSS
- Test across different screen sizes
- Ensure accessibility compliance
- Connect your GitHub repository to Vercel
- Configure environment variables
- Deploy with zero configuration
# Build for production
bun run build
# Start production server
bun run startFROM oven/bun:latest
WORKDIR /app
COPY . .
RUN bun install
RUN bun run build
EXPOSE 3000
CMD ["bun", "run", "start"]- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a pull request
- All PRs require review from maintainers
- Automated tests must pass
- TypeScript compilation must succeed
- ESLint and formatting checks applied
For support, please:
- Open an issue on the GitHub repository
- Contact the development team
- Check the documentation for common issues
This project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ for students everywhere