Skip to content

Repository files navigation

🧭 Axis

Your life, in focus.

A personal life-management system — diary, calendar, goals, wallet, health, habits, and an AI-powered SWOT analysis — all revolving around one center: you.

React Vite Tailwind Supabase Groq


Overview

Axis is a single-user web app that turns daily journaling and tracking into a 360° view of your life. Everything you log — how you felt, what you studied, what you spent, whether you kept your habits — feeds one AI engine that produces a weekly and monthly SWOT analysis (Strengths, Weaknesses, Opportunities, Threats), answered with evidence pulled from your own data.

It was built as a full-stack portfolio project to demonstrate authentication, a secured multi-tenant Postgres schema, data visualization, and an LLM-backed analysis pipeline.

✨ Features

  • 📔 Diary — a signature book-style journal: the cover opens to today's page, you flip back one page per day, past pages are read-only. Ten reflection questions with typed inputs (mood, energy category, split "drained/energized" boxes, gratitude list) chosen so the AI gets clean, structured signal.
  • 📅 Calendar — Month / Week / Day views with a time-grid, colored event blocks for study sessions, tasks and goal deadlines. Click a slot to add, click an event to complete.
  • 🎯 Goals & Study — goals with milestones, an automatic on-track / at-risk / behind pace indicator, plus today's linked study sessions and task checklist.
  • 💰 Wallet — monthly budget, daily spending log, and a category donut chart with live budget-used progress.
  • 🧠 Health — mood, sleep, exercise and water, with a 7-day trend line.
  • 📖 Learning & Growth — books, courses and skills with status and key takeaways.
  • 🔁 Habits — daily check-ins with streaks and a satisfying spring animation.
  • 🗒️ Weekly Review — the AI SWOT: 24 questions answered by Groq with evidence, weekly + monthly, with report history.
  • 🏠 Home dashboard — day-at-a-glance cards with a date scrubber to view any past day, plus a "this week" calendar widget.
  • ➕ Quick Add — a configurable floating button to log an expense, task, habit, mood or session from anywhere; every screen updates live.
  • 🌗 Themes — polished dark and warm-tinted light modes, with smooth hover/press micro-interactions throughout.

🏗️ Tech stack

Layer Tech
Frontend React 18 (Vite), Tailwind CSS, Recharts, Framer Motion, lucide-react
Backend Supabase Edge Functions (Deno / TypeScript)
Database Supabase PostgreSQL with Row Level Security
Auth Supabase Auth (email + Google OAuth)
AI Groq API — Qwen3-32B for SWOT, Llama 3.1 8B for light checks
Hosting Vercel (frontend) + Supabase (backend & DB)

🔒 Architecture highlights

  • Row Level Security — every table has an owner-only policy (auth.uid() = user_id), so the app is multi-tenant-safe even though it's single-user today. The public anon key is safe in the browser because RLS enforces isolation.
  • Two-shape data modeldaily logs (date-keyed) vs ongoing items (goals, budgets that span time), with a =-vs-<= query rule so the dashboard can show "what happened on" vs "where I stood by" any past day.
  • Evidence-grounded AI — the Edge Function pre-aggregates data (counts, totals, %) instead of dumping raw rows, and passes explicit "no data logged" markers so the model reports insufficient data rather than hallucinating.
  • IST day boundary — dates are stamped in IST so late-night entries land on the correct day regardless of server timezone.

🚀 Getting started

git clone https://github.com/YOUR-USERNAME/axis.git
cd axis
npm install
  1. Create a project at supabase.com (no credit card).
  2. In the SQL Editor, run supabase/schema.sql (creates all tables + RLS).
  3. Copy .env.example.env and fill in your Project URL + publishable (anon) key from Settings → API.
  4. Start it:
npm run dev

Open http://localhost:5173, create an account, and start with the Diary.

Enable the AI SWOT (optional)

npx supabase login
npx supabase link --project-ref YOUR_REF
npx supabase secrets set GROQ_API_KEY=your_groq_key
npx supabase functions deploy generate-swot

Then run supabase/schedule_swot.sql to auto-generate the SWOT weekly + monthly.

📁 Project structure

axis/
├─ src/
│  ├─ pages/         # Home, Diary, Calendar, GoalsStudy, Wallet, Health, Learning, Habits, WeeklyReview, Login
│  ├─ components/    # Navbar, Layout, QuickAdd, WeekWidget, Modal, MoodIcon, PageHeader
│  ├─ context/       # AuthContext, ThemeContext
│  └─ lib/           # supabase client, date/IST helpers, calendar, formatting
└─ supabase/
   ├─ schema.sql            # tables + Row Level Security
   ├─ schedule_swot.sql     # pg_cron weekly/monthly SWOT
   └─ functions/generate-swot/  # Groq-backed SWOT Edge Function

📌 Notes

  • The Groq model name lives in one constant in the Edge Function — swap it in one line if Groq's free lineup changes.
  • The Groq key is only ever a Supabase secret; it never touches the frontend.

Built with ☕ as a personal command center.

About

A personal life-management app — diary, calendar, goals, wallet, health & habits — with an AI-powered weekly/monthly SWOT analysis. React, Supabase (Postgres + RLS), Groq.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages