Skip to content

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dayloom - AI-Powered Productivity Platform

A modern, full-stack AI-powered productivity platform that helps users manage tasks, organize notes, schedule events, and collaborate with an intelligent AI copilot. Built with React Native, NestJS, and PostgreSQL, it leverages Google Gemini Function Calling, Retrieval-Augmented Generation (RAG), and pgvector to deliver contextual, AI-driven productivity experiences.


✨ Highlights

  • 🤖 Google Gemini Function Calling with Native Tool Calling
  • 🔍 Semantic Search powered by pgvector & RAG
  • 📱 Cross-platform React Native mobile application
  • ⚡ Optimistic UI with TanStack Query & Loading Skeletons
  • 🔐 JWT Authentication with Refresh Token Rotation
  • 🛡️ Multi-Tier API Rate Limiting (Global, Auth Brute-Force, Daily User AI Quotas)
  • 📅 Google Calendar Integration

🏗️ System Architecture

┌────────────────────────────────────────────┐
│         React Native Mobile App            │
│  Expo • NativeWind • TanStack Query        │
└───────────────────┬────────────────────────┘
                    │
              REST API + JWT
                    │
┌───────────────────▼────────────────────────┐
│               NestJS Backend               │
│                                            │
│  • Authentication & Rate Limiting Guard    │
│  • Tasks & Projects                        │
│  • Notes & Semantic Search                 │
│  • Calendar Integration                    │
│  • AI Copilot & Function Calling           │
└──────────────┬───────────────┬─────────────┘
               │               │
               ▼               ▼
      PostgreSQL          Google Gemini
   Prisma + pgvector     LLM + Embeddings

🛠️ Tech Stack

📱 Frontend (Mobile App)

  • Framework: React Native & Expo (managed workflow with Expo Router file-based navigation).
  • Styling: TailwindCSS via NativeWind (utility-first, responsive dark/light theme styling).
  • State & Caching: TanStack Query & Axios (custom interceptors for silent token rotation, 429 rate limit alert debouncing).
  • UI & Skeletons: Theme-aware animated loading skeleton components for non-blocking UI state transitions.
  • UI & Keyboard: React Native Keyboard Controller (occlusion-free text input avoiding views).

⚙️ Backend (API Service)

  • Framework: NestJS (TypeScript, Modular Architecture, DTO Validation, JwtAuthGuard).
  • Database & ORM: PostgreSQL & Prisma ORM.
  • Vector Search: PostgreSQL pgvector extension for storing and querying 768-dimension embeddings.
  • Authentication: JWT Auth (Access/Refresh Token Rotation, Fingerprinting) & Google OAuth 2.0.
  • Rate Limiting: Multi-tier @nestjs/throttler pipeline for global API protection, strict auth brute-force prevention, and user-bound daily AI quotas.
  • AI Provider: Google Gemini API for LLM inference and text embeddings.

🚀 Features

🔐 1. Authentication & Security

  • JWT Access & Refresh Token Rotation: Secure session management using short-lived Access Tokens and long-lived Refresh Tokens with silent background rotation via custom Axios interceptors.
  • Google OAuth 2.0 Integration: Native Google Sign-In with server-side authentication code exchange and automatic user profile creation.
  • Strict Auth Rate Limiting: Dedicated auth throttler guard enforcing a 5 requests / minute limit on auth routes to block password brute-forcing.
  • Global API Protection: Application-wide @nestjs/throttler guard protecting all CRUD endpoints with a 100 requests / minute rate limit to safeguard database and server compute.
  • Secure Token Storage: Encrypted token persistence on mobile devices using Expo SecureStore.
  • Protected Routes & Session Fingerprinting: NestJS JwtAuthGuard pipeline for API endpoints and protected layout route group ((protected)) on mobile.

