Skip to content

wh1t3h4ts/TMapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

<<<<<<< HEAD

TMapp - Secure Note-Taking Application

TMapp Logo

A privacy-first, extensible knowledge management platform with end-to-end encryption

Python PyQt6 License Security

Features β€’ Installation β€’ Usage β€’ Security β€’ Documentation β€’ Contributing


🎯 Overview

TMapp is a professional-grade, privacy-first note-taking application designed for users who demand both security and functionality. Unlike traditional note-taking software, TMapp prioritizes:

  • πŸ” End-to-end encryption - Your notes are encrypted locally before storage
  • 🏠 Local-first architecture - No cloud dependency, your data stays on your device
  • πŸ”— Structured knowledge linking - Connect ideas with internal note references
  • πŸ“Š Advanced visualization - Embed charts, diagrams, and graphs directly in notes
  • 🎨 Modern UI/UX - Professional dark/light themes with intuitive design

Perfect for personal knowledge management, secure research documentation, technical project planning, and sensitive information storage.


✨ Key Features

πŸ”’ Security & Privacy

  • AES-256-GCM Encryption - Military-grade encryption for all note content
  • Argon2id Key Derivation - Resistant to brute-force and side-channel attacks
  • Master Password Protection - Single password to unlock your entire vault
  • Zero-Knowledge Architecture - No telemetry, no cloud sync, complete privacy
  • Secure Memory Handling - Automatic key clearing and secure deletion
  • Auto-Lock Mechanism - Configurable timeout for automatic vault locking
  • Account Lockout Protection - Prevents brute-force password attempts

πŸ“ Rich Note Editing

  • Hybrid Markdown + Rich Text Editor - Best of both worlds
  • Syntax Highlighting - Code blocks with language-specific highlighting
  • Real-time Auto-Save - Never lose your work (saves every 2 seconds)
  • Internal Note Linking - Create connections between related notes
  • Embedded Media Support - Images, files, and attachments
  • Formatting Toolbar - Bold, italic, underline, and more
  • Word Count & Statistics - Track your writing progress

πŸ“Š Visualization & Diagrams

Embed visual elements directly inside your notes:

  • Mermaid Diagrams - Flowcharts, sequence diagrams, and more
  • Chart.js Visualizations - Bar charts, line graphs, pie charts
  • Knowledge Graphs - Visualize connections between notes
  • LaTeX Math Rendering - Beautiful mathematical formulas
  • Tables & Data Blocks - Structured data presentation

Example Mermaid Diagram:

```mermaid
graph LR
    A[Research] --> B[Notes]
    B --> C[Visualization]
    C --> D[Insights]

**Example Chart:**
```markdown
```chart
type: bar
labels: [Jan, Feb, Mar]
data: [30, 45, 60]

### πŸ—‚οΈ Organization & Management

- **Notebooks** - Organize notes into logical collections
- **Tags & Metadata** - Flexible categorization system
- **Favorites & Pinning** - Quick access to important notes
- **Archive System** - Hide notes without deleting them
- **Trash & Recovery** - Soft delete with restore capability
- **Full-Text Search** - Find notes instantly across your entire vault
- **Fuzzy Matching** - Smart search that understands typos

### 🎨 User Experience

- **Professional Dark/Light Themes** - Easy on the eyes, day or night
- **3-Panel Layout** - Sidebar, note list, and editor for efficient workflow
- **Keyboard Shortcuts** - Power-user friendly navigation
- **Context Menus** - Right-click for quick actions
- **Responsive Design** - Adapts to different screen sizes
- **Status Indicators** - Always know your save and encryption status

---

## πŸš€ Installation

### Prerequisites

- **Python 3.8 or higher**
- **pip** (Python package manager)
- **Windows, macOS, or Linux**

### Quick Start

1. **Clone the repository:**
   ```bash
   git clone https://github.com/yourusername/TMapp.git
   cd TMapp
  1. Install dependencies:

    pip install -r requirements.txt
  2. Run the application:

    python src/main.py

