Files
Incido/README.md
T
Incido Developer 5e1b77bedf feat: v0.2 - polish, favourites, search, colours, checklists, signing
v0.2 bundles all four phases from the planning session into a single
shippable release. versionCode 2 -> 3, versionName 0.1.1 -> 0.2.

DOMAIN
  - Add NoteColor enum (NONE / BLUE / GREEN / AMBER / RED / PURPLE).
  - Note: isFavorite + color fields; checklistCounts / checklistSummary
    helpers parsing '- [ ]' / '- [x]' lines.
  - NoteRepository: new search(query) + setFavorite(id, value) methods.

DATA
  - NoteEntity: additive @Index isFavorite + colorKey (Short).
  - NoteRepositoryImpl: search uses ObjectBox 'contains' case-insensitive;
    observeAll + search sort favourites-first then updatedAt DESC.

UI
  - NoteListViewModel: debounced(150ms) query -> repository.search;
    openSearch / closeSearch helpers; toggleFavorite.
  - NoteListScreen: search bar in top app bar; star icon + 4dp colour
    stripe per card; checklist summary line ('N open - M done').
  - NoteEditorViewModel: toggleFavorite + setColor; initial-snapshot
    fields captured on first non-null observeById for dirty detection.
  - NoteEditorScreen: BackHandler + AlertDialog 'Discard changes?' on
    unsaved edits; star toggle in top bar; LazyRow of colour swatches.

POLISH
  - Discard-confirm dialog implements Development Plan §5.2.
  - Real release signing config (signingConfigs.release pointing at the
    dev keystore in keystore/); keystore/release.jks gitignored;
    keystore/README.md documents generation & rotation.
  - KMP migration deferred to v0.5 (tracked in plan §10).

COMMUNITY / GITEA
  - .gitea/workflows/build.yml: assembleDebug on push & PR, APK as
    artefact.
  - CONTRIBUTING.md, CODE_OF_CONDUCT.md (Contributor Covenant v2.1),
    .gitea/ISSUE_TEMPLATE/{bug_report,feature_request}.yml,
    .gitea/PULL_REQUEST_TEMPLATE.md.
  - README: v0.2 changelog + Gitea remote-setup instructions.

VERIFIED
  - ./gradlew assembleDebug assembleRelease both green.
  - Debug APK 25.6 MB, release 19.8 MB, both v0.2 / versionCode 3.
  - apksigner verify: 'Verifies' / v2 scheme true.
  - No INTERNET permission in either APK (privacy posture unchanged).
2026-08-14 23:27:27 +12:00

223 lines
7.5 KiB
Markdown

