Repository navigation
Releases: npeteros/audit
Release list
v2.1.0
Release Notes
🎉 New Features
1. Feedback Module
User Feedback Collection System
A comprehensive feedback collection system that captures user sentiment and suggestions to improve the application.
Key Features:
-
Multi-Dimensional Feedback Collection
- Emotion-based rating system with 5 levels (Terrible, Bad, Okay, Good, Amazing)
- Net Promoter Score (NPS) rating from 1-10
- Free-form text comments/suggestions (up to 1000 characters)
- Optional email capture for follow-up
-
Smart Display Logic
- Automatically appears after 5 minutes of user activity
- 24-hour cooldown between displays to avoid survey fatigue
- Dismissing the modal counts as a submission to prevent repeated prompts
- Persistent tracking using localStorage
-
User Experience
- Interactive emoji-based emotion selector with grayscale/color transition effects
- Color-coded NPS buttons (red for detractors 1-6, yellow for passives 7-8, green for promoters 9-10)
- Responsive design optimized for mobile and desktop
- Auto-populated email for authenticated users
- Real-time character counter for feedback messages
-
Data Management
- Integrates with Google Sheets for centralized feedback storage
- Captures: timestamp, user ID, email, emotion rating, NPS score, and message
- Type-safe validation using Zod schema
- Toast notifications for submission success/failure
Technical Implementation:
- Components:
feedback-modal.tsx - API:
/api/feedback(POST endpoint) - Services:
feedback.services.ts(Google Sheets integration) - Types:
feedback.types.ts(EmotionRating enum, FeedbackSchema, FeedbackInput, FeedbackResponse) - Tanstack Query: Mutation hook for optimistic updates and error handling
- Storage: LocalStorage for submission tracking
2. Financial Analyst AI Agent
Intelligent Conversational AI for Financial Data Analysis
A read-only AI agent powered by GPT-4o-mini that helps users understand their financial data through natural language conversations.
Key Capabilities:
Query & Analysis:
- Analyze spending patterns and income sources
- Provide financial summaries (income, expenses, balance)
- Query transactions by date, category, or wallet
- Compare spending across different time periods
- Show recent activity and transaction history
- List and describe available wallets and categories
- Validate entity existence
Natural Language Date Processing:
- Understands relative dates ("last month", "this year", "yesterday")
- Parses absolute dates ("January 22, 2026", "2026-01-22", "01/22/2026")
- Automatically gets current date/time for context-aware responses
Smart Features:
- Queries across ALL wallets by default unless user specifies otherwise
- Multi-step reasoning with up to 15 tool call iterations
- Real-time transaction amount formatting (Philippine Peso ₱ with 2 decimal places)
- Conversational, friendly responses with financial insights
- Pattern detection and recommendations
Tool Arsenal (21 Read-Only Tools):
Date & Time Tools (3):
getCurrentDateTime- Get current date and timeparseRelativeDate- Parse relative expressions (e.g., "last month")parseAbsoluteDate- Parse specific dates (e.g., "January 22, 2026")
Transaction Tools (5):
getTransactions- Paginated transactions with filtersgetTransactionById- Specific transaction detailsgetRecentTransactions- Recent activitygetTransactionsByDateRange- Date range queriesgetTransactionSummary- Financial summary (income, expense, balance)
Wallet Tools (4):
getWallets- All user wallets with balancesgetWalletsPaginated- Paginated wallets with searchgetWalletById- Specific wallet detailsgetWalletBalance- Wallet balance calculation
Category Tools (4):
getCategories- All available categoriesgetCategoriesByScope- Filter by GLOBAL/USER scopegetCategoryById- Specific category detailsgetCategoryCountByType- Category statistics
User & Validation Tools (5):
getUserStats- User statistics overviewgetUserProfile- User profile detailswalletExists- Validate wallet existencecategoryExists- Validate category existencetransactionExists- Validate transaction existencegetAuthenticatedUserId- Extract current user context
User Interface:
- Floating Chatbot Widget
- Fixed position in bottom-right corner
- Expandable/collapsible with minimize/maximize controls
- Responsive design (full-screen on mobile, fixed 600px height on desktop)
- Real-time streaming responses
- Loading indicators and error states
- Markdown support for formatted responses
- Experimental feature warning badge
Security & Performance:
Rate Limiting:
- 100 requests per user per 60-minute window
- In-memory tracking with automatic cleanup
- Returns remaining quota and reset timestamp
- HTTP 429 responses with proper headers when exceeded
Authentication:
- Requires authenticated user session
- HTTP 401 responses for unauthorized access
- User context automatically passed to agent
Error Handling:
- Safe tool execution with try-catch wrappers
- Graceful degradation for missing data
- Clear error messages to users
- Comprehensive logging for debugging
Technical Implementation:
- Agent:
financial-analyst-agent.ts(ToolLoopAgent with GPT-4o-mini) - API:
/api/chat(POST endpoint with streaming) - Components:
floating-chatbot.tsx - Tools: Organized by category (date, transaction, wallet, category, user)
- Utilities: Rate limiter, response formatters
- Types: Type-safe message inference with
FinancialAnalystAgentMessage - Framework: Vercel AI SDK with streaming support
- State Management: React hooks (
useChat)
🔧 Technical Notes
Dependencies:
- AI/ML:
@ai-sdk/openai,@ai-sdk/react,ai - Validation:
zod - HTTP Client: Native
fetch - State Management:
@tanstack/react-query - UI Components: Shadcn/ui components (Dialog, Button, Input, Textarea, Card, etc.)
- Google Integration: Google Sheets API for feedback storage
Environment Requirements:
- OpenAI API key (for GPT-4o-mini)
- Google Sheets API credentials (for feedback storage)
- Authenticated user session (Supabase Auth)
Performance Considerations:
- Rate limiting prevents API abuse
- In-memory caching for rate limit data
- Streaming responses for better UX
- Automatic cleanup of expired rate limit entries
- Tool result logging for monitoring
📝 Usage Examples
Feedback Module:
Users will automatically see the feedback modal after:
- Being active in the app for 5 minutes
- At least 24 hours have passed since last submission/dismissal
AI Agent Examples:
- "What did I spend last month?"
- "Show my income for this year"
- "How much is in my Cash wallet?"
- "List my top 5 expenses in January"
- "Compare my spending this month vs last month"
- "What categories am I spending the most on?"
⚠️ Known Limitations
Feedback Module:
- Requires client-side JavaScript
- LocalStorage-based tracking (cleared if user clears browser data)
- Google Sheets dependency for storage
AI Agent:
- Read-only: Cannot create, update, or delete data
- Rate limited to 100 requests/hour per user
- Experimental feature - may provide inaccurate information
- Requires active internet connection for API calls
- Tool execution limited to 15 steps per conversation
- No conversation history persistence (stateless)
🚀 Future Enhancements
AI Agent:
- Conversation history persistence
- Export conversation to PDF/Email
- Voice input/output support
- Proactive financial insights and alerts
- Budget recommendations
- Spending anomaly detection
- Write capabilities (create transactions, set budgets)
v2.0.1
What's Changed
- feat: add manifest file for PWA support with app metadata and icons by @npeteros in #18
- chore: add new PNG images for branding by @npeteros in #19
- refactor: update app icons for branding consistency by @npeteros in #20
- chore: update PNG images for audit branding with padding by @npeteros in #21
- feat: add comprehensive reports dashboard with charts and filters for income and expense analysis by @npeteros in #22
- Release: v2.0.1 by @npeteros in #23
Full Changelog: v2.0...v2.0.1
v2.0
What's Changed
- [release] v2.0 by @npeteros in #8
- Release: Deploy version 2.0 to Production by @npeteros in #10
- feat: enable user redirection to login page when no session is found by @npeteros in #11
- fix: ensure proper redirection to login page when no user session is … by @npeteros in #12
- refactor: remove console logs and update redirect path in authentication components by @npeteros in #13
- feat: implement session management with API integration for user authentication by @npeteros in #14
- refactor: consolidate user data retrieval by updating user-related hooks and componenets by @npeteros in #15
- refactor: remove unused user data retrieval and implement logout functionality in dashboard layout by @npeteros in #16
- refactor: added metadata for SEO by @npeteros in #17
New Contributors
Full Changelog: https://github.com/npeteros/audit/commits/v2.0