First-Time Setup

On first launch, you'll be guided through a setup wizard:

  1. Create Master Password - Choose a strong, memorable password
  2. Password Requirements:
    • Minimum 12 characters
    • At least one uppercase letter
    • At least one lowercase letter
    • At least one digit
    • At least one special character
  3. Store Safely - ⚠️ If you forget your password, your notes cannot be recovered!

πŸ“– Usage

Basic Workflow

  1. Launch TMapp - Enter your master password
  2. Create a Note - Click "New Note" or press Ctrl+N
  3. Write Content - Use the rich text editor with Markdown support
  4. Auto-Save - Your changes are saved automatically every 2 seconds
  5. Organize - Add to notebooks, tag, favorite, or pin important notes
  6. Search - Use the search bar to find notes instantly
  7. Lock - Press Ctrl+L to lock the application when stepping away

Keyboard Shortcuts

Shortcut Action
Ctrl+N Create new note
Ctrl+S Manual save (auto-save is always active)
Ctrl+L Lock application
Ctrl+T Toggle dark/light theme
Ctrl+F Focus search box
Ctrl+Q Quit application
Ctrl+B Bold text
Ctrl+I Italic text
Ctrl+U Underline text

Context Menu Actions

Right-click on any note to access:

  • Add/Remove from Favorites
  • Pin/Unpin note
  • Move to Trash
  • Restore from Trash
  • Delete Permanently

Managing Notes

Creating Notes

# Notes are automatically encrypted before storage
# Simply type in the editor and changes are saved automatically

Organizing with Notebooks

  • Create notebooks to group related notes
  • Drag notes between notebooks
  • Each notebook shows note count

Trash & Recovery

  • Deleted notes go to Trash (soft delete)
  • Restore notes from Trash anytime
  • Empty Trash to permanently delete all trashed notes

πŸ” Security

Encryption Details

TMapp uses industry-standard cryptography:

  • Algorithm: AES-256-GCM (Galois/Counter Mode)
  • Key Derivation: Argon2id with configurable parameters
    • Time cost: 3 iterations
    • Memory cost: 100 MB
    • Parallelism: 4 threads
  • Salt: 16-byte random salt per vault
  • Nonce: 12-byte random nonce per encryption operation
  • Authentication: 16-byte authentication tag (GCM)

Security Model

Zero-Trust Local Storage:

  • All note content is encrypted before writing to disk
  • Master password never stored (only salt is stored)
  • Encryption keys exist only in memory during active session
  • Keys are securely cleared on lock/exit

Threat Protection:

  • βœ… Unauthorized disk access
  • βœ… Malicious file tampering (integrity verification)
  • βœ… Brute force password attempts (account lockout)
  • βœ… Memory dumps (keys cleared on lock)
  • βœ… Side-channel attacks (Argon2id resistance)

Best Practices

  1. Use a Strong Master Password

    • Minimum 16 characters recommended
    • Use a passphrase with multiple words
    • Consider using a password manager
  2. Regular Backups

    • Backup your vault regularly
    • Store backups in encrypted containers
    • Test restore procedures
  3. Physical Security

    • Lock your computer when away
    • Enable auto-lock in TMapp settings
    • Use full-disk encryption on your device
  4. Password Recovery

    • ⚠️ There is NO password recovery mechanism
    • This is by design for security
    • Store your password in a secure location

πŸ—οΈ Architecture

Project Structure