# Incido
> **Your notes. Your device. Your terms.**
Incido is a privacy-first, on-device note-taking application for Android.
All data stays on your device by default — no accounts, no cloud, no
trackers.
This repository contains the **v0.2** release: a single-user, offline note
app with favourites, full-text search, colour-coded notes, and inline
checklists. The architecture is multi-module Android today and is
structured so iOS / Desktop ports can happen later without UI rewrites.
**Current release:** v0.2 (see [Changelog](#changelog) below).
---
## Features
### v0.2 highlights
- **Favourites.** Tap the star icon on any card to pin it to the top of
the list. (Replaces the §6.1 "Pinned Notes" item; renamed per
maintainer request.)
- **Full-text search.** Tap the search icon in the top app bar; the list
filters live as you type. Backed by ObjectBox's `contains` query —
case-insensitive, no extra dependencies.
- **Color-coded notes.** Pick from six preset accent colours in the
editor (none / blue / green / amber / red / purple). Each list card
gets a 4dp vertical stripe on the left edge.
- **Inline checklists.** Lines beginning with `- [ ]` or `- [x]` are
parsed; the card preview shows the open/done counts (e.g.
"2 open · 1 done"). No DB schema migration — the text stays plain.
- **Discard-confirm dialog.** Closing the editor with unsaved changes
now prompts "Discard changes?" with Discard / Keep-editing buttons.
Applies to both the Back arrow and the hardware back gesture.
### v0.1.1 polish
- **Editor respects the soft keyboard.** With edge-to-edge enabled, the
editor's `Scaffold` unions `WindowInsets.systemBars` with
`WindowInsets.ime`, so the text field automatically shrinks above the
keyboard instead of being hidden behind it. `adjustResize` is also set
on `MainActivity` as a pre-Android-15 fallback.
- **List cards now show a title + body preview.** The first non-empty line
of a note is treated as its title and rendered in a larger / bolder
style; the remainder is shown as an abbreviated preview below it
(max 2 lines, ellipsised). Empty notes display as "Untitled".
### v0.1.0 (original MVP)
- Create, edit, and delete plain-text notes
- ObjectBox-backed persistence ([objectbox.io](https://objectbox.io/))
- Material 3 UI with dynamic color (Android 12+), dark/light follows system
- Fully offline — no `INTERNET` permission
- Multi-module Android project (Android today, iOS/Desktop-ready later)
---
## Roadmap
See [`Incido Development Plan.txt`](./Incido%20Development%20Plan.txt) at
the repository root for the canonical backlog, including on-device ML,
cross-platform ports, end-to-end sync, and security features.
---
## Changelog
| Version | Date | Highlights |
|---------|------|------------|
| 0.1 | 2026-08-14 | First MVP: list + editor, ObjectBox, Material 3 |
| 0.1.1 | 2026-08-14 | Editor IME fix + title/body on list cards |
| 0.2 | 2026-08-14 | Polish + favourites, search, colours, checklists, discard dialog, release signing |
---
## License
Incido is released under the **GNU Affero General Public License v3.0**
(AGPL-3.0). See [`LICENSE`](./LICENSE) for the full text and
[`NOTICE`](./NOTICE) for attributions.
Any user who runs a modified version as a network service must publish
their source code changes. This is intentional — it preserves the
"contribute back" guarantee for all downstream users.
---
## Project Layout
```
incido/
├── app/ # Android entry point (manifest, MainActivity)
├── composeApp/ # Shared Compose UI module
├── core/
│ ├── domain/ # Pure-Kotlin domain models + repository interface
│ └── data/ # ObjectBox-backed repository implementation
├── gradle/ # Version catalog (libs.versions.toml) + wrapper
├── keystore/ # Release signing (gitignored *.jks, README kept)
├── .gitea/ # Gitea Actions workflow + issue/PR templates
├── CONTRIBUTING.md
├── CODE_OF_CONDUCT.md
└── LICENSE
```
---
## Build Instructions
### Prerequisites
| Tool | Version | Notes |
|------|---------|-------|
| JDK | 17 (LTS) | `java -version` |
| Android SDK | API 35 + build-tools 35.0.0 | Install via `sdkmanager` |
| Gradle | 8.10.2 | Wrapped — `./gradlew` downloads it on first run |
| Kotlin | 2.0.21 | Bundled with the Gradle build |
You do **not** need Android Studio. The CLI build works.
### 1. Configure `local.properties`
Create `local.properties` at the project root (already gitignored):
```
sdk.dir=/path/to/your/Android/sdk
```
On Linux this is typically `~/Android/sdk`.
### 2. Accept SDK licenses (one-time)
```bash
yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses
```
### 3. Build the debug APK
```bash
./gradlew assembleDebug
```
The APK is written to `app/build/outputs/apk/debug/app-debug.apk`.
### 4. (Optional) Build a signed release APK
```bash
./gradlew assembleRelease
```
Uses the dev keystore at `keystore/release.jks` — see
[`keystore/README.md`](./keystore/README.md) for regeneration instructions.
**Replace this keystore with a production key before any external
distribution.**
### 5. Install on a device
```bash
adb install -r app/build/outputs/apk/debug/app-debug.apk
```
Or open the project in Android Studio and click **Run**.
---
## Remote / Gitea Setup
When your self-hosted Gitea instance is online, register the remote and
push the existing local commits:
```bash
git remote add origin https://your-gitea.example.com/yourname/incido.git
git push -u origin main
git push origin --tags # if you have any local tags
```
After the first push:
- `.gitea/workflows/build.yml` will automatically build the debug APK
on every push to `main` and on every pull request. The APK is uploaded
as a workflow artefact (`.gitea → Actions → build → Artifacts`).
- `.gitea/ISSUE_TEMPLATE/bug_report.yml` and
`feature_request.yml` will be picked up by Gitea when users open new
issues.
- `.gitea/PULL_REQUEST_TEMPLATE.md` will be auto-loaded on new PRs.
---
## Manual Smoke Test (Development Plan §7.2 + v0.2 additions)
```
[ ] Launch app — see empty state message ("No notes yet. Tap + to start.")
[ ] Tap FAB — editor opens, cursor in text field
[ ] Type "Test note 1" — tap save — returns to list, "Test note 1" card visible
[ ] Tap star on card 1 — it floats to the top
[ ] Tap search icon — type "Test" — only matching card remains
[ ] Close search — full list returns, favourite still on top
[ ] Edit "Test note 2" → tap a colour swatch → save → card shows coloured stripe
[ ] Create a note with "- [ ] milk\n- [x] eggs" → card preview shows "1 open · 1 done"
[ ] Open a note → type extra content → tap Back → discard dialog appears
[ ] Force-stop app from system settings, reopen → all notes + favourites still present
```
---
## Architecture (brief)
- **UI**: 100% Jetpack Compose in `composeApp/`. ViewModels expose
immutable `StateFlow<UiState>` per screen; no third-party state
management library.
- **Domain**: Pure Kotlin interfaces in `core/domain/` — the only thing
the UI sees.
- **Data**: `core/data/` provides the ObjectBox implementation. ViewModels
depend on the interface, so the data layer can be swapped (e.g., for
tests) without touching UI code.
## Contributing
See [`CONTRIBUTING.md`](./CONTRIBUTING.md). All participants are expected
to follow [`CODE_OF_CONDUCT.md`](./CODE_OF_CONDUCT.md). By submitting a
contribution you affirm you have the right to license it under AGPL-3.0.