✅ Collapsible Notebook Sidebar: The navbar now shows a collapsible list of notebooks instead of navigation pages ✅ Modern UI with Mantine 8: Beautiful design using Mantine components and modern CSS ✅ Demo Data: Working with realistic demo notebook data ✅ Authentication Integration: Shows different content based on Supabase authentication status ✅ Interactive Elements: Hover effects, context menus, and smooth animations ✅ TypeScript Types: Proper type definitions for notebooks and related interfaces ✅ Future-Ready Structure: Prepared for TanStack Query + Supabase integration
- Header Section: App branding with gradient icon
- Collapsible Notebook List: Click to expand/collapse
- Notebook Items: Each shows title, description, last updated date, and sharing status
- Context Menus: Right-click actions for rename, duplicate, delete
- Create Button: Quick action to create new notebooks
- Authentication State: Different views for logged in/out users
- Responsive Design: Works on mobile and desktop
- Modern Animations: Smooth hover effects and transitions
- Mantine 8 Design System: Uses proper CSS variables and color schemes
- Dark/Light Theme Support: Automatically adapts to user preferences
src/components/navbar/navbar.tsx- Main navbar componentsrc/components/navbar/navbar.module.css- Styling for the navbar
src/types/notebook.ts- TypeScript interfaces for notebook data
src/hooks/useNotebooks.ts- TanStack Query hooks for notebook CRUD operations
src/lib/supabase.template.ts- Template for Supabase setup
When you're ready to connect to Supabase:
-
Install Dependencies:
npm install @supabase/supabase-js @tanstack/react-query
-
Set up Environment Variables (
.env.local):VITE_SUPABASE_URL=your_supabase_project_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
-
Create Database Schema (run in Supabase SQL editor):
CREATE TABLE notebooks ( id UUID DEFAULT gen_random_uuid() PRIMARY KEY, title TEXT NOT NULL, description TEXT, content JSONB DEFAULT '{"cells": []}'::jsonb, created_at TIMESTAMPTZ DEFAULT NOW(), updated_at TIMESTAMPTZ DEFAULT NOW(), user_id TEXT NOT NULL, is_shared BOOLEAN DEFAULT FALSE, shared_with TEXT[] DEFAULT '{}', tags TEXT[] DEFAULT '{}' ); ALTER TABLE notebooks ENABLE ROW LEVEL SECURITY; CREATE POLICY "Users can access own notebooks" ON notebooks FOR ALL USING (auth.jwt() ->> 'sub' = user_id);
-
Update Configuration:
- Rename
src/lib/supabase.template.tstosrc/lib/supabase.ts - Add your actual Supabase credentials
- Rename
-
Enable TanStack Query (in
main.tsx):import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; const queryClient = new QueryClient(); // Wrap your app with QueryClientProvider
-
Update Navbar Component:
- Uncomment the hook imports in
navbar.tsx - Replace demo data with actual hooks
- Uncomment the hook imports in
The navbar currently shows 4 demo notebooks:
- Financial Analysis
- Data Science Workshop
- Math Playground
- Quick Calculations
Each has realistic metadata like creation dates, descriptions, and sharing status.
- Smooth Animations: Hover effects and state transitions
- Context-Aware: Different states for authenticated/unauthenticated users
- Accessible: Proper focus management and keyboard navigation
- Mobile-Friendly: Responsive design that works on small screens
- Visual Feedback: Clear indication of active states and interactions
The navbar is now ready for production use with demo data, and can be easily connected to Supabase when you're ready!