A modern, feature-rich trading journal application built with React, TypeScript, and Firebase. Inspired by professional trading platforms like Tradezella, Tradervue, and TraderSync.
- Trade Logging: Comprehensive trade entry with all essential fields
- Real-time Synchronization: Automatic data sync across devices
- Trade Analytics: P&L tracking, win rate, profit factor, and more
- Trade Status: Track open and closed positions
- Risk Management: R-multiple calculation and risk tracking
- Daily Journal: Record thoughts, market observations, and lessons learned
- Trading Playbooks: Create and manage trading strategies and setups
- Trade Notes: Detailed notes for each trade including emotions and market conditions
- Performance Metrics: Total P&L, win rate, profit factor, average win/loss
- Visual Charts: Performance visualization with Recharts
- Calendar Integration: Track trading activity by date
- Filtering & Sorting: Advanced trade filtering and sorting capabilities
- Email/Password Authentication: Secure user registration and login
- Google OAuth: Quick sign-in with Google
- Password Reset: Secure password recovery
- User Profiles: Personalized user experience
- Automatic Migration: Seamless transition from localStorage to Firebase
- Data Backup: Export and backup capabilities
- Real-time Updates: Live data synchronization across devices
- Node.js (v16 or higher)
- npm or yarn
- Firebase account
-
Clone the repository
git clone <repository-url> cd zella-trade-scribe
-
Install dependencies
npm install
-
Install Firebase
npm install firebase
-
Set up Firebase
- Follow the Firebase Setup Guide
- Create a Firebase project
- Enable Authentication and Firestore
- Get your Firebase configuration
-
Configure environment variables
cp .env.example .env
Fill in your Firebase configuration in the
.env
file:VITE_FIREBASE_API_KEY=your-api-key VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com VITE_FIREBASE_PROJECT_ID=your-project-id VITE_FIREBASE_STORAGE_BUCKET=your-project.appspot.com VITE_FIREBASE_MESSAGING_SENDER_ID=your-sender-id VITE_FIREBASE_APP_ID=your-app-id
-
Start the development server
npm run dev
- React 18 - Modern React with hooks
- TypeScript - Type-safe development
- Vite - Fast build tool and dev server
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Beautiful and accessible React components
- Radix UI - Low-level UI primitives
- Lucide React - Beautiful icons
- Recharts - Composable charting library
- Firebase - Backend-as-a-Service
- Firestore - NoSQL document database
- Firebase Auth - Authentication service
- Firebase Storage - File storage (for screenshots)
- React Context - Global state management
- React Query - Server state management
- React Hook Form - Form state management
- Zod - TypeScript-first schema validation
- React Hook Form - Performant forms with easy validation
src/
βββ components/ # React components
β βββ ui/ # shadcn/ui components
β βββ AuthForm.tsx # Authentication component
β βββ Dashboard.tsx # Main dashboard
β βββ TradeLog.tsx # Trade listing and management
β βββ AddTrade.tsx # Trade entry form
β βββ ...
βββ contexts/ # React contexts
β βββ AuthContext.tsx # Authentication state
β βββ TradeContext.tsx # Trade data state
βββ lib/ # Utility libraries
β βββ firebase.ts # Firebase configuration
β βββ firebaseService.ts # Firebase CRUD operations
β βββ authService.ts # Authentication services
β βββ dataMigration.ts # Migration utilities
βββ types/ # TypeScript type definitions
β βββ trade.ts # Trade-related types
βββ hooks/ # Custom React hooks
βββ pages/ # Page components
- Authentication - Email/Password and Google providers
- Firestore Database - Document storage
- Storage (Optional) - For trade screenshots
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
match /{document=**} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
}
}
}
interface Trade {
id: string;
symbol: string;
date: string;
timeIn: string;
timeOut?: string;
side: 'long' | 'short';
entryPrice: number;
exitPrice?: number;
quantity: number;
pnl?: number;
commission: number;
stopLoss?: number;
takeProfit?: number;
strategy?: string;
marketConditions?: string;
timeframe?: string;
confidence?: number;
emotions?: string;
notes?: string;
screenshots?: string[];
status: 'open' | 'closed';
riskAmount?: number;
rMultiple?: number;
}
The app automatically migrates existing localStorage data to Firebase:
- Automatic Detection: Checks for existing localStorage data on sign-in
- One-time Migration: Migrates trades, journal entries, and playbooks
- Data Validation: Ensures data integrity during migration
- Cleanup: Removes localStorage data after successful migration
npm run build
npm install -g firebase-tools
firebase login
firebase init hosting
firebase deploy
Set up environment variables in your hosting platform or use Firebase configuration.
npm run dev
- Start development servernpm run build
- Build for productionnpm run preview
- Preview production buildnpm run lint
- Run ESLint
- ESLint - Code linting
- TypeScript - Type checking
- Prettier - Code formatting (recommended)
- User authentication (email/password, Google)
- Trade CRUD operations
- Real-time data synchronization
- Dashboard with key metrics
- Data migration from localStorage
- Responsive design
- Trade import/export functionality
- Advanced analytics and reporting
- Trading strategy backtesting
- Performance comparison tools
- Mobile app (React Native)
- Advanced charting integration
- AI-powered trade insights
- Multi-timeframe analysis
- Community features
- API integrations with brokers
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- π Firebase Setup Guide
- π Issue Tracker
- π§ Email Support
- Inspired by Tradezella, Tradervue, and TraderSync
- Built with shadcn/ui components
- Icons by Lucide
- Charts by Recharts
Made with β€οΈ for traders, by traders.