Technology Stack
Uxie is built with modern, battle-tested technologies chosen for developer experience, performance, and scalability. This page documents every major dependency and explains why it was chosen.Core Framework
Next.js 14
Version: 14.2.35Full-stack React framework with:
- Hybrid routing (App + Pages Router)
- API routes for serverless functions
- Automatic code splitting
- Built-in optimization
React 18
Version: 18.2.0UI library with:
- Concurrent rendering
- Suspense boundaries
- Server Components support
- Streaming SSR
Type Safety Layer
TypeScript
Version: 5.7.3 Provides static typing across the entire codebase, catching errors at compile time rather than runtime.tRPC
Version: 10.34.0tRPC Packages
tRPC Packages
@trpc/server- Server-side router and procedures@trpc/client- Type-safe client@trpc/next- Next.js adapter@trpc/react-query- React Query integration
Zod
Version: 4.1.13 Schema validation library used for:- Runtime type validation
- Input sanitization
- Form validation with React Hook Form
- Environment variable validation
Backend Infrastructure
Database & ORM
Supabase PostgreSQL
Managed PostgreSQL database with:
- Row-level security
- Built-in authentication (not used, using NextAuth instead)
- Real-time subscriptions
- Automatic backups
@supabase/[email protected]Authentication
NextAuth.js v4.24.5 Authentication library with:- OAuth providers (Google)
- Session management
- JWT tokens
- Prisma adapter
[email protected]@next-auth/[email protected]
AI & Machine Learning
LLM Integration
Vercel AI SDK
Version: 6.0.6
- Streaming text generation
- Tool/function calling
- Multi-provider support
- React hooks for UI
[email protected]@ai-sdk/[email protected]@ai-sdk/[email protected]
Google Gemini
Model: Gemini 2.5 FlashUsed for:
- PDF question answering
- Flashcard generation
- Flashcard evaluation
- Text completion & enhancement
Vector Database & Embeddings
Pinecone
Version: 6.1.3 (
@pinecone-database/pinecone)Managed vector database for:- Storing 768-dimensional embeddings
- Similarity search (cosine metric)
- Namespace-based multi-tenancy
HuggingFace Embeddings
Version: 4.13.4 (
@huggingface/inference)Model: BAAI/bge-base-en-v1.5- Generates 768-dimensional embeddings
- Optimized for retrieval tasks
- Free to use via HuggingFace API
Langchain
Version: 0.0.171Framework for:
- Document loading (
PDFLoader) - Text splitting (
RecursiveCharacterTextSplitter) - Vector store integration (
PineconeStore)
@langchain/[email protected]Client-Side AI
Transformers.js
Transformers.js
Version: 3.8.1 (
@huggingface/transformers)Runs ML models in the browser:- OCR with Tesseract
- Local embeddings
- Text processing
PDF Processing
react-pdf-highlighter
Version: 6.1.0 (patched)Fork of
react-pdf-highlighter with:- Text highlighting
- Area selection
- Custom annotations
- Coordinates tracking
pdfjs-dist
Version: 2.16.105Mozilla’s PDF.js library:
- PDF rendering
- Text extraction
- Canvas-based display
[email protected]- Server-side parsing
OCR Support
scribe.js-ocr v0.9.3 Client-side OCR for scanned PDFs:- Tesseract.js integration
- English language support
- Browser-based processing
Rich Text Editor
BlockNote v0.17.1 Notion-style block editor with:- Markdown support
- Drag-and-drop blocks
- Slash commands
- Custom blocks
@blocknote/core@blocknote/react@blocknote/mantine
Real-time Collaboration
Liveblocks v1.7.0 Real-time collaboration infrastructure:- Presence (cursors, avatars)
- Shared state
- Yjs CRDT integration
@liveblocks/client@liveblocks/react@liveblocks/yjs[email protected]
UI Framework
Component Libraries
Radix UI
Headless, accessible component primitives:
@radix-ui/react-dialog@radix-ui/react-dropdown-menu@radix-ui/react-popover@radix-ui/react-accordion@radix-ui/react-slider- And more…
Styling
Tailwind CSS v3.3.3 Utility-first CSS framework with:- JIT compilation
- Custom design tokens
- Typography plugin
- Animation plugin
[email protected]@tailwindcss/[email protected][email protected][email protected]- Merge classes safely
[email protected]- Type-safe variants[email protected]- Class name utility
Data Fetching & State
React Query
Version: 4.29.25Server state management:
- Caching & invalidation
- Optimistic updates
- Background refetching
- Pagination & infinite scroll
Zustand
Version: 4.4.6Client state management:
- Minimal boilerplate
- No providers needed
- DevTools integration
Form Handling
React Hook Form v7.46.2 Performant form library with:- Uncontrolled components
- Schema validation via Zod
- Error handling
@hookform/[email protected] - Zod integration
File Upload
UploadThing v7.0.2 File upload infrastructure with:- Serverless file handling
- CDN delivery
- Type-safe API
[email protected]@uploadthing/[email protected]
Text-to-Speech
TTS Providers
TTS Providers
Multiple TTS providers for flexibility:
- Browser Native - Web Speech API (free)
- Kokoro.js v1.2.1 - Local neural TTS models
- Custom Provider - Abstract interface for extensibility
src/lib/tts/providers/Utilities & Helpers
Essential Libraries
| Package | Version | Purpose |
|---|---|---|
superjson | 1.13.1 | Serialize Dates, Maps, Sets over network |
nuqs | 1.17.8 | Type-safe search params (URL state) |
usehooks-ts | 3.1.1 | Collection of useful React hooks |
use-debounce | 9.0.4 | Debounce values and functions |
react-hotkeys-hook | 5.2.3 | Keyboard shortcuts |
react-intersection-observer | 9.5.3 | Visibility detection |
framer-motion | 10.16.4 | Animation library |
lucide-react | 0.563.0 | Icon library |
sonner | 1.4.41 | Toast notifications |
cmdk | 1.0.0 | Command palette (Cmd+K) |
vaul | 1.0.0 | Bottom sheet drawer |
UI Utilities
[email protected]- Resizable split panels[email protected]- Auto-growing textareas[email protected]- Balanced text wrapping[email protected]- Markdown renderer[email protected]- SEO meta tags
Development Tools
Code Quality
ESLint
Version: 8.47.0Linting with:
eslint-config-next- Next.js rules@typescript-eslint/eslint-plugin- TypeScript rules
Build Tools
- PostCSS v8.4.27 - CSS transformation
- Autoprefixer v10.4.14 - Vendor prefixes
- TSX v4.9.3 - TypeScript executor for scripts
- Terser v5.3.16 - JavaScript minification
Environment Variables
Required Environment Variables
Required Environment Variables
@t3-oss/[email protected] and Zod in src/env.mjs.Version Requirements
Node.js
Minimum: v18.16.0Required for:
- Native fetch API
- ESM support
- Crypto APIs
pnpm
Version: 9.14.2Package manager with:
- Faster installs
- Disk space efficiency
- Patch support
Why These Choices?
Type Safety Everywhere
Every layer has type safety:- Database → Prisma types
- API → tRPC procedures
- Forms → Zod schemas
- UI → TypeScript components
Performance First
- Edge-ready - Most APIs can run on edge
- Streaming - AI responses stream to reduce latency
- Code splitting - Automatic with Next.js
- Vector search - Sub-second similarity queries
Developer Experience
- End-to-end types - Auto-complete everywhere
- Hot reload - Fast development cycle
- No code generation - Types inferred, not generated
- Modern tooling - ESLint, Prettier, TypeScript
Dependency Management
Patch Strategy
Patched dependencies inpnpm.patchedDependencies:
pnpm patch command.
Update Strategy
- Major versions - Reviewed quarterly
- Minor versions - Updated monthly
- Patch versions - Auto-updated with Dependabot
- Security patches - Immediate updates
Next Steps
Architecture
Learn how these technologies work together
Contributing
Set up your development environment
