|
| 1 | +# Alem 2.0 - Smart Notes Application |
| 2 | + |
| 3 | +## Project Overview |
| 4 | +Alem 2.0 is a modern, feature-rich note-taking application with a glassmorphism UI design, built using Python and PyQt6. It offers advanced features like Redis caching, Discord Rich Presence, encryption for password-protected notes, and AI-powered semantic search. |
| 5 | + |
| 6 | +## Key Features |
| 7 | +- **Glassmorphism UI**: Modern translucent design with dark theme |
| 8 | +- **Dual Editing Modes**: Markdown and HTML editing with live preview |
| 9 | +- **Rich Text Editing**: WYSIWYG editor with formatting toolbar |
| 10 | +- **Advanced Search**: Real-time text search with AI semantic search option |
| 11 | +- **Password Protection**: AES encryption with PBKDF2 key derivation |
| 12 | +- **Redis Caching**: High-performance caching layer for improved responsiveness |
| 13 | +- **Discord Rich Presence**: Shows note-taking activity on Discord |
| 14 | +- **Comprehensive Analytics**: Real-time performance metrics in status bar |
| 15 | +- **Cross-platform**: Works on Windows, Linux, and macOS |
| 16 | + |
| 17 | +## Project Structure |
| 18 | +``` |
| 19 | +aAlem/ |
| 20 | +├── alem_app/ |
| 21 | +│ ├── __init__.py |
| 22 | +│ ├── core/ |
| 23 | +│ │ ├── __init__.py |
| 24 | +│ │ ├── cache.py # Redis caching implementation |
| 25 | +│ │ └── discord_rpc.py # Discord Rich Presence integration |
| 26 | +│ ├── database/ |
| 27 | +│ │ ├── __init__.py |
| 28 | +│ │ └── database.py # SQLite database with Note model |
| 29 | +│ ├── ui/ |
| 30 | +│ │ ├── __init__.py |
| 31 | +│ │ ├── actions.py # Menu and shortcut setup |
| 32 | +│ │ ├── left_panel.py # Sidebar UI components |
| 33 | +│ │ ├── main_window.py # Main application window |
| 34 | +│ │ ├── right_panel.py # Editor and preview panels |
| 35 | +│ │ └── settings_dialog.py # Application settings UI |
| 36 | +│ ├── utils/ |
| 37 | +│ │ ├── __init__.py |
| 38 | +│ │ ├── encryption.py # Note encryption/decryption |
| 39 | +│ │ └── logging.py # Application logging |
| 40 | +│ └── main.py # Application entry point |
| 41 | +├── Alem.py # Main application launcher |
| 42 | +├── config.py # Application configuration |
| 43 | +├── install_enhanced.py # Enhanced installation script |
| 44 | +├── launch_enhanced.py # Enhanced launcher with diagnostics |
| 45 | +├── requirements.txt # Python dependencies |
| 46 | +├── alem.png # Application icon |
| 47 | +└── README.md # Project documentation |
| 48 | +``` |
| 49 | + |
| 50 | +## Core Components |
| 51 | + |
| 52 | +### Main Application (alem_app/main.py) |
| 53 | +- Entry point with enhanced setup |
| 54 | +- Application configuration and styling |
| 55 | +- Exception handling and error reporting |
| 56 | +- Welcome message for first-time users |
| 57 | +- Discord RPC timer management |
| 58 | + |
| 59 | +### Main Window (alem_app/ui/main_window.py) |
| 60 | +- Primary UI with split-panel layout |
| 61 | +- Note management (create, save, delete, load) |
| 62 | +- Search functionality with debouncing |
| 63 | +- Markdown/HTML preview rendering |
| 64 | +- Analytics and performance monitoring |
| 65 | +- Keyboard shortcuts and menu actions |
| 66 | +- Responsive design with resize handling |
| 67 | + |
| 68 | +### Database (alem_app/database/database.py) |
| 69 | +- SQLite database implementation |
| 70 | +- Note model with encryption support |
| 71 | +- CRUD operations for notes |
| 72 | +- Search functionality |
| 73 | +- Statistics and performance metrics |
| 74 | + |
| 75 | +### Redis Cache (alem_app/core/cache.py) |
| 76 | +- Redis caching manager for notes |
| 77 | +- Dirty note tracking for periodic flush |
| 78 | +- Performance optimization through caching |
| 79 | + |
| 80 | +### Encryption (alem_app/utils/encryption.py) |
| 81 | +- AES encryption using Fernet |
| 82 | +- PBKDF2 key derivation with configurable iterations |
| 83 | +- Password-based note protection |
| 84 | + |
| 85 | +### Discord RPC (alem_app/core/discord_rpc.py) |
| 86 | +- Discord Rich Presence integration |
| 87 | +- Activity updates with customizable details |
| 88 | +- Presence management with buttons |
| 89 | + |
| 90 | +## Dependencies |
| 91 | +Key dependencies include: |
| 92 | +- PyQt6: GUI framework |
| 93 | +- PyQt6-WebEngine: Web-based preview rendering |
| 94 | +- markdown: Markdown processing |
| 95 | +- redis: Caching layer |
| 96 | +- cryptography: Note encryption |
| 97 | +- pypresence: Discord integration |
| 98 | +- psutil: System monitoring |
| 99 | + |
| 100 | +## Installation & Setup |
| 101 | +1. Run `python install_enhanced.py` for full installation |
| 102 | +2. Configure Discord RPC in config.py (optional) |
| 103 | +3. Start Redis server for caching (optional) |
| 104 | +4. Launch with `python launch_enhanced.py` or `python Alem.py` |
| 105 | + |
| 106 | +## Configuration |
| 107 | +Main configuration is in `config.py`: |
| 108 | +- UI settings (themes, fonts, window size) |
| 109 | +- Performance settings (cache intervals, search debounce) |
| 110 | +- Redis configuration |
| 111 | +- Discord RPC settings |
| 112 | +- Security parameters (KDF iterations) |
| 113 | + |
| 114 | +## Keyboard Shortcuts |
| 115 | +- `Ctrl+N`: New note |
| 116 | +- `Ctrl+S`: Save note |
| 117 | +- `Ctrl+O`: Quick open |
| 118 | +- `Ctrl+F`: Search notes |
| 119 | +- `Ctrl+L`: Lock/unlock note |
| 120 | +- `Ctrl+1/2`: Switch edit/preview modes |
| 121 | +- `F5`: Refresh preview |
| 122 | +- `F11`: Toggle fullscreen |
| 123 | + |
| 124 | +## Development Notes |
| 125 | +- Uses modern PyQt6 with Fusion style |
| 126 | +- Implements lazy loading for performance |
| 127 | +- Background processing for non-blocking operations |
| 128 | +- Comprehensive error handling and logging |
| 129 | +- Responsive UI with adaptive layouts |
0 commit comments