Mentor is a modern, feature-rich note-taking application inspired by tools like Notion and Obsidian. It provides a flexible block-based editor with file management, and AI-powered content generation.
- Rich text editing with multiple block types
- Code blocks with syntax highlighting for 14+ languages
- LaTeX equation support
- Tables, schedules, and lists
- File attachments with secure storage
- Email/password login with verification
- Social authentication (Google, GitHub)
- JWT with refresh tokens
- Password recovery system
- Secure session management
- Hierarchical page organization
- Favorites and recently visited pages
- Trash management
- Page icons and customization
- Drag and drop reordering
- AI-powered block generation
- Support only some block types
- Natural language prompts
- OpenRouter API integration
- AWS S3 integration
- Secure file upload/download
- Support for multiple file types
- File metadata handling
- Three-tier subscription model (Free, Pro, Team)
- Stripe integration for payment processing
- Usage limits enforcement
- Subscription management
- React with TypeScript
- Material-UI for components
- Redux for state management
- Node.js with Express
- TypeScript for type safety
- MongoDB for data storage
- JWT for authentication
- AWS S3 for file storage
- Stripe for payment processing
- OpenRouter for AI integration
- SMTP for email delivery
- Node.js (v14+)
- MongoDB
- AWS account (for S3)
- Stripe account (for payments)
- OpenRouter API key (for AI features)
- Clone the repository
git clone https://github.com/uknes/Mentor.git
cd Mentor- Install dependencies
# Install server dependencies
cd server
npm install
# Install client dependencies
cd ../client
npm install- Set up environment variables
# Server (.env file in server directory)
cp .env.example .env
# Edit .env with your configuration
# Client (.env file in client directory)
cp .env.example .env
# Edit .env with your configuration- Start development servers
# Start server (from server directory)
npm run dev
# Start client (from client directory)
npm startMONGODB_URI=mongodb://localhost:27017/mentor
JWT_SECRET=your-secret-key
PORT=5000
OPENROUTER_API_KEY=your-openrouter-api-key
# Google OAuth
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
# GitHub OAuth
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secret
# Email Configuration
SMTP_HOST=your-smtp-host
SMTP_PORT=587
SMTP_USER=your-smtp-username
SMTP_PASS=your-smtp-password
SMTP_FROM=noreply@yourdomain.com
CLIENT_URL=http://localhost:3000
REACT_APP_API_URL=http://localhost:5000/api
REACT_APP_GOOGLE_CLIENT_ID=your-google-client-id
REACT_APP_GITHUB_CLIENT_ID=your-github-client-id
POST /auth/register # Register
POST /auth/login # Login
POST /auth/refresh # Refresh token
POST /auth/logout # Logout
GET /auth/verify/:token # Verify email
POST /auth/forgot-password # Request password reset
POST /auth/reset-password # Reset password
POST /auth/google # Google OAuth
POST /auth/github # GitHub OAuth
GET /pages # List all pages
GET /pages/by-path/:path # Get page by path
POST /pages # Create page
PUT /pages/:id # Update page
DELETE /pages/:id # Move to trash
GET /pages/trash # List trash
POST /pages/:id/restore # Restore from trash
DELETE /pages/:id/permanent # Delete permanently
POST /pages/reorder # Reorder pages
GET /pages/recent # Get recently visited pages
POST /pages/:id/visit # Add page to recently visited
GET /pages/favorites # Get favorite pages
POST /pages/:id/favorite # Add page to favorites
DELETE /pages/:id/favorite # Remove page from favorites
-
Enhanced Collaboration
- Real-time cursor tracking
- User presence indicators
- Comment system with mentions
- Permission management system
- Inbox for collaboration
-
Advanced Block Types
- Kanban board blocks
- Timeline view blocks
- Database blocks with filtering and sorting
- Diagram blocks (flowcharts, mind maps)
- Embedded map blocks
-
Mobile Experience
- Responsive design optimization
- Progressive Web App (PWA) support
- Touch-friendly interactions
-
Performance Improvements
- Implement code splitting and lazy loading
- Add Redis caching layer
- Optimize real-time synchronization
- Improve image and asset loading
You can run the entire application stack using Docker. This includes the client, server, and MongoDB.
- Docker
- Docker Compose
- Create a
.envfile in the root directory with all required environment variables:
# Copy example env files
cp server/.env.example .env- Build and start all services:
docker-compose up --build- Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- MongoDB: localhost:27017
Make sure your root .env file includes all necessary variables:
# MongoDB Configuration
MONGO_INITDB_ROOT_USERNAME=your-mongodb-username
MONGO_INITDB_ROOT_PASSWORD=your-mongodb-password
# Server Configuration
JWT_SECRET=your-secret-key
OPENROUTER_API_KEY=your-openrouter-api-key
# OAuth Configuration
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secret
# Email Configuration
SMTP_HOST=your-smtp-host
SMTP_PORT=587
SMTP_USER=your-smtp-username
SMTP_PASS=your-smtp-password
SMTP_FROM=noreply@yourdomain.com
# Client Configuration
REACT_APP_GOOGLE_CLIENT_ID=your-google-client-id
REACT_APP_GITHUB_CLIENT_ID=your-github-client-id# Start all services in the background
docker-compose up -d
# Stop all services
docker-compose down
# View logs
docker-compose logs -f
# Rebuild specific service
docker-compose up -d --build <service_name>
# Remove volumes (clean data)
docker-compose down -v- Client: React application served through Nginx (Port 3000)
- Server: Node.js/Express API (Port 5000)
- MongoDB: Database (Port 27017)
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some 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.












