{"id":31034291,"url":"https://github.com/divith123/relatim","last_synced_at":"2025-09-14T02:04:28.788Z","repository":{"id":314613852,"uuid":"1056168285","full_name":"Divith123/Relatim","owner":"Divith123","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-13T15:12:51.000Z","size":5423,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-13T16:36:12.510Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://relatim.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Divith123.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-13T14:31:33.000Z","updated_at":"2025-09-13T15:12:55.000Z","dependencies_parsed_at":"2025-09-13T16:48:00.984Z","dependency_job_id":null,"html_url":"https://github.com/Divith123/Relatim","commit_stats":null,"previous_names":["divith123/relatim"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Divith123/Relatim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Divith123%2FRelatim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Divith123%2FRelatim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Divith123%2FRelatim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Divith123%2FRelatim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Divith123","download_url":"https://codeload.github.com/Divith123/Relatim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Divith123%2FRelatim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275051636,"owners_count":25396977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-14T02:04:25.675Z","updated_at":"2025-09-14T02:04:28.770Z","avatar_url":"https://github.com/Divith123.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WhatsApp AI Chat - Full Stack Application\n\nA modern WhatsApp-style messaging application with AI integration, built with React and Node.js.\n\n## 🚀 Quick Start\n\n### Local Development\n\n1. **Clone and install dependencies:**\n   ```bash\n   cd whatsapp-ai-chat\n   npm run install:all\n   ```\n\n2. **Set up environment variables:**\n   ```bash\n   # Copy example files\n   cp .env.example .env.local\n   cp frontend/.env.example frontend/.env.local\n   \n   # Edit the files with your actual values\n   ```\n\n3. **Start development servers:**\n   ```bash\n   npm run dev\n   ```\n\n   This starts both frontend (http://localhost:3000) and backend (http://localhost:5000)\n\n### Production Deployment on Vercel\n\n#### Prerequisites\n- Vercel account\n- PostgreSQL database (Supabase, Railway, or other)\n- Google AI API key\n\n#### Deploy to Vercel\n\n1. **Push to GitHub:**\n   ```bash\n   git init\n   git add .\n   git commit -m \"Initial commit\"\n   git branch -M main\n   git remote add origin https://github.com/yourusername/whatsapp-ai-chat.git\n   git push -u origin main\n   ```\n\n2. **Deploy on Vercel:**\n   - Connect your GitHub repository to Vercel\n   - Import your project\n   - Vercel will automatically detect the configuration\n\n3. **Set Environment Variables in Vercel:**\n   \n   Go to your Vercel project settings → Environment Variables and add:\n\n   **Required Variables:**\n   ```bash\n   DATABASE_URL=postgresql://username:password@host:port/database\n   JWT_SECRET=your-super-secret-jwt-key-here\n   GOOGLE_AI_API_KEY=your-google-ai-api-key\n   FRONTEND_URL=https://your-app-name.vercel.app\n   NODE_ENV=production\n   ```\n\n   **Optional Variables:**\n   ```bash\n   EMAIL_HOST=smtp.gmail.com\n   EMAIL_PORT=587\n   EMAIL_USER=your-email@gmail.com\n   EMAIL_PASS=your-app-password\n   MAX_FILE_SIZE=10485760\n   BCRYPT_ROUNDS=12\n   ```\n\n4. **Deploy:**\n   Vercel will automatically build and deploy your application.\n\n## 📁 Project Structure\n\n```\nwhatsapp-ai-chat/\n├── frontend/          # React application\n│   ├── src/\n│   ├── public/\n│   └── package.json\n├── backend/           # Node.js API\n│   ├── src/\n│   ├── database/\n│   ├── index.js       # Vercel entry point\n│   └── package.json\n├── vercel.json        # Vercel configuration\n├── package.json       # Root package.json\n└── README.md\n```\n\n## 🔧 Configuration Files\n\n### vercel.json\nConfigures how Vercel builds and serves your application:\n- Frontend: Static build with React\n- Backend: Serverless functions with Node.js\n- Routes: API calls to `/api/*` go to backend, everything else to frontend\n\n### Root package.json\nManages the monorepo with scripts for:\n- `npm run dev` - Start both frontend and backend in development\n- `npm run build` - Build both applications for production\n- `npm run install:all` - Install dependencies for both applications\n\n## 🌐 API Routes\n\nAll API routes are prefixed with `/api/`:\n\n- `/api/auth` - Authentication (login, register, verify)\n- `/api/users` - User management\n- `/api/contacts` - Contact management\n- `/api/messages` - Messaging functionality\n- `/api/ai` - AI chat integration\n- `/api/health` - Health check endpoint\n\n## 📊 Features\n\n### Frontend Features\n- ✅ Real-time messaging interface\n- ✅ AI chat integration\n- ✅ File upload support\n- ✅ Contact management\n- ✅ User authentication\n- ✅ Responsive design\n- ✅ Dark/light mode\n- ✅ Message search\n- ✅ Typing indicators\n\n### Backend Features\n- ✅ RESTful API\n- ✅ JWT authentication\n- ✅ PostgreSQL database\n- ✅ File upload handling\n- ✅ Google AI integration\n- ✅ Rate limiting\n- ✅ Security middleware\n- ✅ Error handling\n\n## 🔒 Security\n\n- JWT token authentication\n- Password hashing with bcrypt\n- Rate limiting on API routes\n- CORS configuration\n- Helmet security headers\n- Input validation\n- SQL injection protection\n\n## 📝 Environment Variables\n\n### Backend (.env)\n```bash\n# Database\nDATABASE_URL=postgresql://username:password@host:port/database\n\n# JWT\nJWT_SECRET=your-secret-key\nJWT_EXPIRES_IN=7d\n\n# Google AI\nGOOGLE_AI_API_KEY=your-api-key\n\n# Server\nPORT=5000\nNODE_ENV=production\nFRONTEND_URL=https://your-app.vercel.app\n\n# Email (Optional)\nEMAIL_HOST=smtp.gmail.com\nEMAIL_PORT=587\nEMAIL_USER=your-email\nEMAIL_PASS=your-password\n```\n\n### Frontend (.env)\n```bash\n# API Configuration (optional - defaults to relative /api)\nREACT_APP_API_URL=\n\n# App Configuration\nREACT_APP_NAME=WhatsApp AI Chat\nREACT_APP_VERSION=1.0.0\n\n# Feature Flags\nREACT_APP_ENABLE_AI_CHAT=true\nREACT_APP_ENABLE_FILE_UPLOAD=true\n```\n\n## 🐛 Troubleshooting\n\n### Common Issues\n\n1. **Database Connection Error**\n   - Verify your DATABASE_URL is correct\n   - Ensure your database is accessible from Vercel\n   - Check if you need to whitelist Vercel IPs\n\n2. **Environment Variables Not Working**\n   - Ensure variables are set in Vercel dashboard\n   - Redeploy after adding environment variables\n   - Check variable names match exactly\n\n3. **API Routes Not Working**\n   - Verify `/api/*` routes are configured correctly\n   - Check that backend builds successfully\n   - Look at Vercel function logs\n\n4. **Build Failures**\n   - Check build logs in Vercel dashboard\n   - Ensure all dependencies are in package.json\n   - Verify Node.js version compatibility\n\n### Logs and Debugging\n\n- **Vercel Logs**: View in Vercel dashboard → Functions tab\n- **Frontend Console**: Browser developer tools\n- **Database Logs**: Check your database provider's dashboard\n\n## 📞 Support\n\nIf you encounter issues:\n1. Check the troubleshooting section above\n2. Review Vercel deployment logs\n3. Verify all environment variables are set correctly\n4. Ensure your database is accessible\n\n## 🔄 Updates and Maintenance\n\nTo update your deployment:\n1. Make changes to your code\n2. Commit and push to GitHub\n3. Vercel will automatically redeploy\n\nTo update dependencies:\n```bash\nnpm run install:all\nnpm update\n```\n\n## 📄 License\n\nThis project is licensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivith123%2Frelatim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivith123%2Frelatim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivith123%2Frelatim/lists"}