A NotebookLM-like application for creating summaries from uploaded documents using RAG (Retrieval-Augmented Generation).
- 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
- Architecture: Clean Architecture pattern
- Database: PostgreSQL with PgVector extension
- Authentication: Keycloak integration
- AI Services: OpenAI for text generation, Cohere for embeddings
- Framework: Angular 17 with standalone components
- UI Library: Angular Material
- State Management: RxJS
- Routing: Angular Router
- Authentication: Keycloak Angular
- Containerization: Docker Compose
- Database: PostgreSQL with PgVector
- Authentication: Keycloak
- Docker and Docker Compose
- .NET 8 SDK (for local development)
- Node.js 18+ (for local development)
-
Clone the repository
git clone <repository-url> cd Notebook-LM
-
Environment Configuration
cp .env.example .env # Edit .env with your OpenAI API key and other configuration -
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)
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- Keycloak Admin: http://localhost:8080 (admin/admin)
cd backend
dotnet restore
dotnet run --project src/NotebookLM.APIcd frontend
npm install
npm start├── 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
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-
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 -
Running Tests
# Backend tests cd backend && dotnet test # Frontend tests cd frontend && npm test
-
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
Once the backend is running, visit:
- Swagger UI: http://localhost:5000/swagger
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.