Vritti is a behavioural analysis tool for retail stock market investors. Upload your Zerodha trade book and Vritti analyses every trade for 13 psychological biases including panic selling, FOMO buying, loss aversion, revenge trading, overconfidence, and more. It then gives you a Behaviour Score and a plain English report showing exactly what you keep doing wrong and when.
- 13 Psychological Biases Detected: Panic Selling, FOMO Buying, Loss Aversion, Overtrading, Herd Behavior, Revenge Trading, Recency Bias, Overconfidence, Sector Concentration, Sunk Cost Fallacy, Calendar Effect, Information Overload, Disposition Effect
- Behaviour Score: A single number from 0 to 100 that tells you how rationally you've been trading and what to fix first
- Zerodha Integration: Built specifically for Zerodha Kite users with support for Trade Book and Tax P&L exports
- Privacy First: Everything runs entirely in your browser. Your CSV file is never uploaded to any server
- Visual Reports: Beautiful charts and visualizations including radar charts, timelines, and quadrant analysis
- Counterfactual Analysis: See what your portfolio would look like if you traded without your biases
- Export Reports: Generate professional PDF reports of your analysis
- Frontend: React 19, React Router 7
- Styling: Tailwind CSS 4
- Animations: Framer Motion 12
- Charts: Recharts 3
- Icons: Lucide React
- File Processing: PapaParse (CSV), XLSX (Excel)
- Build Tool: Vite 8
- Deployment: Vercel
src/
├── components/ # Reusable UI components
│ ├── Navbar.jsx # Navigation bar
│ ├── Footer.jsx # Footer component
│ ├── ScrollProgress.jsx # Scroll progress indicator
│ ├── BehaviourScore.jsx # Score display component
│ ├── BehaviourPhilosophy.jsx # Philosophy explanation
│ ├── BiasCard.jsx # Individual bias card
│ ├── NudgeFeed.jsx # Nudge notifications
│ ├── TradeTimeline.jsx # Trade timeline visualization
│ ├── HoldingTable.jsx # Holdings table
│ └── VrittiLogo.jsx # Logo component
├── pages/ # Page components
│ ├── Home.jsx # Landing page
│ ├── Analyse.jsx # File upload and analysis page
│ ├── Dashboard.jsx # Results dashboard
│ ├── ReportPrint.jsx # Print/export report page
│ ├── About.jsx # About builder page
│ └── NotFound.jsx # 404 page
├── utils/ # Utility functions
│ ├── analyseTrader.js # Core analysis logic
│ ├── parseCSV.js # CSV/XLSX parsing
│ ├── counterfactual.js # Counterfactual analysis
│ └── storage.js # Local storage management
├── workers/ # Web workers
│ └── analyser.worker.js # Background analysis worker
├── data/ # Sample data
│ └── sampleTrades.js # Demo trade data
└── App.jsx # Main app component with routing
User Uploads File
↓
parseCSV.js (Parses CSV/XLSX)
↓
analyseTrader.js (Analyzes trades for biases)
↓
Dashboard.jsx (Displays results)
↓
ReportPrint.jsx (Exports report)
- File Parsing: parseCSV.js handles CSV and XLSX files with automatic format detection
- Trade Matching: Matches BUY-SELL pairs to determine completed trades
- Bias Detection: analyseTrader.js runs 13 different bias detection algorithms
- Scoring: Calculates weighted bias scores to determine Behaviour Score
- Visualization: Recharts renders charts and graphs
- Export: ReportPrint.jsx generates professional PDF reports
Vritti uses Framer Motion for smooth, professional animations:
- Page Transitions: Smooth fade-in animations when navigating between pages
- Scroll Reveals: Elements animate into view as you scroll
- Hover Effects: Cards and buttons have subtle hover animations
- Loading States: Professional loading animations during analysis
- Chart Animations: Charts animate smoothly when data loads
// Page fade transition
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5 }}
>
<Home />
</motion.div>
// Scroll reveal
useEffect(() => {
const observer = new IntersectionObserver(
(entries) => entries.forEach((e) => {
if (e.isIntersecting) e.target.classList.add('visible');
}),
{ threshold: 0.1 }
);
document.querySelectorAll('.reveal').forEach((el) => observer.observe(el));
return () => observer.disconnect();
}, []);- Node.js 18 or higher
- npm or yarn
# Clone the repository
git clone https://github.com/agarwal-tanmay-work/vritti.git
cd vritti
# Install dependencies
npm install
# Run development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview- Push to GitHub:
git add .
git commit -m "Your commit message"
git push origin main-
Deploy on Vercel:
- Go to vercel.com
- Click "Add New Project"
- Import your GitHub repository
- Vercel will automatically detect it as a Vite project
- Click "Deploy"
-
Configuration:
- Build Command:
npm run build - Output Directory:
dist - Install Command:
npm install
- Build Command:
- Create a Vercel account at vercel.com
- Install Vercel CLI:
npm install -g vercel - Login:
vercel login - Deploy:
vercelfrom project root - Follow the prompts to configure your project
Vritti accepts Zerodha Trade Book and Tax P&L files in CSV/XLS/XLSX format.
Required columns:
- symbol
- trade_type (BUY/SELL)
- quantity
- price
- date (any date column)
For Tax P&L, use the Tradewise Exits sheet with columns:
- Symbol
- Entry Date
- Exit Date
- Quantity
- Buy Value
- Sell Value
- Profit
- Client-Side Only: All analysis runs in your browser
- No Server Upload: Your data never leaves your device
- No Tracking: No analytics or tracking
- Local Storage: Analysis results stored in browser local storage only
- Zero Backend: Vritti is a pure frontend application
- Web Workers: Analysis runs in background worker to keep UI responsive
- Lazy Loading: Components loaded on demand
- Code Splitting: Optimized bundle sizes
- Large File Support: Handles tradebooks up to 32 MB
- Chrome (recommended)
- Firefox
- Safari
- Edge
This is a personal project by Tanmay Agarwal. For inquiries, reach out via LinkedIn or GitHub.
MIT License - feel free to use this as inspiration for your own projects.
- Built by Tanmay Agarwal
- Inspired by Nithin Kamath's vision for AI in retail investing
- Powered by Zerodha Varsity educational content