AI-Memory is a cutting-edge web application that combines traditional content management with AI-powered querying capabilities. Save your digital content and ask intelligent questions about it using advanced vector embeddings and AI models.
Experience the full application without any setup required! Create an account and start building your intelligent digital memory.
- Semantic Search: Query your saved content using natural language
- Vector Embeddings: Content automatically converted to vector embeddings using Pinecone
- Intelligent Responses: Powered by Google's Gemini AI for contextual answers
- Source Attribution: AI responses show which of your saved items were referenced
- Documents: Save text-based content and documents
- YouTube Videos: Store and query video content
- Social Media: Support for Twitter, LinkedIn, Instagram posts
- Web Links: Save any web content with descriptions
- Pinterest Pins: Visual content storage
- JWT Authentication: Secure user authentication system
- Private Namespaces: Your content is isolated using Pinecone namespaces
- Password Security: Bcrypt hashing with 12 salt rounds
- CORS Protection: Configured for secure cross-origin requests
- Public Brain Sharing: Share your memory collection with others
- Secure Hash Links: Generated unique links for sharing
- Read-Only Access: Shared collections are view-only for privacy
- React 18 with TypeScript
- Vite for fast development and building
- Tailwind CSS for responsive styling
- React Router for navigation
- Axios for API communication
- Node.js with Express.js
- TypeScript for type safety
- MongoDB with Mongoose ODM
- JWT for authentication
- Bcrypt for password hashing
- Google Gemini AI (gemini-2.0-flash-exp model)
- Pinecone vector database for embeddings
- Zod for input validation
- Node.js (v18 or higher)
- MongoDB database
- Pinecone account and API key
- Google AI Studio API key
-
Clone the repository
git clone https://github.com/Tiger-raj/ai-memory.git cd ai-memory/backend -
Install dependencies
npm install
-
Environment Variables Create a
.envfile in the backend directory:PORT=5000 MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key PINECONE_API_KEY=your_pinecone_api_key PINECONE_INDEX_NAME=your_pinecone_index_name PINECONE_HOST=your_pinecone_host_url GEMINI_API_KEY=your_google_gemini_api_key NODE_ENV=development
-
Start the backend server
npm run dev
-
Navigate to frontend directory
cd ../frontend -
Install dependencies
npm install
-
Environment Variables Create a
.envfile in the frontend directory:VITE_BACKEND_URL=http://localhost:5000
-
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:5173
Create a new user account.
{
"username": "string (6-30 chars)",
"password": "string (6-30 chars, uppercase, number, special char)"
}Sign in with existing credentials.
{
"username": "string",
"password": "string"
}Add new content to your memory.
{
"title": "string",
"link": "string (optional for documents)",
"type": "youtube|twitter|pinterest|linkedin|document|link|instagram",
"description": "string (optional, max 1000 chars)"
}Retrieve all your saved content.
Delete specific content item.
Query your content with AI.
{
"query": "string (max 1000 chars)"
}Response:
{
"message": "Query processed successfully",
"response": "AI-generated response",
"query": "original query",
"sourceCount": 3
}Toggle sharing of your memory collection.
{
"share": true
}Check current sharing status.
Access shared memory collection.
- Click "Add Content" in your dashboard
- Select content type (Document, YouTube, etc.)
- Enter title and optional link/description
- Content is automatically processed and stored
- Click "Query AI" in your dashboard
- Ask natural language questions about your content
- Receive intelligent responses with source attribution
- Example: "What are the key points from my React tutorial videos?"
- Go to your dashboard
- Toggle "Share Brain" to enable sharing
- Copy the generated share link
- Others can view (but not edit) your collection
ai-memory/
βββ frontend/
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Page components
β β βββ icons/ # Icon components
β β βββ config.ts # Configuration
β βββ index.html
β βββ package.json
βββ backend/
β βββ src/
β β βββ controllers/ # Route handlers
β β βββ models/ # Database models
β β βββ routes/ # API routes
β β βββ middleware/ # Custom middleware
β β βββ utils/ # Utility functions
β β βββ config/ # Database config
β βββ package.json
βββ README.md
- Index dimension: Configured for Gemini embeddings
- Namespaces: User-specific isolation
- Dynamic topK: Intelligent result count based on collection size
- Model:
gemini-2.0-flash-exp - Context window: Optimized for memory querying
- Response format: Conversational, 100-150 words
- Frontend: Deployed on Vercel at https://ai-memory-five.vercel.app/
- Backend: Deployed on Render with MongoDB Atlas
- Set environment variables in your Render dashboard
- Deploy from GitHub repository
- Ensure MongoDB Atlas connection
- Connect your GitHub repository
- Set
VITE_BACKEND_URLto your deployed backend URL - Build command:
npm run build - Output directory:
dist
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Priyanshu Bajpai
- GitHub: @Tiger-raj
- Project: Built with passion for intelligent digital organization
- Google AI for Gemini API
- Pinecone for vector database services
- MongoDB for database hosting
- Vercel for frontend deployment
- Render for backend deployment
Note: This is a demonstration project showcasing AI-powered content management. Currently, AI queries work best with document-type content. Future updates will expand AI querying to all content types.
Made with β€οΈ for better digital organization