A digital library project built with React, TypeScript, and Vite that allows users to fetch books, manage their personal library, and analyze texts using AI.
- 📚 Search and fetch books from Gutenberg
- 📖 Read books directly in the application
- ⭐ Add books to your personal library
- 🤖 AI-powered text analysis and insights
- 📱 Responsive design for desktop and mobile
- Node.js (LTS version recommended)
- npm or yarn package manager
- Supabase account
- Install the Supabase CLI
- Run
supabase login
npx supabase db push --db-url postgres://postgres.[YOUR-PROJECT-ID]:[YOUR-DATABASE-PASSWORD]@aws-0-[YOUR-AWS-REGION].pooler.supabase.com:6543/postgres
This will create database structure in your supabase using supabase/migrations/
The supabase/functions
directory contains the following edge functions that need to be deployed:
supabase functions deploy search_book
supabase functions deploy fetch_book_content
supabase functions deploy text_analysis
- Add
GROK_API_TOKEN
to the Edge Function Secrets Management in your Supabase dashboard
-
Clone the repository:
git clone [email protected]:wonderer007/digital-library.git cd digital-library
-
Install dependencies:
npm install # or yarn
-
Configure environment variables: Create a
.env
file in the project root with the following variables:VITE_SUPABASE_URL=your_supabase_project_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
npm run dev
# or
yarn dev
Opens the development server at http://localhost:5173
npm run test
# or
yarn test