Skip to content

Latest commit

Β 

History

35 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ByteVault

ByteVault Logo

A clean, local-first code snippet manager for developers.

Store, organize, edit, search, and revisit your code snippets in one focused desktop application.

Python Flet License


✨ Overview

ByteVault is a desktop application built with Python and Flet for developers who frequently save and reuse code snippets.

Instead of keeping useful pieces of code scattered across text files, notes, chat messages, or browser tabs, ByteVault provides a focused workspace for storing and managing them.

ByteVault combines a clean dark interface with a modular architecture, database migrations, snippet organization, AI-powered code descriptions, statistics, favorites, local user settings, and encrypted snippet export.

Local-first by design.

ByteVault is designed around keeping your snippets under your control rather than requiring a cloud-based developer platform.


πŸš€ Features

πŸ“ Snippet Management

  • Create new code snippets
  • Edit existing snippets
  • View snippets in a dedicated interface
  • Syntax-aware code editor
  • Organize snippets by programming language
  • Language-specific icons
  • Recently updated snippets
  • Human-readable relative timestamps
  • Soft-delete support
  • Delete all snippets with confirmation

πŸ€– AI-Powered Code Descriptions

ByteVault can automatically generate clear and concise descriptions for your code snippets using AI.

When a snippet is created, ByteVault analyzes the code and sends it to the AI API using a strict system prompt specifically designed for code understanding and description generation.

The generated description helps you quickly understand what a snippet does without having to read the entire code.

  • Automatic code analysis
  • AI-generated snippet descriptions
  • Strict system prompting for consistent output
  • Descriptions generated specifically for the provided code
  • Original source code remains unchanged

⭐ Favorites

  • Mark snippets as favorites
  • Quickly identify frequently used snippets
  • Dedicated favorite state stored in the database

πŸ“Š Statistics

ByteVault includes a statistics dashboard that gives you an overview of your snippet collection.

  • Total number of snippets
  • Total views
  • Total favorites
  • Programming language distribution
  • Language usage percentages
  • Visual charts powered by flet-charts

Example:

ByteVault Statistics

πŸ‘€ Account Settings

ByteVault includes a persistent local user profile.

You can manage:

  • First name
  • Last name
  • Bio
  • Profile information

πŸ“¦ Import & Export

ByteVault supports exporting and importing snippets using its own file format:

.bytv

Exported ByteVault files are encrypted so their contents are not stored as plain-text snippets.

This makes it possible to:

  • Back up your snippets
  • Move snippets between ByteVault installations
  • Import previously exported snippets
  • Keep exported snippet data protected

🎨 UI & Experience

  • Clean dark interface
  • Minimal developer-focused design
  • Language-specific programming icons
  • Focused snippet workflow
  • Responsive Flet-based interface
  • Desktop-first experience

πŸ–₯️ Screenshots

Home

ByteVault Home Interface


πŸ› οΈ Tech Stack

ByteVault is built entirely with Python.

Technology Purpose
Python Core programming language
Flet Desktop UI framework
Flet Code Editor Syntax-aware code editing
Flet Charts Statistics and data visualization
SQLAlchemy ORM and database interaction
Alembic Database migrations
Pydantic Settings Application configuration
python-dotenv Environment configuration
OpenAI SDK AI-related application capabilities
OpenAI SDK AI-powered code analysis and snippet description generation

πŸ“¦ Dependencies

Main project dependencies:

flet>=0.86.4
flet-code-editor>=0.86.4
flet-charts==0.86.5
SQLAlchemy>=2.0.51
alembic>=1.18.5
python-dotenv>=1.2.2
pydantic-settings>=2.14.2
openai==3.0.0

πŸ—οΈ Architecture

ByteVault follows a modular architecture with a clear separation between the UI, database layer, repositories, and utility functions.

ByteVault/
β”‚
β”œβ”€β”€ alembic/
β”‚   β”œβ”€β”€ env.py
β”‚   β”œβ”€β”€ README
β”‚   β”œβ”€β”€ script.py.mako
β”‚   └── versions/
β”‚
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ languages/
β”‚   β”‚   β”œβ”€β”€ CPP.svg
β”‚   β”‚   β”œβ”€β”€ CSS.svg
β”‚   β”‚   β”œβ”€β”€ GO.svg
β”‚   β”‚   β”œβ”€β”€ JAVASCRIPT.svg
β”‚   β”‚   β”œβ”€β”€ JAVA.svg
β”‚   β”‚   β”œβ”€β”€ PHP.svg
β”‚   β”‚   β”œβ”€β”€ PYTHON.svg
β”‚   β”‚   β”œβ”€β”€ RUST.svg
β”‚   β”‚   └── SQL.svg
β”‚   β”‚
β”‚   └── logo.png
β”‚
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ config.py
β”‚   β”œβ”€β”€ db.py
β”‚   β”œβ”€β”€ models.py
β”‚   └── __init__.py
β”‚
β”œβ”€β”€ repositories/
β”‚   β”œβ”€β”€ snippet.py
β”‚   β”œβ”€β”€ statistics.py
β”‚   └── user.py
β”‚
β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ crypto.py
β”‚   β”œβ”€β”€ greeting.py
β”‚   └── time_ago.py
β”‚
β”œβ”€β”€ views/
β”‚   β”œβ”€β”€ add_snippet.py
β”‚   β”œβ”€β”€ edit_snippet.py
β”‚   β”œβ”€β”€ home.py
β”‚   β”œβ”€β”€ loading_page.py
β”‚   β”œβ”€β”€ settings.py
β”‚   β”œβ”€β”€ view_snippet.py
β”‚   β”œβ”€β”€ welcome.py
β”‚   └── __init__.py
β”‚
β”œβ”€β”€ alembic.ini
β”œβ”€β”€ main.py
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ ui.png
β”œβ”€β”€ statistics_ui.png
└── demo.gif

Layer Responsibilities

views/

Contains the application's user interface and individual screens.

Examples include:

  • Home
  • Add Snippet
  • Edit Snippet
  • View Snippet
  • Settings
  • Welcome
  • Loading

database/

Responsible for:

  • Database configuration
  • SQLAlchemy setup
  • Database models
  • Session management

repositories/

Contains the application's data-access logic.

Repository functions keep database queries separated from the UI layer.

Examples:

  • Snippet operations
  • User operations
  • Statistics queries

utils/

Contains reusable application utilities.

Examples:

  • Encryption
  • Relative timestamps
  • Greeting helpers

alembic/

Contains database migration configuration and migration history.

assets/

Contains:

  • ByteVault logo
  • Programming language icons
  • Other application assets

πŸ—„οΈ Database

ByteVault uses a relational database through SQLAlchemy.

Database schema changes are managed using Alembic.

To apply the latest migrations:

alembic upgrade head

To create a new migration after changing the SQLAlchemy models:

alembic revision --autogenerate -m "describe your changes"

The local database file and environment-specific configuration should not be committed to Git.


πŸ” Data Protection

ByteVault includes encryption for exported .bytv files.

The goal is to prevent exported snippets from being stored as readable plain text.

The encryption functionality is implemented separately from the UI inside:

utils/crypto.py

The encryption key is provided through environment configuration and should never be committed to the repository.


πŸ“₯ Installation

1. Clone the repository

git clone https://github.com/Atila-Pasha/ByteVault.git
cd ByteVault

2. Create a virtual environment

Linux/macOS:

python -m venv .venv
source .venv/bin/activate

Windows:

python -m venv .venv
.venv\Scripts\activate

3. Install dependencies

pip install -r requirements.txt

4. Configure the environment

Create a .env file in the project root and configure the required variables.

DATABASE_URL=your_database_url
BYTEVAULT_ENCRYPTION_KEY=your_encryption_key
BASE_URL=base-url
API_KEY=your-api-key

5. Run migrations

alembic upgrade head

6. Start ByteVault

python main.py

Or using Flet:

flet run main.py

🐧 Building for Linux

ByteVault can also be packaged as a Linux desktop application using Flet.

flet build linux

The application uses its own logo and assets during the build process.


🧭 Project Philosophy

ByteVault is intentionally focused.

The goal is not to become another complicated developer platform.

Instead, ByteVault aims to make one simple workflow feel good:

Save code β†’ organize it β†’ find it later β†’ reuse it.

The project is also a practical playground for exploring:

  • Python application architecture
  • Desktop application development
  • Flet
  • SQLAlchemy
  • Alembic
  • Repository patterns
  • Database design
  • Encryption
  • Data visualization
  • Local-first application design
  • Developer-focused UI/UX

🀝 Contributing

Contributions, ideas, bug reports, and suggestions are welcome.

If you find a bug or have an idea that could improve ByteVault:

  1. Open an issue
  2. Describe the problem or feature
  3. Provide steps to reproduce the issue when applicable
  4. Submit a pull request if you have a solution

πŸ“„ License

ByteVault is released under the MIT License.


Built with ❀️ using Python and Flet.

ByteVault

About

A clean and local-first code snippet manager built with Python and Flet.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages