Skip to content

oueslati1990/Notebook-LM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NotebookLM

A NotebookLM-like application for creating summaries from uploaded documents using RAG (Retrieval-Augmented Generation).

Features

  • Project Management: Create and manage document projects
  • File Upload: Support for PDF, TXT, and DOCX files
  • AI Summarization: Generate intelligent summaries using OpenAI
  • Vector Search: Efficient document chunking and embedding with Cohere
  • Authentication: Secure user authentication with Keycloak
  • Modern UI: Responsive Angular frontend with Angular Material

Tech Stack

Backend (.NET 8)

  • Architecture: Clean Architecture pattern
  • Database: PostgreSQL with PgVector extension
  • Authentication: Keycloak integration
  • AI Services: OpenAI for text generation, Cohere for embeddings

Frontend (Angular + TypeScript)

  • Framework: Angular 17 with standalone components
  • UI Library: Angular Material
  • State Management: RxJS
  • Routing: Angular Router
  • Authentication: Keycloak Angular

DevOps

  • Containerization: Docker Compose
  • Database: PostgreSQL with PgVector
  • Authentication: Keycloak

Quick Start

Prerequisites

  • Docker and Docker Compose
  • .NET 8 SDK (for local development)
  • Node.js 18+ (for local development)

Setup

  1. Clone the repository

    git clone <repository-url>
    cd Notebook-LM
  2. Environment Configuration

    cp .env.example .env
    # Edit .env with your OpenAI API key and other configuration
  3. Start with Docker Compose

    docker-compose up -d

    This will start:

    • PostgreSQL with PgVector (port 5432)
    • Keycloak (port 8080)
    • Backend API (port 5000)
    • Frontend (port 3000)
  4. Access the application

Local Development

Backend

cd backend
dotnet restore
dotnet run --project src/NotebookLM.API

Frontend

cd frontend
npm install
npm start

Project Structure

├── backend/                 # .NET Core backend
│   ├── src/
│   │   ├── NotebookLM.API/          # Web API layer
│   │   ├── NotebookLM.Application/  # Application layer
│   │   ├── NotebookLM.Domain/       # Domain layer
│   │   └── NotebookLM.Infrastructure/ # Infrastructure layer
│   └── Dockerfile
├── frontend/                # Angular frontend
│   ├── src/
│   │   ├── app/
│   │   │   ├── components/  # Angular components
│   │   │   ├── pages/      # Page components
│   │   │   ├── services/   # Angular services
│   │   │   ├── guards/     # Route guards
│   │   │   └── models/     # TypeScript interfaces
│   │   ├── assets/         # Static assets
│   │   └── environments/   # Environment configs
│   ├── angular.json        # Angular CLI config
│   └── Dockerfile
├── docker/                 # Docker configuration
│   └── init-scripts/       # Database initialization
├── docker-compose.yml      # Container orchestration
└── .env.example           # Environment variables template

Environment Variables

Create a .env file with the following variables:

# OpenAI API Configuration
OPENAI_API_KEY=your_openai_api_key_here

# Database Configuration
DB_HOST=localhost
DB_PORT=5432
DB_NAME=notebooklm
DB_USER=postgres
DB_PASSWORD=postgres

# Keycloak Configuration
KEYCLOAK_URL=http://localhost:8080
KEYCLOAK_REALM=notebooklm
KEYCLOAK_CLIENT_ID=notebooklm-client

# API Configuration
API_URL=http://localhost:5000
FRONTEND_URL=http://localhost:3000

Development Workflow

  1. Database Migrations (when schema changes)

    cd backend
    dotnet ef migrations add MigrationName --project src/NotebookLM.Infrastructure --startup-project src/NotebookLM.API
    dotnet ef database update --project src/NotebookLM.Infrastructure --startup-project src/NotebookLM.API
  2. Running Tests

    # Backend tests
    cd backend && dotnet test
    
    # Frontend tests
    cd frontend && npm test
  3. Building for Production

    # Build all services
    docker-compose -f docker-compose.yml build
    
    # Or build individually
    cd backend && dotnet build --configuration Release
    cd frontend && npm run build

API Documentation

Once the backend is running, visit:

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

a Google NotebookLM-like project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published