TMapp/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ core/              # Core functionality
β”‚   β”‚   β”œβ”€β”€ auth_manager.py      # Authentication & password management
β”‚   β”‚   β”œβ”€β”€ config.py            # Application configuration
β”‚   β”‚   β”œβ”€β”€ database.py          # SQLite database wrapper
β”‚   β”‚   └── encryption.py        # AES-256-GCM encryption service
β”‚   β”œβ”€β”€ controllers/       # Business logic
β”‚   β”‚   β”œβ”€β”€ note_controller.py   # Note CRUD operations
β”‚   β”‚   └── notebook_controller.py # Notebook management
β”‚   β”œβ”€β”€ models/            # Data models
β”‚   β”‚   β”œβ”€β”€ note.py              # Note entity
β”‚   β”‚   └── notebook.py          # Notebook entity
β”‚   β”œβ”€β”€ ui/                # User interface
β”‚   β”‚   β”œβ”€β”€ main_window.py       # Main application window
β”‚   β”‚   β”œβ”€β”€ auth_dialog.py       # Authentication dialog
β”‚   β”‚   β”œβ”€β”€ first_run_wizard.py  # Setup wizard
β”‚   β”‚   └── theme_manager.py     # Theme system
β”‚   β”œβ”€β”€ utils/             # Utilities
β”‚   β”‚   β”œβ”€β”€ backup_manager.py    # Backup/restore functionality
β”‚   β”‚   └── migration.py         # Database migrations
β”‚   β”œβ”€β”€ app.py             # Application entry point
β”‚   └── main.py            # Main launcher
β”œβ”€β”€ tests/                 # Unit tests
β”œβ”€β”€ docs/                  # Documentation
β”œβ”€β”€ requirements.txt       # Python dependencies
β”œβ”€β”€ reset_db.bat          # Database reset utility (Windows)
β”œβ”€β”€ delete_database.py    # Database deletion script
└── README.md             # This file

Technology Stack

  • Language: Python 3.8+
  • GUI Framework: PyQt6
  • Database: SQLite3 with encryption
  • Cryptography: cryptography library (AES-256-GCM, Argon2id)
  • Styling: QSS (Qt Style Sheets)

πŸ› οΈ Development

Setting Up Development Environment

  1. Clone and install:

    git clone https://github.com/yourusername/TMapp.git
    cd TMapp
    pip install -r requirements.txt
  2. Run in development mode:

    python src/main.py
  3. Run tests:

    pytest tests/

Database Reset (Development)

If you need to reset the database:

Option 1: Simple Script

python clear_db.py

Option 2: Application Menu

  • File β†’ Clear All Notes...
  • Type "DELETE ALL" to confirm

Contributing

We welcome contributions! Please follow these guidelines:

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

Code Standards:

  • Follow PEP 8 style guide
  • Add docstrings to all functions/classes
  • Write unit tests for new features
  • Update documentation as needed

πŸ§ͺ Testing

Test Coverage

  • Unit Tests: Core encryption, authentication, database operations
  • Security Tests: Encryption integrity, authentication bypass attempts
  • Integration Tests: Editor rendering, vault lifecycle, UI workflows

Running Tests

# Run all tests
pytest

# Run with coverage
pytest --cov=src tests/

# Run specific test file
pytest tests/test_encryption.py

πŸ“š Documentation

Additional Resources

Configuration

Configuration file location:

  • Windows: C:\Users\<username>\.tmapp\config.json
  • macOS: ~/Library/Application Support/TMapp/config.json
  • Linux: ~/.config/tmapp/config.json

Configurable Options:

{
  "theme": "dark",
  "auto_lock_timeout": 300,
  "auto_backup_enabled": true,
  "backup_interval": 3600,
  "editor_font_size": 16
}

πŸ—ΊοΈ Roadmap

Planned Features

  • Collaborative Encrypted Workspaces - Share notes securely
  • Real-time Editing - Collaborative editing with conflict resolution
  • AI-Assisted Summarization - Automatic note summaries
  • Secure Cloud Sync - End-to-end encrypted cloud backup
  • Mobile Companion Apps - iOS and Android clients
  • Graph-Based Research Navigation - Visual knowledge exploration
  • Plugin System - Extensible architecture for custom features
  • Export Formats - PDF, HTML, Markdown export
  • Import Tools - Import from Evernote, Notion, OneNote
  • Version History - Track note changes over time
  • Attachment Encryption - Encrypt embedded files
  • Hardware Key Support - YubiKey integration

Version History

