Skip to content

adirane45/LifeOS

Repository files navigation

LifeOS banner

Repository Next.js Prisma TypeScript

Dashboard for personal tracking with money, habits, health, journal, goals, and an assistant that can stream answers and remember conversation history.

What It Does · Visual Map · Stack · Getting Started · Scripts


What It Does

LifeOS combines several daily-life surfaces into one workspace so you can move from tracking to action without switching apps.

  • Money management with accounts, transactions, budgets, bills, splits, investments, tax, and net worth views.
  • Habits, goals, and health tracking with charts, streaks, and progress views.
  • Journal capture with history, mood context, and quick review.
  • Assistant chat with streaming responses and persisted conversation history.

Visual Map

App Surface

flowchart TB
  User[User] --> Shell[LifeOS Shell]
  Shell --> Dashboard[Dashboard]
  Shell --> Money[Money]
  Shell --> Habits[Habits]
  Shell --> Health[Health]
  Shell --> Journal[Journal]
  Shell --> Goals[Goals]
  Shell --> Assistant[Assistant]

  Money --> Accounts[Accounts]
  Money --> Transactions[Transactions]
  Money --> Budgets[Budgets]
  Money --> Bills[Bills]
  Money --> Splits[Splits]
  Money --> Investments[Investments]
  Money --> Tax[Tax]

  Assistant --> Api[/API Routes/]
  Api --> Db[(Prisma + SQLite)]
  Dashboard --> Charts[Client Charts]
  Habits --> Charts
  Health --> Charts
  Journal --> Db
  Goals --> Db
Loading

Assistant Flow

sequenceDiagram
  participant U as User
  participant UI as Assistant UI
  participant API as /api/assistant
  participant DB as Prisma / SQLite

  U->>UI: Send a message
  UI->>API: POST conversation
  API-->>UI: Stream tokens back
  UI->>DB: Save user message
  UI->>DB: Save assistant reply
  UI->>DB: Load history on refresh
Loading

Feature Matrix

Area Highlights
Dashboard At-a-glance overview with fast navigation across the product.
Money Accounts, transactions, budgets, bills, tax, splits, and net worth tracking.
Habits Streaks, completion history, and visual progress cues.
Health Metric tracking with charts and trend analysis.
Journal Entry creation, editing, and long-term reflection.
Goals Structured goal tracking with categories and progress updates.
Assistant Streaming chat responses, persisted history, and clear-history support.

Stack At A Glance

Layer Tools
Frontend Next.js App Router, React, TypeScript
Styling Tailwind CSS, Framer Motion, Lucide React
Charts Recharts
Database Prisma, SQLite, better-sqlite3 adapter
AI OpenAI-compatible integrations, Groq, Cohere, Google Generative AI
UX react-hot-toast, confirm dialogs, client/server component split

Getting Started

  1. Install dependencies.
npm install
  1. Add environment variables in .env.local.

At minimum you need DATABASE_URL. Add one or more AI provider keys depending on the features you want to use.

Variable Purpose
DATABASE_URL Prisma database connection string, for example file:./dev.db
GROQ_API_KEY Groq/OpenAI-compatible assistant access
OPENAI_API_KEY Optional assistant fallback
COHERE_API_KEY Optional provider support
  1. Push the Prisma schema to your database.
npx prisma db push
  1. Start the app.
npm run dev

If you are on Windows and PowerShell gives you profile or terminal warnings, cmd /c npm run dev is a reliable fallback.


Scripts

Command Purpose
npm run dev Start the local development server
npm run build Build the production bundle
npm run start Run the production server
npm run prisma:generate Regenerate the Prisma client
npm run prisma:migrate Create and apply a migration

Project Layout

app/         routes, server actions, API endpoints
components/  UI building blocks, charts, and client wrappers
lib/         data access, assistant tools, utilities
prisma/      schema and migrations
styles/      global styling

Development Notes

  • Server pages fetch and shape data before rendering, which keeps the initial load fast and consistent.
  • Chart-heavy components are isolated behind client wrappers so the server can stream the rest of the page early.
  • The assistant page restores conversation history from the database and saves messages after the streamed reply completes.
  • The UI is designed to stay usable even when a section has no data yet; empty states are shown instead of broken views.

Validation

The current workspace has been validated with:

npm run build

License

MIT


Built for a personal operating system that feels responsive, visual, and calm to use.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages