{"id":32861813,"url":"https://github.com/bemmett1/habitlog","last_synced_at":"2026-04-28T16:02:01.193Z","repository":{"id":323077753,"uuid":"1092050178","full_name":"BEmmett1/habitlog","owner":"BEmmett1","description":"Offline-first habit tracker built with Expo and SQLite. Track your mood, food, exercise, and notes privately on your device.","archived":false,"fork":false,"pushed_at":"2025-11-07T23:09:46.000Z","size":129,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-08T01:09:20.784Z","etag":null,"topics":["expo","habit-tracker","mobile","offline","react-native","sqlite"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BEmmett1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-07T23:08:24.000Z","updated_at":"2025-11-07T23:27:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/BEmmett1/habitlog","commit_stats":null,"previous_names":["bemmett1/habitlog"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/BEmmett1/habitlog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BEmmett1%2Fhabitlog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BEmmett1%2Fhabitlog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BEmmett1%2Fhabitlog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BEmmett1%2Fhabitlog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BEmmett1","download_url":"https://codeload.github.com/BEmmett1/habitlog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BEmmett1%2Fhabitlog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32387923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expo","habit-tracker","mobile","offline","react-native","sqlite"],"created_at":"2025-11-08T22:00:41.330Z","updated_at":"2026-04-28T16:02:01.188Z","avatar_url":"https://github.com/BEmmett1.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Habitlog\n\nA lightweight, **offline-first habit tracker** built with [Expo](https://expo.dev), [React Native](https://reactnative.dev/), and [SQLite](https://docs.expo.dev/versions/latest/sdk/sqlite/).  \nTracks daily habits such as mood, food, exercise, and notes — all stored locally on the device for privacy.\n\n---\n\n## 🚀 Features (Current MVP)\n- Add and view daily mood logs  \n- Local data storage using `expo-sqlite`  \n- Offline-first design (no internet required)  \n- Expo Router for clean navigation  \n- Auto-initialized database with schema versioning  \n- Works on iOS, Android, and (later) web\n\n---\n\n## 🧠 Tech Stack\n| Layer | Tool | Purpose |\n|-------|------|----------|\n| UI | React Native + Expo | Cross-platform interface |\n| Navigation | Expo Router | File-based routes |\n| Database | expo-sqlite | On-device SQLite database |\n| State | React hooks (Zustand optional) | Lightweight UI state |\n| Styling | Inline styles (to start) | Easy prototyping |\n| Platform | Expo Go / Expo CLI | Build, debug, and deploy |\n\n---\n\n## 📁 Project Structure\n```\nhabitlog/\n│\n├─ app/                    # Screens and routes\n│   ├─ _layout.tsx         # Root layout and DB initialization\n│   ├─ index.tsx           # Home screen\n│   └─ add/\n│       └─ mood.tsx        # Log Mood screen\n│\n├─ lib/\n│   ├─ db.ts               # SQLite initialization and schema\n│   ├─ format.ts           # Date/time helpers\n│   └─ queries.ts          # Common SQL queries\n│\n├─ store/                  # (Future) UI state stores\n├─ types/                  # Shared TypeScript types\n├─ package.json\n├─ app.json\n└─ README.md\n```\n\n---\n\n## ⚙️ Setup Instructions\n\n1. **Clone the project**\n   ```bash\n   git clone https://github.com/YOUR_USERNAME/habitlog.git\n   cd habitlog\n   ```\n\n2. **Install dependencies**\n   ```bash\n   npm install\n   ```\n\n3. **Start the development server**\n   ```bash\n   npx expo start\n   ```\n\n4. **Run it**\n   - Scan the QR code with **Expo Go** on your phone, or  \n   - Press `i` (iOS simulator) or `a` (Android emulator)\n\n---\n\n## 🧩 How it Works\n\n1. On startup, the `initDb()` function in `lib/db.ts` creates tables for:\n   - `mood_entries`\n   - `food_entries`\n   - `exercise_entries`\n   - `notes`\n\n2. The user can navigate via **Expo Router** (e.g., `/add/mood`).\n\n3. Each entry form calls a helper from `lib/queries.ts` to insert data.\n\n4. The Home screen (`index.tsx`) queries and displays recent entries.\n\n---\n\n## 🛣️ Roadmap\n- [x] Basic mood tracking  \n- [ ] Add food logging  \n- [ ] Add exercise logging  \n- [ ] Add daily notes/journal  \n- [ ] Weekly summaries and charts  \n- [ ] CSV data export  \n- [ ] Simple reminder notifications  \n- [ ] Optional encrypted cloud backup\n\n---\n\n## 🧑‍💻 Development Notes\n- Database is initialized once inside `_layout.tsx`\n- `app/_layout.tsx` displays a loading screen until DB is ready\n- All SQL commands are run asynchronously for stability\n- No network permissions are required\n\n---\n\n## 📜 License\nMIT License — feel free to fork and customize.\n\n---\n\n*Built by Benny Thompson (PixelMeta) — documenting each step to understand every layer of the stack.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbemmett1%2Fhabitlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbemmett1%2Fhabitlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbemmett1%2Fhabitlog/lists"}