Note God is an intelligent, AI-powered note-taking application that transforms how you create, manage, and interact with your notes. Built with cutting-edge technologies, it combines the simplicity of note-taking with the power of artificial intelligence to enhance your productivity.
- Smart Note Creation: Create and organize notes with a clean, intuitive interface
- Real-time Editing: Seamless note editing experience with auto-save capabilities
- User Authentication: Secure user registration, login, and profile management
- Responsive Design: Optimized for desktop and mobile devices
- AI Note Generation: Generate comprehensive notes on any topic using advanced AI models (OpenAI, Gemini)
- Interactive Q&A: Ask questions about your notes and get intelligent responses
- Content Analysis: AI-powered insights and suggestions for your content
- Smart Formatting: Automatic formatting and structure suggestions
- PDF Chat (RAG): Upload PDF documents and chat with them using Retrieval Augmented Generation
- AI Image Generation: Create stunning images from text prompts using Pollinations API
- Real-time Collaboration: Live updates and synchronization via Socket.IO
- Community Chat: Real-time messaging and collaboration with other users
- Vector Search: Semantic search across your notes using Qdrant vector database
- Background Processing: Asynchronous file processing with BullMQ workers
- Search & Filter: Powerful search functionality across all your notes
- Theme Support: Dark/light mode toggle for comfortable viewing
- Export Options: Various export formats for your notes
- Next.js 15.2.8 - React framework with App Router
- React 19 - Latest React with modern features
- TypeScript - Type-safe development
- Tailwind CSS 4 - Utility-first CSS framework
- Radix UI - Accessible component primitives
- Lucide React - Beautiful icons
- Socket.IO Client - Real-time bidirectional communication
- Prisma ORM - Type-safe database client
- PostgreSQL - Robust relational database
- Supabase - Authentication and real-time features
- Socket.IO Server - Real-time WebSocket server
- Redis - In-memory data store for caching and queuing
- BullMQ - Background job processing and task queue
- Qdrant - Vector database for semantic search and RAG
- Google Gemini - Alternative AI model support
- LangChain - Framework for building AI applications
- Pollinations API - AI image generation from text prompts
- RAG (Retrieval Augmented Generation) - PDF document chat functionality
- ESLint - Code linting and formatting
- Prettier - Code formatting
- Turbopack - Fast bundler for development
- Docker & Docker Compose - Containerization and orchestration
Before setting up Note God, ensure you have the following installed:
- Node.js (version 18.0 or higher)
- npm package manager
- PostgreSQL database (local or cloud)
- Git for version control
git clone https://github.com/abhas20/Note_God.git
cd Note_Godnpm installCreate a .env file in the root directory and add run the command:
cp .env.example .envNote: If using Docker Compose, some URLs will need to be adjusted (see Docker deployment section).
- Install PostgreSQL on your system
- Create a new database:
CREATE DATABASE note_god_db;- Update the
DB_URLin your.env.localfile
- Use services like Supabase or Neon
- Copy the connection string to your
DB_URLenvironment variable
- Go to Supabase and create a new project
- Get your project URL and anon key from the API settings
- Add these to your
.envfile - Supabase will handle user authentication and real-time features
Redis is required for background job processing and real-time features.
Local Installation:
# macOS
brew install redis
brew services start redis
# Ubuntu/Debian
sudo apt-get install redis-server
sudo systemctl start redis
# Windows (via WSL or download from Redis website)Docker (Recommended):
docker run -d -p 6379:6379 --name redis redis:alpineQdrant is required for vector search and PDF chat functionality.
Docker (Recommended):
docker run -d -p 6333:6333 --name qdrant qdrant/qdrant:latestOr use the provided Docker Compose (see deployment section).
- Get an API key from Google AI Studio (https://makersuite.google.com/app/apikey)
- Add
GEMINI_API_KEYto your.envfile
The socket server handles real-time communication. It needs its own .env file:
Create .env file in the socket-server directory:
cd socket-server
cp .env.example .envStart the socket server in a separate terminal:
cd socket-server
npm install
npm run devRun Prisma migrations to set up your database schema:
npm run migrate
# or
npx prisma generate && npx prisma migrate devMain Application:
npm run devWorker Process (in a separate terminal for background jobs):
npm run dev:workersOr run both together:
npm run allEnsure env files are created
- (For Development)
docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build -d
- (For Production)
docker-compose up --build -d
Open http://localhost:3000 in your browser to see the application.
Note_God/
βββ src/
β βββ action/ # Server actions
β β βββ note.ts # Note-related actions
β β βββ user.ts # User-related actions
β β βββ rag.ts # RAG and file upload actions
β βββ app/ # Next.js App Router pages
β β βββ api/ # API routes
β β β βββ create-new-note/ # Create notes
β β β βββ query-rag/ # RAG query endpoint
β β β βββ messages/ # Chat messages
β β β βββ ... # Other API routes
β β βββ auth/ # Authentication pages
β β βββ login/ # Login page
β β βββ signup/ # Signup page
β β βββ profile/ # User profile
β β βββ chatpdf/ # PDF chat interface
β β βββ visualise/ # AI image generation
β β βββ page.tsx # Home page
β βββ auth/ # Authentication utilities
β β βββ server.ts # Server-side auth functions
β βββ components/ # React components
β β βββ ui/ # Base UI components
β β βββ AskAIButton.tsx # AI Q&A functionality
β β βββ NewNoteButton.tsx # Create new notes
β β βββ NoteGenerator.tsx # AI note generation
β β βββ NoteTextInput.tsx # Note editor
β β βββ ComunityChat.tsx # Community chat UI
β β βββ Visualise.tsx # Image generation UI
β β βββ FileLayout.tsx # PDF file management
β β βββ AppSideBar.tsx # Application sidebar
β βββ db/ # Database configuration
β β βββ prisma.ts # Prisma client
β β βββ schema.prisma # Database schema
β βββ hooks/ # Custom React hooks
β βββ lib/ # Utility functions
β βββ worker/ # Background workers
β β βββ fileProcessor.ts # File processing worker
β βββ providers/ # React context providers
β βββ middleware.ts # Next.js middleware
β βββ style/ # Global styles
βββ socket-server/ # Real-time Socket.IO server
β βββ app.ts # Socket server application
β βββ services/ # Socket services
β βββ package.json # Socket server dependencies
βββ ai/ # AI configuration
βββ public/ # Static assets
βββ docker-compose.yml # Docker Compose configuration
βββ Dockerfile # Application Docker image
βββ package.json # Dependencies and scripts
βββ tailwind.config.js # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ README.md # Project documentation
npm run dev- Start development server with Turbopacknpm run dev:workers- Start background worker process for file processingnpm run all- Run both dev server and workers concurrentlynpm run build- Build the application for production (includes Prisma migrations)npm start- Start the production servernpm run lint- Run ESLint for code lintingnpm run format- Format code with Prettiernpm run migrate- Run Prisma database migrations
The easiest way to deploy Note God is using Docker Compose, which sets up all services:
- Create Environment Files:
Ensure .env in the root directory and .env in the socket-server directory:
- Start All Services:
docker-compose up -dThis will start:
- Main Next.js application (port 3000)
- Background workers for file processing
- Socket.IO server (port 4000)
- Redis (port 6379)
- Qdrant vector database (port 6333)
- View Logs:
docker-compose logs -f- Stop Services:
docker-compose down- Sign Up: Create an account using email and password
- Create Your First Note: Click "New Note" to start writing
- Try AI Features:
- Use "Ask AI to generate Notes" for automated content creation
- Use "Ask AI Help" to get insights about your notes
- Upload PDFs: Navigate to the "Chat with PDF" section to upload documents and ask questions
- Generate Images: Use the "Visualise" feature to create AI-generated images from text prompts
- Community Chat: Connect with other users through real-time messaging
- Organize: Create multiple notes for different topics
- Search: Use the search functionality to find specific content
- Secure Authentication: Powered by Supabase Auth
- Data Encryption: All sensitive data is encrypted
- API Protection: Server actions with user validation
- Environment Security: Sensitive keys stored in environment variables
Database Connection Error
# Verify your database URL and run:
npx prisma db pushSupabase Auth Issues
# Check your Supabase URL and keys in .env.local
# Ensure your Supabase project is activeAI Features Not Working
# Verify your OpenAI or Gemini API key
# Check if you have sufficient API creditsRedis Connection Error
# Ensure Redis is running:
redis-cli ping
# Should return: PONG
# Or start Redis:
brew services start redis # macOS
sudo systemctl start redis # Linux
docker start redis # DockerQdrant Connection Error
# Check if Qdrant is running:
curl http://localhost:6333/health
# Should return: {"title":"qdrant - vector search engine","version":"..."}
# Or start Qdrant:
docker start qdrantSocket Server Not Connecting
# Verify socket server is running on port 4000
# Check SOCKET_SERVER_URL in environment variables
# Ensure Redis is accessible to socket serverWorker Process Not Running
# Start workers separately:
npm run dev:workers
# Check Redis connection for BullMQPDF Upload/Chat Issues
# Ensure Qdrant is running and accessible
# Verify QDRANT_URL in environment variables
# Check worker process is running for file processingIf you encounter issues:
- Check the console for error messages
- Verify all environment variables are set correctly
- Ensure your database is properly configured
- Check that all services (Redis, Qdrant, Socket server) are running
- Verify APIs (Supabase, Gemini) are accessible
- Review Docker logs if using Docker Compose:
docker-compose logs -f
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js for the amazing React framework
- Tailwind CSS for utility-first styling
- Radix UI for accessible components
- Supabase for authentication and database
- Google Gemini for advanced AI capabilities
- Socket.IO for real-time communication
Upload any PDF document and have intelligent conversations about its content. The system uses Retrieval Augmented Generation (RAG) with Qdrant vector database for semantic search.
Transform your ideas into stunning visuals using the Pollinations API. Generate images from text prompts with customizable parameters.
Connect with other users through WebSocket-powered real-time messaging. All messages are synchronized instantly across all connected clients.
Heavy tasks like PDF processing and vector embeddings run asynchronously using BullMQ workers, ensuring the UI remains responsive.
Leverage Qdrant's vector database for semantic search across your notes and documents, finding relevant content even when exact keywords don't match.
Note God - Transform your note-taking experience with the power of AI! π