v1.0.0 (Current)

  • βœ… Core encryption engine
  • βœ… Rich text editor
  • βœ… Notebook organization
  • βœ… Search functionality
  • βœ… Dark/light themes
  • βœ… Auto-save & auto-lock
  • βœ… Trash & recovery

❓ FAQ

General Questions

Q: Is TMapp free? A: Yes, TMapp is open-source and free to use under the MIT License.

Q: Does TMapp sync to the cloud? A: No, TMapp is local-first. Your notes stay on your device. Cloud sync is planned for future releases with end-to-end encryption.

Q: Can I export my notes? A: Export functionality is planned for a future release. Currently, notes are stored in an encrypted SQLite database.

Q: What happens if I forget my password? A: Unfortunately, there is no password recovery. This is by design for security. Your notes cannot be decrypted without the master password.

Technical Questions

Q: How secure is the encryption? A: TMapp uses AES-256-GCM with Argon2id key derivation, which are industry-standard, military-grade encryption algorithms.

Q: Where are my notes stored? A: Notes are stored in an encrypted SQLite database at:

  • Windows: C:\Users\<username>\.tmapp\notes.db
  • macOS: ~/Library/Application Support/TMapp/notes.db
  • Linux: ~/.config/tmapp/notes.db

Q: Can I use TMapp on multiple devices? A: Currently, each installation is independent. Multi-device sync is planned for future releases.

Q: How do I backup my notes? A: TMapp automatically creates backups. You can also manually copy the notes.db file to a secure location.


πŸ› Troubleshooting

Common Issues

Issue: "Decryption failed" errors

  • Cause: Database contains notes encrypted with different salts (development issue)
  • Solution: Reset the database using reset_db.bat or see DATABASE_RESET.md

Issue: Application won't start

  • Check: Python version (3.8+ required)
  • Check: All dependencies installed (pip install -r requirements.txt)
  • Check: No conflicting PyQt installations

Issue: Forgot master password

  • Unfortunately: There is no password recovery
  • Prevention: Store password in a secure password manager

Issue: Notes not saving

  • Check: Disk space available
  • Check: Write permissions for application directory
  • Check: Application logs for errors

Getting Help


πŸ“„ License

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

MIT License

Copyright (c) 2024 TMapp Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

πŸ™ Acknowledgments

  • PyQt6 - Excellent Python GUI framework
  • cryptography - Robust cryptographic library
  • Argon2 - Password hashing competition winner
  • AES-GCM - NIST-approved encryption standard
  • Open Source Community - For inspiration and support

πŸ“ž Contact


Made with ❀️ and πŸ” by the TMapp Team

⬆ Back to Top

======= # Secure Notes Application

Overview

The Secure Notes Application is a cross-platform desktop note-taking application designed with a strong emphasis on security and privacy. It allows users to create, edit, and store notes securely, ensuring that sensitive information remains protected through encryption.

Features

  • End-to-End Encryption: All notes are encrypted before being saved, ensuring that only authorized users can access them.
  • User-Friendly Interface: A simple and intuitive GUI for easy note management.
  • Cross-Platform Compatibility: Runs on Windows, macOS, and Linux.
  • Secure Password Management: Implements strong password policies and secure storage of credentials.
  • Privacy-Focused Design: No user data is collected or transmitted, ensuring complete privacy.

Installation

  1. Clone the repository:
    git clone https://github.com/hatscode/secure-notes-app.git
    
  2. Navigate to the project directory:
    cd secure-notes-app
    
  3. Install the required dependencies:
    pip install -r requirements.txt
    

Usage

To start the application, run the following command:

python src/main.py

Development

This project follows a security-first approach throughout its development. Comprehensive threat modeling has been conducted to identify potential vulnerabilities and mitigate risks. Contributions to enhance security features are welcome.

Testing

Unit tests are provided to ensure the correctness and security of the encryption functionalities. To run the tests, use:

pytest tests/

License

This project is licensed under the MIT License. See the LICENSE file for more details.

07f8357c75001a99bd7ebbb69168f8bb8f818e2d

About

Final year project - Secure notes app with threat modeling.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors