A modern full-stack application that uses multi-provider AI to generate personalized tests and study materials from any text content, with advanced analytics and learning insights.
For comprehensive project documentation, see:
- Project Documentation - Technical overview, architecture, and implementation details
- Context & Vision - Project vision, learning science foundation, and future roadmap
- Architecture Analysis - Frontend/backend architecture and component analysis
- AI Integration Plan - Multi-provider AI system design and implementation
- Backend Documentation - Complete backend API and service documentation
- State Management - Zustand store architecture and implementation
- Deployment Guide - Production deployment instructions
studywise-ai/
├── client/ # React frontend application
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components
│ │ ├── stores/ # Zustand state management
│ │ ├── contexts/ # React contexts
│ │ ├── hooks/ # Custom React hooks
│ │ ├── lib/ # Utilities and configurations
│ │ ├── types/ # TypeScript type definitions
│ │ ├── utils/ # Helper functions
│ │ └── services/ # API service functions
│ ├── public/
│ └── index.html
├── server/ # Node.js/Express backend
│ ├── controllers/ # Route handlers
│ ├── services/ # Business logic (AI, database)
│ ├── lib/ # Database and utility functions
│ ├── routes.ts # API route definitions
│ ├── index.ts # Server entry point
│ ├── config.ts # Server configuration
│ └── storage.ts # Legacy storage (deprecated)
├── shared/ # Shared types and utilities
├── config/ # Configuration files
│ ├── vite.config.ts # Frontend build configuration
│ ├── tsconfig.json # TypeScript configuration
│ └── tailwind.config.ts # Styling configuration
├── scripts/ # Build and deployment scripts
├── docs/ # Documentation
├── supabase/ # Database migrations and config
└── src/ # Legacy source directory (deprecated)
- Node.js 18+
- npm or yarn
- Git
-
Clone the repository
git clone <repository-url> cd studywise-ai
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env # Edit .env with your API keys -
Start development servers individually
# Terminal 1: Start the backend server npm run dev:server # Terminal 2: Start the frontend client npm run dev:client
-
Open your browser
- Frontend: http://localhost:8080 (or next available port)
- Backend API: http://localhost:5000
-
Configure API endpoint
- For local development:
VITE_API_URL=http://localhost:5000in.env - For production:
VITE_API_URL=https://your-backend-API.comin.env
- For local development:
npm run dev:client # Start only frontend (Vite dev server)
npm run dev:server # Start only backend (Express server)npm run build # Build both client and server
npm run build:client # Build only frontend
npm run build:server # Build only backendnpm run start:prod # Start production server
npm run preview # Preview built clientnpm run test:deployment # Test deployment readinessCreate a .env file in the project root:
# AI Configuration
GEMINI_API_KEY=your_gemini_api_key
VITE_GEMINI_API_KEY=your_gemini_api_key
OPENROUTER_API_KEY=your_openrouter_api_key
VITE_OPENROUTER_API_KEY=your_openrouter_api_key
# Database & Auth
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
GOOGLE_OAUTH_CLIENT_ID=your_google_oauth_client_id
GOOGLE_OAUTH_CLIENT_SECRET=your_google_oauth_client_secret
# API Configuration
VITE_API_URL=https://your-deployed-backend.com
# Server
NODE_ENV=development
PORT=5000POST /api/tests/generate- Generate questions from contentPOST /api/tests/flashcards- Generate flashcardsPOST /api/tests/:testId/results- Save test results with user answersPOST /api/tests/:testId/insights- Generate AI-powered performance insightsGET /api/library- Retrieve user's saved tests and materialsGET /health- Health check endpoint
- Framework: React 18 with TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS + shadcn/ui
- State Management: Zustand
- Routing: Wouter
- API Client: Custom hooks with React Query
- Runtime: Node.js with TypeScript
- Framework: Express.js
- AI Integration: Multi-provider AI system (Google Gemini, OpenRouter, Claude, GPT)
- Authentication: Supabase Auth with OAuth support
- Database: Supabase (PostgreSQL) with Row-Level Security
- Deployment: Render with automatic scaling
- Caching: In-memory caching for AI responses
- Rate Limiting: Intelligent throttling across AI providers
- Multi-Provider AI System: Intelligent failover between Gemini, GPT, Claude, and other models
- Advanced Document Processing: Support for PDF, DOCX, TXT, and Markdown files
- Source-Linked Questions: Every question traces back to its origin in the source material
- AI-Powered Insights: Automated performance analysis and study recommendations
- Comprehensive Analytics: Detailed progress tracking and learning patterns
- Mobile-First Design: Fully responsive interface optimized for all devices
- Real-Time Test Taking: Live progress tracking with auto-save functionality
- Secure Authentication: Supabase Auth with OAuth support
- Connect your GitHub repository to Render
- Create a Blueprint deployment using
render.yaml - Configure environment secrets
- Deploy automatically
- Build the client:
npm run build:client - Deploy
dist/public/directory - Configure environment variables:
VITE_API_URL- Backend API URLVITE_SUPABASE_URL- Supabase project URLVITE_SUPABASE_ANON_KEY- Supabase anonymous key
See docs/RENDER_DEPLOYMENT.md for detailed instructions.
npm run test:deploymentThis script validates:
- Environment variables configuration
- Project file structure integrity
- Server startup and health checks
- API endpoint connectivity
- Build process validation
src/components/- Reusable UI components and overlayssrc/pages/- Page components (dashboard, landing, settings, etc.)src/stores/- Zustand state management storessrc/contexts/- React context providers (auth, etc.)src/hooks/- Custom React hookssrc/lib/- Utilities, API clients, and configurationssrc/types/- TypeScript type definitionssrc/utils/- Helper functions and utilitiessrc/services/- API service functionssrc/auth/- Authentication components
controllers/- Route handlers and business logicservices/- AI services and external integrationslib/- Database services and utilitiesroutes.ts- API route definitionsindex.ts- Server entry pointconfig.ts- Server configuration and environment setup
schema.ts- Database schema definitions
vite.config.ts- Frontend build configurationtsconfig.json- TypeScript configurationtailwind.config.ts- Styling configuration
CONTEXT.md- Comprehensive project overview and contextPROJECT_DOCUMENTATION.md- Technical documentationARCHITECTURE_ANALYSIS.md- Architecture decisionsRENDER_DEPLOYMENT.md- Deployment guidebackend_documentation_2025-09-12.md- Complete backend API documentationai-plan.md- Multi-provider AI integration planzustant-state-management-setup.md- State management implementationdatabase_schema.sql- Database schemasupabase_and_OAuth_setup.md- Supabase and OAuth configuration
test-deployment.js- Pre-deployment testing and validation
migrations/- Database migration filesconfig.toml- Supabase project configuration
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
npm run test:deployment - Submit a pull request
This project is licensed under the GNU GPL version 3 - see the LICENSE file for details.
- Issues: GitHub Issues
- Documentation: See the 📚 Documentation section above
- Deployment: Render Deployment Guide
Built with React, TypeScript, Express, and AI