Skip to content

uknes/Mentor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Mentor Logo

A powerful block-based note-taking and knowledge management platform

πŸš€ Overview

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.

Mentor Home
Mentor Dashboard

✨ Features

πŸ“ Block-Based Editor

  • 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
Block Editor

πŸ” Authentication & Security

  • Email/password login with verification
  • Social authentication (Google, GitHub)
  • JWT with refresh tokens
  • Password recovery system
  • Secure session management
Login
Register
Forgot Password
Reset Password

πŸ“‚ Page Management

  • Hierarchical page organization
  • Favorites and recently visited pages
  • Trash management
  • Page icons and customization
  • Drag and drop reordering
Page Management

πŸ€– AI Integration

  • AI-powered block generation
  • Support only some block types
  • Natural language prompts
  • OpenRouter API integration
AI Integration
AI Integration

πŸ“ File Storage using file block

  • AWS S3 integration
  • Secure file upload/download
  • Support for multiple file types
  • File metadata handling
File Storage

πŸ’³ Subscription System

  • Three-tier subscription model (Free, Pro, Team)
  • Stripe integration for payment processing
  • Usage limits enforcement
  • Subscription management
Subscription

πŸ› οΈ Tech Stack

Frontend

  • React with TypeScript
  • Material-UI for components
  • Redux for state management

Backend

  • Node.js with Express
  • TypeScript for type safety
  • MongoDB for data storage
  • JWT for authentication

Infrastructure

  • AWS S3 for file storage
  • Stripe for payment processing
  • OpenRouter for AI integration
  • SMTP for email delivery

πŸš€ Getting Started

Prerequisites

  • Node.js (v14+)
  • MongoDB
  • AWS account (for S3)
  • Stripe account (for payments)
  • OpenRouter API key (for AI features)

Installation

  1. Clone the repository
git clone https://github.com/uknes/Mentor.git
cd Mentor
  1. Install dependencies
# Install server dependencies
cd server
npm install

# Install client dependencies
cd ../client
npm install
  1. 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
  1. Start development servers
# Start server (from server directory)
npm run dev

# Start client (from client directory)
npm start

πŸ”§ Environment Variables

Server

MONGODB_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

Client

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

πŸ“š API Reference

Authentication

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

Pages

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

πŸ“‹ Upcoming Implementations

  • 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

🐳 Docker Setup

You can run the entire application stack using Docker. This includes the client, server, and MongoDB.

Prerequisites

  • Docker
  • Docker Compose

Running with Docker

  1. Create a .env file in the root directory with all required environment variables:
# Copy example env files
cp server/.env.example .env
  1. Build and start all services:
docker-compose up --build
  1. Access the application:

Environment Variables for Docker

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

Docker Commands

# 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

Container Structure

  • Client: React application served through Nginx (Port 3000)
  • Server: Node.js/Express API (Port 5000)
  • MongoDB: Database (Port 27017)

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

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

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages