LifePIM Desktop is a local-first personal information manager for notes, tasks, calendar events, files, media, audio, places, contacts, money records, and related area data.
The current desktop app is a Flask web application that runs on your PC and
uses a local SQLite database. The current entry point is src/app.py; on
Windows the expected launcher is src/RUN_DESKTOP.BAT.
LifePIM Desktop is a standalone, single-owner tool. It does not require the mobile app, cloud sync, LifePIM.com, Caddy or any LAN service. The supported security model exposes the browser UI only on the same computer.
This is active v3 desktop development. The web UI is usable for local browsing and editing across the main LifePIM areas, but the data/bootstrap path is still developer-oriented and machine-specific in places.
Working at a high level:
- Local Flask app served at
http://127.0.0.1:9741 - Loopback-only Waitress with LAN/public/mobile/logger endpoints disabled by default
- Overview dashboard with recent notes, tasks, and calendar context
- Top-level modules for Calendar, Goals, Tasks, How, Notes, Data, Files, Media, Audio, 3D, Money, People, Places, Apps, Admin, Links, and Areas
- SQLite-backed data access for the current desktop database
- Notes, calendar, media, audio, files, contacts, money, links, areas, and settings routes/templates are present
- Search across LifePIM areas, with optional note-content search
- Media browsing and event clustering, audio playlist/player views, calendar views, notes list/view/edit screens, and admin/settings screens
- Importer v1 framework for declarative imports into contacts/files/media and raw/mapped table loaders
Known rough edges:
src/init_database.pyis destructive and recreates the configured database.- Some source paths in config/load scripts are still local-machine paths.
- Runtime configuration is mostly still driven by
src/common/config.py. - Incremental refresh jobs are not yet clean production sync jobs.
Latest v3 screenshots are in doc/:
Older layout references are also kept in doc/.
From the repository root:
python -m venv .venv
.\.venv\Scripts\activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m playwright install chromiumThe Chromium step is needed only for rendered web clipping and browser PDF features.
The Windows launcher expects the virtual environment at:
<repo root>\.venv\Scripts\python.exe
INSTALL.BAT is only a minimal legacy helper. Prefer requirements.txt for a
repeatable environment.
Main configuration currently lives in:
src\common\config.py
Important values include:
user_folderDB_FILE/db_namebase_urlport_numPATH_ALIASESetl_folders_csvarea_mappings_csv
The current default app URL is:
http://127.0.0.1:9741
The current default sample database path in src/common/config.py points at:
D:\DATA_LLM\SAMPLE_DATA\lifepim_desktop_data\lifepim.db
Change the config before bootstrapping a different machine or data profile.
LifePIM stores personal metadata such as note titles and paths, tasks, calendar
events, contacts, Areas, tags, and indexed file/media details. Structured data
is kept in the local SQLite database configured by DB_FILE; notes and other
file-backed content remain in their configured folders, while operational logs
and temporary import files are written locally on the same computer.
LifePIM Desktop does not upload or synchronize this information to LifePIM.com, or to any other external or cloud server. Features you explicitly ask to retrieve web pages, maps, geocoding, school terms or prices may contact those public services, but they do not upload your LifePIM database.
Recommended Windows launcher from the repository root:
src\RUN_DESKTOP.BATThis starts Waitress at http://127.0.0.1:9741. It rejects wildcard or LAN
bind addresses and does not start Caddy.
Manual run from the repository root:
.\.venv\Scripts\python.exe src\app.pyManual run from src:
cd src
..\.venv\Scripts\python.exe app.pyThe old instruction python web_server.py is obsolete.
Only run this when you want to rebuild the configured SQLite database from scratch:
cd src
..\.venv\Scripts\python.exe init_database.pyinit_database.py deletes the configured DB_FILE if it exists, recreates the
base schema, applies module schemas, runs the current test/sample loaders, and
refreshes folder/area mapping data. Do not run it against a database you want
to preserve.
More operational detail is in doc/deploy.md.
LifePIM is supported only at http://127.0.0.1:9741. Public-note,
Pocket/mobile and logger API code remains for legacy compatibility but is
disabled by default and is outside the reviewed security model. Do not enable
those routes or place LifePIM behind a LAN reverse proxy. See
doc/network.md and
doc/review_security.md.
The database retains older per-user fields and path support for compatibility.
They are not a reviewed hostile multi-user boundary; normal deployment uses one
trusted owner. Existing duncan note and area-folder settings are preserved.
New users get a default root under:
N:\duncan\LifePIM_Data\DATA\lan_users\<username>
LifePIM creates these subfolders for new users:
notes
areas
lists
Only the duncan account uses the full legacy area list and area-folder
mapping by default. Other users start with an editable Home, Work, Family,
and Fun area list, and new notes go into that user's notes root unless a
area folder mapping is explicitly added. Media and audio remain global.
Run the unit tests from the tests folder:
cd tests
..\.venv\Scripts\python.exe run_tests.pyFor a quick app import check from the repository root:
.\.venv\Scripts\python.exe -m py_compile src\app.pysrc\app.py Flask app entry point
src\RUN_DESKTOP.BAT Windows launcher
src\common\ shared config, data, search, settings, helpers
src\modules\ feature modules and Flask blueprints
src\templates\ shared templates
src\static\ CSS and JavaScript
src\lifepim\importer\ importer framework
src\lifepim\targets\ importer-backed targets
data\ CSV seed/config data
tests\ unit tests and current sample/bootstrap loaders
doc\ notes, deployment docs, and screenshots
scripts\ development and migration utilities
Intent: keep import scripts tiny and declarative. Your script specifies what to import, from where, how to map it, and the stable key. LifePIM core handles IDs, upserts, tombstones, and logging.
Steps:
- Pick the target domain:
contacts,files,media, or a raw table. - Define a mapping: target field to source column or transform.
- Choose a stable key:
source_uidorsha256. - Pick mode:
snapshot,authoritative, ormerge. - Dry-run first.
What gets overwritten:
- Importer targets: fields written by the writer are overwritten on upsert.
source_system,source_uid, andimported_*fields are also updated each run. snapshotmode: previously imported rows for the samesource_systemare markedis_deleted=1.authoritativeplus tombstone: rows missing from the current feed are markedis_deleted=1.mergemode: only provided fields are updated; no deletes or tombstones.
Be careful:
- A wrong key can overwrite unrelated entities. Use a stable key and prefer
sha256for files. snapshotandauthoritativecan mark many rows deleted if the feed is incomplete.load_tblis a raw insert with no de-duplication or stable IDs. Use it only for simple append-only tables.
Python usage examples:
import common.import_tools as mod_tool
# CSV -> contacts (importer-backed)
mod_tool.load_csv(
tbl="lp_contacts",
fname="contacts.csv",
map={
"source_uid": "ContactID",
"display_name": "Name",
"email": "Email",
"phone": "Phone",
},
key="source_uid",
mode="snapshot",
source_system="contacts_csv",
dry_run=True,
)
# SQLite -> audio (raw copy)
mod_tool.load_tbl(
tbl="lp_audio",
src_db="filelist.db",
src_tbl="tbl_files",
cols_to_insert=["file_name", "size"],
select_named="select metadata_filename, metadata_file",
)
# SQLite -> files (mapped copy with transforms)
mod_tool.load_tbl_mapped(
tbl="lp_files",
src_db="filelist.db",
src_tbl="tbl_files",
map={
"path": "path",
"size": ("size", "to_int"),
"mtime_utc": ("mtime", "parse_dt_utc"),
"file_type": "type",
},
)