VeeFore - Complete Project Documentation
**Latest Update**: July 10, 2025 - Logo Asset Migration & Production Build Complete
VeeFore - Complete Project Documentation
Latest Update: July 10, 2025 - Logo Asset Migration & Production Build Complete
π Project Overview
VeeFore is a comprehensive, enterprise-grade social media management platform powered by cutting-edge AI technology. It provides creators, businesses, and marketing professionals with intelligent automation tools, advanced analytics, and seamless multi-platform content management capabilities.
Key Features
- 15+ AI-Powered Tools: Content generation, thumbnail creation, trend analysis, automation, and more
- Multi-Platform Integration: Instagram, Facebook, Twitter, LinkedIn, YouTube support
- Advanced Analytics: Real-time insights, performance tracking, engagement optimization
- Team Collaboration: 9-tier role system with granular permissions
- Subscription Management: 4-tier pricing with credit-based system
- Professional UI: Hootsuite-inspired design with modern, responsive interface
ποΈ Technical Architecture
Frontend Stack
- Framework: React 18.2.0 with TypeScript
- Build Tool: Vite 5.0+ for fast development and optimized builds
- Styling: Tailwind CSS with shadcn/ui component library
- State Management: React Query (TanStack Query) for server state, React hooks for client state
- Routing: Wouter for lightweight client-side routing
- Animations: Framer Motion for smooth transitions and micro-interactions
- Forms: React Hook Form with Zod validation
- UI Components: shadcn/ui with custom design system
Backend Stack
- Runtime: Node.js 18+ with Express.js
- Database: MongoDB Atlas with Mongoose ODM
- Authentication: Firebase Authentication with JWT tokens
- File Storage: Local filesystem with HTTP redirects
- Email Service: SendGrid SMTP for transactional emails
- Payment Processing: Razorpay (primary) and Stripe (international)
- Real-time Features: WebSocket connections for live updates
AI & External Services
- OpenAI: GPT-4o for content generation, DALL-E 3 for image creation
- Anthropic: Claude for advanced AI assistance
- Runway ML: AI video generation and editing
- Perplexity: Real-time web search and analysis
- Instagram Business API: Direct integration for posting and analytics
- YouTube Data API: Channel management and analytics
- Twitter API v2: Tweet posting and engagement tracking
- LinkedIn API: Professional content publishing
π Project Structure
VeeFore/
βββ client/ # React frontend
β βββ src/
β β βββ components/ # Reusable UI components
β β β βββ ui/ # shadcn/ui components
β β β βββ layout/ # Layout components
β β βββ pages/ # Page components
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Utility functions
β β βββ assets/ # Static assets
β βββ index.html
β βββ vite.config.ts
βββ server/ # Express backend
β βββ routes/ # API route handlers
β βββ middleware/ # Custom middleware
β βββ models/ # Database models
β βββ services/ # Business logic
β βββ utils/ # Utility functions
βββ shared/ # Shared types and schemas
βββ uploads/ # File upload directory
βββ package.json
π― Core Features Implementation
1. AI Content Generation System
- AI Image Generator: DALL-E 3 integration with professional prompt engineering
- AI Thumbnail Maker Pro: 7-stage thumbnail creation with CTR optimization
- Content Writer: Multi-platform content generation with tone customization
- Hashtag Generator: AI-powered hashtag suggestions with trending analysis
- Caption Generator: Context-aware caption creation with engagement optimization
2. Social Media Management
- Post Creation: Hootsuite-inspired interface with multi-platform support
- Content Scheduling: Advanced calendar with timezone conversion (IST to UTC)
- Analytics Dashboard: Real-time performance metrics and engagement tracking
- Automation Rules: DM auto-replies, keyword responses, engagement automation
- Multi-Platform Publishing: Simultaneous posting across all connected platforms
3. Team Management System
- 9-Tier Role System: Owner, Admin, Content Manager, Social Manager, Editor, Analyst, Contributor, Viewer, Guest
- Granular Permissions: Feature-specific access control with inheritance
- Workspace Management: Multi-workspace support with team collaboration
- Invitation System: Email-based team invitations with role assignment
4. Subscription & Payment System
- 4-Tier Plans: Free (βΉ0), Starter (βΉ699), Pro (βΉ1,499), Business (βΉ2,199)
- Credit System: Usage-based billing with monthly allocations
- Payment Processing: Razorpay integration with international Stripe support
- Usage Tracking: Real-time credit consumption monitoring
π§ Database Schema
Core Collections
Users Collection
{
_id: ObjectId,
email: String,
username: String,
firebaseUid: String,
isOnboarded: Boolean,
plan: String, // 'free', 'starter', 'pro', 'business'
credits: Number,
planStatus: String,
trialExpiresAt: Date,
createdAt: Date,
updatedAt: Date
}
Workspaces Collection
{
_id: ObjectId,
userId: ObjectId,
name: String,
description: String,
credits: Number,
theme: String,
aiPersonality: String,
isDefault: Boolean,
maxTeamMembers: Number,
inviteCode: String,
createdAt: Date,
updatedAt: Date
}
Social Accounts Collection
{
_id: ObjectId,
workspaceId: String,
platform: String, // 'instagram', 'facebook', 'twitter', 'linkedin', 'youtube'
username: String,
accessToken: String,
refreshToken: String,
followersCount: Number,
followingCount: Number,
mediaCount: Number,
totalLikes: Number,
totalComments: Number,
avgEngagement: Number,
totalReach: Number,
lastSyncAt: Date,
createdAt: Date,
updatedAt: Date
}
Content Collection
{
_id: ObjectId,
workspaceId: String,
userId: String,
type: String, // 'post', 'story', 'reel', 'video'
caption: String,
hashtags: [String],
mediaUrls: [String],
platforms: [String],
scheduledAt: Date,
status: String, // 'draft', 'scheduled', 'published', 'failed'
publishedData: Object,
createdAt: Date,
updatedAt: Date
}
Automation Rules Collection
{
_id: ObjectId,
workspaceId: String,
userId: String,
name: String,
type: String, // 'dm_auto_reply', 'keyword_response', 'engagement_automation'
trigger: Object,
action: Object,
isActive: Boolean,
restrictions: Object,
createdAt: Date,
updatedAt: Date
}
π Environment Variables & API Configuration
Required Environment Variables
Database Configuration
MONGODB_URI=mongodb+srv://[username]:[password]@[cluster].mongodb.net/veeforedb
DATABASE_URL=mongodb+srv://[username]:[password]@[cluster].mongodb.net/veeforedb
Firebase Authentication
FIREBASE_API_KEY=your_firebase_api_key
FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
FIREBASE_PROJECT_ID=your_project_id
FIREBASE_STORAGE_BUCKET=your_project.appspot.com
FIREBASE_MESSAGING_SENDER_ID=your_sender_id
FIREBASE_APP_ID=your_app_id
FIREBASE_MEASUREMENT_ID=your_measurement_id
AI Service APIs
OPENAI_API_KEY=sk-your_openai_api_key
ANTHROPIC_API_KEY=sk-ant-your_anthropic_key
RUNWAY_API_KEY=your_runway_api_key
PERPLEXITY_API_KEY=pplx-your_perplexity_key
Social Media APIs
INSTAGRAM_CLIENT_ID=your_instagram_client_id
INSTAGRAM_CLIENT_SECRET=your_instagram_client_secret
INSTAGRAM_REDIRECT_URI=https://your-domain.com/api/instagram/callback
FACEBOOK_APP_ID=your_facebook_app_id
FACEBOOK_APP_SECRET=your_facebook_app_secret
TWITTER_CLIENT_ID=your_twitter_client_id
TWITTER_CLIENT_SECRET=your_twitter_client_secret
TWITTER_BEARER_TOKEN=your_twitter_bearer_token
LINKEDIN_CLIENT_ID=your_linkedin_client_id
LINKEDIN_CLIENT_SECRET=your_linkedin_client_secret
YOUTUBE_CLIENT_ID=your_youtube_client_id
YOUTUBE_CLIENT_SECRET=your_youtube_client_secret
Payment Processing
RAZORPAY_KEY_ID=rzp_live_your_key_id
RAZORPAY_KEY_SECRET=your_razorpay_secret
STRIPE_PUBLISHABLE_KEY=pk_live_your_stripe_key
STRIPE_SECRET_KEY=sk_live_your_stripe_secret
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret
Email Services
SENDGRID_API_KEY=SG.your_sendgrid_api_key
SENDGRID_FROM_EMAIL=noreply@veefore.com
SENDGRID_FROM_NAME=VeeFore
Security & Sessions
JWT_SECRET=your_super_secure_jwt_secret_key
SESSION_SECRET=your_session_secret_key
WEBHOOK_VERIFY_TOKEN=your_webhook_verification_token
Server Configuration
PORT=3000
NODE_ENV=production
CORS_ORIGIN=https://your-domain.com
π Deployment Instructions
1. Replit Deployment (Primary)
# Clone the repository
git clone https://github.com/your-username/veefore.git
# Install dependencies
npm install
# Configure environment variables in Replit Secrets
# Add all environment variables from the list above
# Start the application
npm run dev
2. Manual Server Deployment
# Install Node.js 18+
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
# Clone and setup
git clone https://github.com/your-username/veefore.git
cd veefore
npm install
# Create .env file with all required variables
cp .env.example .env
# Edit .env with your actual values
# Build and start
npm run build
npm start
3. Docker Deployment
# Build Docker image
docker build -t veefore .
# Run with environment file
docker run -p 3000:3000 --env-file .env veefore
π API Endpoints
Authentication
POST /api/auth/login- User loginPOST /api/auth/register- User registrationPOST /api/auth/verify-email- Email verificationPOST /api/auth/logout- User logout
User Management
GET /api/user- Get current userPUT /api/user- Update user profileGET /api/user/subscription- Get subscription detailsPOST /api/user/upgrade- Upgrade subscription
Workspace Management
GET /api/workspaces- Get user workspacesPOST /api/workspaces- Create new workspacePUT /api/workspaces/:id- Update workspaceDELETE /api/workspaces/:id- Delete workspace
Social Media Integration
GET /api/social-accounts- Get connected accountsPOST /api/social-accounts/connect- Connect new accountDELETE /api/social-accounts/:id- Disconnect accountGET /api/social-accounts/:id/sync- Sync account data
Content Management
GET /api/content- Get content libraryPOST /api/content- Create new contentPUT /api/content/:id- Update contentDELETE /api/content/:id- Delete contentPOST /api/content/:id/publish- Publish contentPOST /api/content/:id/schedule- Schedule content
AI Tools
POST /api/ai/generate-content- Generate AI contentPOST /api/ai/generate-image- Generate AI imagePOST /api/ai/generate-thumbnail- Generate AI thumbnailPOST /api/ai/analyze-trends- Analyze trending topicsPOST /api/ai/optimize-hashtags- Optimize hashtags
Analytics
GET /api/analytics/dashboard- Dashboard analyticsGET /api/analytics/content- Content performanceGET /api/analytics/engagement- Engagement metricsGET /api/analytics/reach- Reach and impressions
Automation
GET /api/automation/rules- Get automation rulesPOST /api/automation/rules- Create automation rulePUT /api/automation/rules/:id- Update automation ruleDELETE /api/automation/rules/:id- Delete automation rule
π οΈ Development Setup
Prerequisites
- Node.js 18+ installed
- MongoDB Atlas account
- Firebase project setup
- OpenAI API key
- Social media developer accounts (Instagram, Facebook, Twitter, LinkedIn, YouTube)
- Razorpay/Stripe payment gateway accounts
- SendGrid email service account
Local Development
# Install dependencies
npm install
# Start development server
npm run dev
# The app will be available at http://localhost:3000
Building for Production
# Build the application
npm run build
# Start production server
npm start
π Key Technical Decisions
Why This Tech Stack?
- React + TypeScript: Type safety and component reusability
- Vite: Fast development with optimized production builds
- MongoDB: Flexible schema for social media data
- Express.js: Lightweight and performant API server
- Firebase Auth: Secure, scalable user authentication
- TanStack Query: Efficient server state management
- Tailwind CSS: Utility-first styling for rapid development
- shadcn/ui: Consistent, accessible component library
Architecture Patterns
- Separation of Concerns: Clear frontend/backend boundaries
- Component-Based UI: Reusable, testable components
- Service Layer: Business logic separated from routes
- Middleware Pattern: Authentication, validation, error handling
- Event-Driven: Webhook handling for real-time updates
π Performance Optimizations
Frontend Optimizations
- Code splitting with React.lazy()
- Image optimization with lazy loading
- Memoization for expensive calculations
- Efficient re-renders with React.memo()
- Bundle optimization with Vite
Backend Optimizations
- Database connection pooling
- Query optimization with indexes
- API response caching
- Rate limiting for API endpoints
- Efficient file handling
Database Optimizations
- Compound indexes for common queries
- Aggregation pipelines for analytics
- Connection pooling
- Query result caching
- Optimized schema design
π Security Measures
Authentication & Authorization
- JWT tokens with proper expiration
- Role-based access control (RBAC)
- Firebase Authentication integration
- Session management with secure cookies
- API key rotation and management
Data Protection
- Input validation with Zod schemas
- SQL injection prevention
- XSS protection
- CSRF protection
- Rate limiting on sensitive endpoints
API Security
- CORS configuration
- Request size limits
- Authentication middleware
- Webhook signature verification
- Environment variable protection
π Troubleshooting Guide
Common Issues
- Database Connection: Check MongoDB URI and network access
- Authentication Errors: Verify Firebase configuration
- API Rate Limits: Monitor API usage and implement caching
- Payment Failures: Check Razorpay/Stripe webhook configuration
- Social Media API: Verify OAuth tokens and permissions
Debug Commands
# Check database connection
node -e "console.log('Testing DB connection...')"
# Verify environment variables
node -e "console.log(process.env.MONGODB_URI ? 'DB URI set' : 'DB URI missing')"
# Test API endpoints
curl -X GET http://localhost:3000/api/health
# Check logs
tail -f logs/app.log
π Additional Resources
Documentation Links
- MongoDB Documentation
- Firebase Auth Guide
- OpenAI API Reference
- Instagram Business API
- React Query Documentation
Deployment Guides
π Recent Changes & Updates
July 10, 2025 - Logo Asset Migration & Production Build Complete
- β Logo System Overhaul: Migrated from image-based to icon-based branding
- β Asset Dependency Elimination: Removed all veeforeLogo import references
- β Consistent Visual Identity: Implemented Rocket icon in blue containers across all components
- β Production Build Support: Created comprehensive build-production.js script
- β Component Updates: Fixed OnboardingPremium.tsx, HootsuiteLanding.tsx, SignUpIntegrated.tsx, SignUpWithOnboarding.tsx
- β Runtime Error Resolution: Eliminated "veeforeLogo is not defined" errors
- Impact: Application now has consistent branding without asset dependencies, ready for production deployment
π Support
For technical support or questions:
- Email: support@veefore.com
- Documentation: https://docs.veefore.com
- GitHub Issues: https://github.com/your-username/veefore/issues
π License
This project is proprietary software owned by VEEFED TECHNOLOGIES PRIVATE LIMITED. All rights reserved.
Last Updated: July 10, 2025 Version: 1.0.0 Author: VeeFore Development Team
Related Documents
ArbitragePro Configuration Guide: Complete Setup and Deployment
1. [Project Overview & Architecture](#project-overview--architecture)
Mkan MVP Production Checklist
- [ ] Configure production-ready NextAuth settings
Analytics Pipeline
This document describes the analytics infrastructure for ShipSec Studio, including OpenSearch for data storage, OpenSearch Dashboards for visualization, and the routing architecture.