🤖 2. AI & Intelligence

  • Dayloom AI Copilot Agent: Conversational life assistant with sliding message history (last 10 messages) to maintain context without token bloat.
  • Native Tool-Calling (Function Calling):
    • search_notes: Performs vector search over notes.
    • get_tasks: Fetches pending active tasks filtered by priority/status.
    • get_calendar_agenda: Retrieves scheduled agenda and events.
    • create_task: Creates tasks in workspace directly via conversational prompts.
    • create_note: Creates notes through natural language.
    • Zero DB Overhead on Chit-Chat: Intent routing bypasses DB execution for non-data prompts.
  • Semantic Vector Search (pgvector): Notes vectorized into 768-dimension embeddings via Gemini Embedding model and queried using cosine similarity (1 - (embedding <=> vector)).
  • Task Prioritization: Analyzes title, description, subtasks, and category to score task priority (LOW, MEDIUM, HIGH, URGENT) with a detailed AI rationale.
  • Task Decomposition: Automatically breaks down complex task prompts into actionable subtasks.
  • Note Summarization: Generates background summaries for notes upon content changes.
  • Daily Briefing: Synthesizes daily completed vs pending workload.

✅ 3. Task & Project Management

  • Dual Views (List & Kanban Board): Toggle between detailed Task List view and interactive Kanban Board columns (To Do, In Progress, Done).
  • Optimistic UI Updates: Near-instant optimistic UI updates on task checkmarks using TanStack Query onMutate, onError, and onSettled cache mutations.
  • Nested Subtask Management: Create, toggle, and delete subtasks within parent tasks with real-time progress tracking.
  • Color-Coded Priority Levels: Assign LOW, MEDIUM, HIGH, or URGENT priority levels with distinct visual badges.
  • Custom Categories & Tagging: Organize tasks into color-coded categories (Work, Personal, Health) and multi-tag labels.
  • Recurring Task Schedules: Supports Daily, Weekly, and Monthly recurring patterns that automatically spawn follow-up tasks upon completion.
  • Due Date Scheduling: Integrated date pickers for deadline management.
  • Real-time Task Search & Filtering: Multi-criteria client/server filtering by category, priority, status, and search query.

📝 4. Notes & Knowledge Management

  • Block-Based Document Editor: Rich document editor supporting JSON-serialized blocks (Paragraphs, Headers, Bullet Lists).
  • Dual Search Modes: Toggle seamlessly between traditional keyword search and Gemini vector semantic similarity search.
  • Instant Background Saves: Document edits save to local state immediately without blocking user flow.
  • AI Sources & Citations: Ask Notes and Copilot responses cite matching note sources with similarity percentages.

📅 5. Calendar & Agenda Integration

  • Unified Agenda Timeline (/calendar): Merges Dayloom scheduled tasks and Google Calendar events into a single unified timeline.
  • Google Calendar Integration: OAuth account connection (connectGoogle, disconnectGoogle) fetching live Google Calendar events.

📊 6. Dashboard

  • Personalized Productivity Dashboard: A unified home screen with live productivity metrics, priority tasks, today's agenda, AI-powered daily briefing, and quick actions.
  • Real-Time Focus & Insights: Stay organized with AI-generated focus recommendations, instant task updates, schedule previews, and one-tap navigation to your most important work.

🚀 Getting Started

Prerequisites

  • Node.js: >=18
  • Package Manager: pnpm
  • PostgreSQL Database with pgvector extension enabled (e.g. Supabase, Neon, or local Docker).

1. Installation

Clone the repository and install workspace dependencies:

pnpm install

2. Environment Configuration

Create a .env file in apps/api/:

PORT=3000
DATABASE_URL="postgresql://username:password@localhost:5432/dayloom?sslmode=disable"
JWT_ACCESS_SECRET="your-access-secret"
JWT_REFRESH_SECRET="your-refresh-secret"
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
GEMINI_API_KEY="your-google-gemini-key"

3. Database Setup

Push Prisma schema to PostgreSQL:

pnpm --filter db db:push
pnpm --filter db generate

4. Run Development Server

Start both NestJS API backend and Expo mobile app concurrently:

pnpm dev
  • API Backend: http://localhost:3000
  • Mobile App: Run on Android Emulator, iOS Simulator, or physical device via Expo Go.

About

AI-powered productivity platform featuring task management, notes, calendar integration and an intelligent AI copilot.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages