A full-stack web application for affiliate marketing management with AI-powered optimization and Android security dashboard capabilities.
- Node.js 20.x or higher
- PostgreSQL database (get free at neon.tech)
- npm package manager
- Clone the repository
git clone https://github.com/al7566/Affiliateandsecurityapp.git
cd Affiliateandsecurityapp- Install dependencies
npm install-
Get a PostgreSQL Database (REQUIRED)
- Sign up at neon.tech (free)
- Create a new project
- Copy the connection string
-
Configure environment variables
cp .env.example .envEdit .env with your configuration:
Required Variables (deployment will fail without these):
DATABASE_URL=postgresql://user:password@host:5432/database # From Neon
ENCRYPTION_SECRET=$(openssl rand -hex 32) # Generate with this command
NODE_ENV=productionOptional Variables (for full features):
AYRSHARE_API_KEY=your-api-key # Social media posting
AYRSHARE_PROFILE_KEY=your-profile-key # Social media profiles
CLICKBANK_SECRET_KEY=your-secret # ClickBank affiliate
PORT=5000 # Server port- Validate your setup
npm run validate:env- Initialize database
npm run db:push- Build the application
npm run build- Start the server
npm startThe application will be available at http://localhost:5000
If deployment fails, run:
npm run validate:deploymentThis will check:
- ✓ All required environment variables are set
- ✓ Dependencies are installed
- ✓ Build succeeds
- ✓ Database connection works
- ✓ No security vulnerabilities
See TROUBLESHOOTING.md for detailed solutions.
Run in development mode with hot reload:
npm run devThis starts both the client dev server (Vite) and the backend server.
npm run dev- Start development server with hot reloadnpm run build- Build for productionnpm start- Start production servernpm run check- Run TypeScript type checkingnpm run db:push- Initialize/update database schemanpm run validate:deployment- Check if ready to deploynpm run validate:env- Check environment variables
Before deploying, run:
npm run validate:deploymentThis ensures:
- ✓ Required environment variables are set
- ✓ Dependencies installed (569 packages)
- ✓ No security vulnerabilities (0 in production)
- ✓ Build succeeds
- ✓ Database connection works
Heroku (easiest):
heroku create
heroku addons:create heroku-postgresql:mini
heroku config:set ENCRYPTION_SECRET=$(openssl rand -hex 32)
heroku config:set NODE_ENV=production
git push heroku mainRailway (recommended):
- Connect GitHub repo
- Add PostgreSQL database
- Set environment variables
- Auto-deploy enabled
Docker:
# Configure .env file first
docker-compose up -dSee DEPLOYMENT.md for detailed platform guides and TROUBLESHOOTING.md for common issues.
- 📊 Affiliate marketing dashboard with multi-network support
- 🔐 Android security monitoring and privacy management
- 💰 Real-time earnings tracking across ClickBank, ShareASale, CJ Affiliate
- 🤖 AI-powered optimization and automation
- 📱 Mobile-responsive cyberpunk UI
- 🔒 Encrypted vault storage
- 📈 Analytics and reporting
- 🔄 Automatic data synchronization
- Frontend: React 19, TypeScript, Vite, Tailwind CSS, shadcn/ui
- Backend: Node.js, Express, TypeScript
- Database: PostgreSQL with Drizzle ORM
- Authentication: Passport.js with session management
- Real-time: WebSocket support
For issues or questions, please open an issue on GitHub.
MIT