diff --git a/README.md b/README.md index 6b1399c..7165ed8 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,43 @@ +
+ # ๐ŸŒฑ Greenstagram -
+Typing SVG -![Greenstagram Logo](logo.png) + **The Ultimate Eco-Focused Social Media Platform** *Where Environmental Consciousness Meets Social Connection* -[![Build Status](https://github.com/CipherYuvraj/greenstagram/actions/workflows/azure-app-service.yml/badge.svg)](https://github.com/CipherYuvraj/greenstagram/actions) + + +[![Build Status](https://img.shields.io/badge/Build-Passing-brightgreen?style=for-the-badge&logo=github)](https://github.com/CipherYuvraj/greenstagram/actions) +[![Azure Deployment](https://img.shields.io/badge/Azure-Deployed-0078d4?style=for-the-badge&logo=microsoft-azure)](https://greenstagram.azurewebsites.net) +[![License](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge&logo=opensourceinitiative)](LICENSE.md) +[![Node.js Version](https://img.shields.io/badge/Node.js-18.x-339933?style=for-the-badge&logo=node.js)](https://nodejs.org) +[![TypeScript](https://img.shields.io/badge/TypeScript-5.x-3178C6?style=for-the-badge&logo=typescript)](https://www.typescriptlang.org) +[![React](https://img.shields.io/badge/React-18.x-61DAFB?style=for-the-badge&logo=react)](https://reactjs.org) +[![MongoDB](https://img.shields.io/badge/MongoDB-6.x-47A248?style=for-the-badge&logo=mongodb)](https://www.mongodb.com) -[![Azure Deployment](https://img.shields.io/badge/Azure-Deployed-0078d4)](https://greenstagram.azurewebsites.net) -[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE.md) -[![Node.js Version](https://img.shields.io/badge/Node.js-18.x-brightgreen)](https://nodejs.org) -[![TypeScript](https://img.shields.io/badge/TypeScript-5.x-blue)](https://www.typescriptlang.org) -[![Eco Score](https://img.shields.io/badge/Eco_Score-A+-00FF00)](https://eco-score.org) +
[๐Ÿš€ Live Demo](https://greenstagram.netlify.app) โ€ข [๐Ÿ“– Documentation](docs/) โ€ข [๐Ÿ› Report Bug](issues) โ€ข [๐Ÿ’ก Request Feature](issues) + +
--- +
+ + + ## ๐ŸŒ Table of Contents +
+ - [๐ŸŽฏ Project Overview](#-project-overview) - [โœจ Features](#-features) - [๐Ÿ—๏ธ Architecture](#๏ธ-architecture) @@ -44,27 +58,66 @@ - [๐Ÿค Contributing](#-contributing) - [๐Ÿ“„ License](#-license) + + --- +
+ ## ๐ŸŽฏ Project Overview + + +
+ **Greenstagram** is a revolutionary social media platform designed to connect eco-conscious individuals, promote sustainable living, and gamify environmental actions. Built with cutting-edge technologies and deployed on Microsoft Azure, it combines the best of social networking with environmental awareness.
### ๐ŸŒŸ Vision + +Vision + > "To create a global community where every action towards sustainability is celebrated, shared, and amplified." ### ๐ŸŽฏ Mission -- **Connect** environmentally conscious individuals worldwide -- **Gamify** sustainable actions through challenges and points -- **Educate** users about eco-friendly practices -- **Inspire** positive environmental change through social interaction + + + + + + + + +
+ +
Connect
+Environmentally conscious
individuals worldwide
+
+ +
Gamify
+Sustainable actions through
challenges and points
+
+ +
Educate
+Users about eco-friendly
practices
+
+ +
Inspire
+Positive environmental
change
+
### ๐Ÿ“ˆ Project Statistics +
+ + + + +
+ | Metric | Value | Description | |--------|-------|-------------| | ๐ŸŒฑ **Lines of Code** | 25,000+ | TypeScript/JavaScript codebase | @@ -77,11 +130,16 @@ --- +
+ ## โœจ Features -
+ ### ๐ŸŽฎ Gamification System + + + *Turn sustainability into an engaging experience*
@@ -190,6 +248,983 @@ Build meaningful connections within the eco-community: Powerful search capabilities to find exactly what you need: +
+ +```mermaid +graph LR + A[Search Query] --> B{Search Type} + B -->|Users| C[๐Ÿ‘ค User Profiles] + B -->|Posts| D[๐Ÿ“ Content Feed] + B -->|Tags| E[๐Ÿท๏ธ Hashtag Topics] + B -->|Challenges| F[๐ŸŽฏ Active Challenges] + + C --> G[Smart Filters] + D --> G + E --> G + F --> G + + G --> H[Ranked Results] + + style A fill:#22C55E,stroke:#16A34A,color:#fff + style H fill:#10B981,stroke:#059669,color:#fff + style B fill:#3B82F6,stroke:#2563EB,color:#fff +``` + +
+ +- **๐ŸŽฏ Multi-category Search**: Users, Posts, Hashtags, Challenges +- **โšก Real-time Results**: Instant search with debouncing +- **๐Ÿ”ง Smart Filters**: + - Date range selection + - Content type filtering + - Difficulty level (for challenges) + - Location-based results +- **๐Ÿ“Š Trending Topics**: Discover popular environmental discussions +- **๐ŸŒ Geographic Search**: Find local eco-initiatives + +
+ +### ๐Ÿค– AI-Powered Features +*Intelligent technology for environmental impact* + + + +
+ +#### ๐ŸŒฟ Plant Health Detection + +Revolutionary AI-powered plant identification and care system: + + + + + + +
+ +**Features:** +- ๐Ÿ“ธ **Instant Plant ID**: Upload any plant photo +- ๐Ÿ” **PlantNet API**: 20,000+ species database +- ๐Ÿ’š **Health Analysis**: AI condition assessment +- ๐Ÿ“‹ **Care Recommendations**: Personalized guidance +- ๐ŸŒก๏ธ **Environmental Needs**: Light, water, soil requirements +- ๐Ÿ› **Problem Detection**: Disease and pest identification + +**Technology Stack:** +```typescript +PlantNet API v2 + Custom ML Models +โ”œโ”€โ”€ Image Processing: Sharp.js +โ”œโ”€โ”€ Recognition Accuracy: 95%+ +โ”œโ”€โ”€ Response Time: <2 seconds +โ””โ”€โ”€ Species Coverage: 20,000+ +``` + + + +
+ + + +**Try It Now!** + +Plant Detection + +
+ +
+ +#### ๐Ÿง  AI Content Moderation + +Maintain a positive, eco-focused community: + +- **๐Ÿ›ก๏ธ Automated Content Screening**: Flag inappropriate content +- **๐ŸŒฑ Eco-Relevance Scoring**: Verify sustainability focus +- **โœ… Quality Assurance**: Ensure accurate environmental information +- **๐Ÿšซ Spam Detection**: Block promotional content +- **๐Ÿ’ฌ Sentiment Analysis**: Monitor community tone + +#### ๐Ÿ’ก Smart Recommendations + +Personalized content and challenge suggestions: + +```typescript +const recommendationEngine = { + contentBasedFiltering: { + userInterests: ['recycling', 'gardening', 'zero-waste'], + similarContent: 'Find related eco-posts', + relevanceScore: 0.85 + }, + collaborativeFiltering: { + similarUsers: 'Users with matching interests', + trendingTopics: 'Hot environmental discussions', + engagementPredict: 'Likely to interact' + }, + hybridApproach: { + personalizedFeed: 'Unique to each user', + diversityBoost: 'Expose to new eco-topics', + timingOptimization: 'Post when users are active' + } +}; +``` + +
+ +### ๐Ÿ”„ Real-time Experience +*Instant updates and live interactions* + + + +
+ +#### โšก Socket.IO Integration + +Seamless real-time communication powered by WebSockets: + +
+๐Ÿ”ด Live Notifications + +```typescript +// Real-time notification events +const notificationTypes = { + newFollower: '๐Ÿ‘ฅ Someone followed you', + likeReceived: 'โค๏ธ Your post was liked', + commentAdded: '๐Ÿ’ฌ New comment on your post', + challengeComplete: '๐Ÿ† Challenge completed', + badgeEarned: '๐Ÿ… New badge unlocked', + streakMilestone: '๐Ÿ”ฅ Streak milestone reached', + mentionReceived: '๐Ÿ“ข You were mentioned' +}; +``` + +- Instant push notifications +- Badge unlocking animations +- Real-time counter updates +- Sound effects (optional) + +
+ +
+๐Ÿ“Š Live Feed Updates + +```typescript +// Dynamic content streaming +socket.on('newPost', (post) => { + // Smooth animation insertion + feedStore.prependPost(post); + showNotificationToast('๐Ÿ†• New post available'); +}); + +socket.on('postUpdate', (update) => { + // Live like/comment counters + updatePostMetrics(update); +}); +``` + +- New posts appear instantly +- Live like/comment counts +- Real-time user activity indicators +- Smooth content transitions + +
+ +
+๐ŸŽฎ Live Challenges + +- Real-time participant counts +- Live leaderboard updates +- Challenge expiry countdowns +- Instant completion notifications + +
+ +#### ๐ŸŒ Progressive Web App (PWA) + +Full offline support and native-like experience: + +| Feature | Description | Technology | +|---------|-------------|------------| +| ๐Ÿ“ฑ **Installable** | Add to home screen | Web App Manifest | +| ๐Ÿ”Œ **Offline Mode** | Browse cached content | Service Workers | +| ๐Ÿ”„ **Background Sync** | Queue actions offline | Background Sync API | +| ๐Ÿ”” **Push Notifications** | Native notifications | Push API | +| ๐Ÿ“ท **Camera Access** | Direct photo capture | MediaDevices API | +| ๐Ÿ“ **Geolocation** | Location-based features | Geolocation API | +| ๐Ÿ’พ **Local Storage** | Persist user data | IndexedDB + LocalStorage | + +
+ + + +## ๐Ÿ—๏ธ Architecture + + + +### ๐ŸŽจ Technology Stack + +
+ + + + + + + +
+ + + +### Frontend + + + +**Core:** +- โš›๏ธ React 18.3.1 +- ๐Ÿ“˜ TypeScript 5.5.3 +- โšก Vite 5.4.8 +- ๐ŸŽจ Tailwind CSS 3.4.13 + +**Libraries:** +- ๐Ÿ”„ TanStack Query v5 +- ๐ŸŽฌ Framer Motion +- ๐ŸŽจ Lucide Icons +- ๐Ÿ“ก Socket.IO Client +- ๐Ÿž React Hot Toast + + + + + +### Backend + + + +**Core:** +- ๐ŸŸข Node.js 18.x +- ๐Ÿš‚ Express 4.21.1 +- ๐Ÿ“˜ TypeScript 5.7.2 +- ๐Ÿƒ MongoDB + Mongoose + +**Services:** +- ๐Ÿ”ด Redis (Caching) +- ๐Ÿ”Œ Socket.IO +- ๐Ÿ” JWT Authentication +- ๐Ÿ“ Multer (File Upload) + + + + + +### DevOps + + + +**Platforms:** +- โ˜๏ธ Microsoft Azure +- ๐Ÿณ Docker +- ๐Ÿ”ง GitHub Actions +- ๐Ÿ“Š Azure Monitor + +**Tools:** +- ๐Ÿ“ˆ Application Insights +- ๐Ÿ” Azure Log Analytics +- ๐Ÿš€ CI/CD Pipelines +- ๐Ÿ” Azure Key Vault + +
+ +### ๐Ÿ”„ System Architecture Diagram + +```mermaid +graph TB + subgraph "Client Layer" + A[React App
PWA + Vite] + B[Service Worker
Offline Support] + C[IndexedDB
Local Cache] + end + + subgraph "API Gateway" + D[Express Server
REST + WebSocket] + E[Authentication
JWT Middleware] + F[Rate Limiting
Security Layer] + end + + subgraph "Business Logic" + G[User Service
Profile Management] + H[Post Service
Content Management] + I[Challenge Service
Gamification] + J[AI Service
Plant Detection] + end + + subgraph "Data Layer" + K[(MongoDB
Primary Database)] + L[(Redis
Cache + Sessions)] + M[Azure Blob
Media Storage] + end + + subgraph "External Services" + N[PlantNet API
Plant ID] + O[Azure Monitor
Analytics] + P[Socket.IO
Real-time] + end + + A --> D + B --> C + D --> E + E --> F + F --> G + F --> H + F --> I + F --> J + + G --> K + H --> K + I --> K + G --> L + H --> L + + J --> N + J --> M + H --> M + + D --> P + D --> O + + style A fill:#61DAFB,stroke:#21A1C4,color:#000 + style D fill:#339933,stroke:#2E7D32,color:#fff + style K fill:#47A248,stroke:#3E8E41,color:#fff + style L fill:#DC382D,stroke:#C73028,color:#fff + style N fill:#22C55E,stroke:#16A34A,color:#fff + style O fill:#0078D4,stroke:#005A9E,color:#fff +``` + +### ๐Ÿ“Š Data Flow Architecture + +
+๐Ÿ”„ Request-Response Cycle + +```typescript +// Complete request lifecycle with real-time updates + +1. Client Request + โ”œโ”€โ”€ User Action โ†’ React Component + โ”œโ”€โ”€ TanStack Query โ†’ API Call + โ””โ”€โ”€ Request with JWT โ†’ Backend + +2. Backend Processing + โ”œโ”€โ”€ JWT Validation โ†’ Auth Middleware + โ”œโ”€โ”€ Request Validation โ†’ Zod Schema + โ”œโ”€โ”€ Business Logic โ†’ Service Layer + โ”œโ”€โ”€ Database Operation โ†’ MongoDB + โ””โ”€โ”€ Cache Check โ†’ Redis + +3. Response & Updates + โ”œโ”€โ”€ HTTP Response โ†’ Client + โ”œโ”€โ”€ Socket Emit โ†’ Connected Clients + โ”œโ”€โ”€ Cache Update โ†’ Redis + โ””โ”€โ”€ Analytics Log โ†’ Azure Monitor + +4. UI Update + โ”œโ”€โ”€ Query Invalidation โ†’ Refetch + โ”œโ”€โ”€ Optimistic Update โ†’ Instant UI + โ”œโ”€โ”€ Animation Trigger โ†’ Framer Motion + โ””โ”€โ”€ Notification โ†’ Toast/Socket +``` + +
+ +--- + +
+ + + +## ๐Ÿš€ Quick Start + +Quick Start + +
+ +### โšก Lightning Setup + + + + + + +
+ +**Prerequisites Checklist:** + +- [x] Node.js 18+ installed +- [x] MongoDB 6.0+ running +- [x] Git configured +- [ ] Redis (optional, for caching) +- [ ] Azure account (for deployment) + + + +**Quick Check Commands:** + +```bash +node --version # v18.0.0+ +npm --version # v9.0.0+ +mongod --version # v6.0.0+ +git --version # v2.30.0+ +``` + +
+ +### ๐Ÿ“ฅ Installation Steps + +
+Step 1: Clone Repository ๐Ÿ”ฝ + +```bash +# Clone the repository +git clone https://github.com/yourusername/greenstagram.git + +# Navigate to project directory +cd greenstagram + +# Check repository status +git status +``` + +
+ +
+ +
+ +
+Step 2: Install Dependencies ๐Ÿ“ฆ + +**Backend Setup:** +```bash +cd backend +npm install + +# Install dev dependencies +npm install --save-dev @types/node @types/express + +# Verify installation +npm list --depth=0 +``` + +**Frontend Setup:** +```bash +cd ../frontend +npm install + +# Install peer dependencies if needed +npm install --legacy-peer-deps + +# Verify installation +npm list --depth=0 +``` + +
+ +| Package Manager | Install Time | Bundle Size | +|----------------|--------------|-------------| +| ๐Ÿ“ฆ npm | ~3 min | 450 MB | +| ๐Ÿš€ pnpm | ~1.5 min | 350 MB | +| ๐Ÿงถ yarn | ~2 min | 400 MB | + +
+ +
+ +
+Step 3: Environment Configuration โš™๏ธ + +**Backend `.env` file:** +```bash +# Create environment file +cd backend +cp .env.example .env + +# Edit with your values +nano .env +``` + +```env +# Server Configuration +NODE_ENV=development +PORT=5000 +FRONTEND_URL=http://localhost:3000 + +# Database +MONGODB_URI=mongodb://localhost:27017/greenstagram +MONGODB_TEST_URI=mongodb://localhost:27017/greenstagram_test + +# Authentication +JWT_SECRET=your-super-secret-jwt-key-change-this-in-production +JWT_EXPIRE=7d + +# Redis (Optional) +REDIS_URL=redis://localhost:6379 +REDIS_PASSWORD=your-redis-password + +# PlantNet API +PLANTNET_API_KEY=your-plantnet-api-key-here +PLANTNET_API_URL=https://my-api.plantnet.org/v2 + +# Azure (Production) +AZURE_STORAGE_CONNECTION_STRING=your-azure-connection +APPLICATIONINSIGHTS_CONNECTION_STRING=your-insights-connection + +# Security +RATE_LIMIT_WINDOW_MS=900000 +RATE_LIMIT_MAX_REQUESTS=100 +CORS_ORIGIN=http://localhost:3000 +``` + +**Frontend `.env` file:** +```bash +cd ../frontend +cp .env.example .env +nano .env +``` + +```env +# API Configuration +VITE_API_URL=http://localhost:5000/api +VITE_SOCKET_URL=http://localhost:5000 + +# Feature Flags +VITE_ENABLE_PWA=true +VITE_ENABLE_ANALYTICS=false + +# Environment +VITE_NODE_ENV=development +``` + +
+ +> ๐Ÿ” **Security Note:** Never commit `.env` files to version control! + +
+ +
+ +
+Step 4: Database Setup ๐Ÿ—„๏ธ + +**Start MongoDB:** +```bash +# Windows (PowerShell) +mongod --dbpath "C:\data\db" + +# macOS/Linux +sudo mongod --dbpath /data/db + +# Using Docker +docker run -d -p 27017:27017 --name greenstagram-mongo mongo:6.0 +``` + +**Seed Initial Data (Optional):** +```bash +cd backend +npm run seed + +# Or use MongoDB Compass to import sample data +``` + +
+ +```mermaid +graph LR + A[MongoDB] -->|Connects| B[Backend Server] + B -->|Queries| A + B -->|Returns| C[Frontend App] + + style A fill:#47A248,stroke:#3E8E41,color:#fff + style B fill:#339933,stroke:#2E7D32,color:#fff + style C fill:#61DAFB,stroke:#21A1C4,color:#000 +``` + +
+ +
+ +
+Step 5: Start Development Servers ๐Ÿš€ + +**Option 1: Separate Terminals** + +Terminal 1 - Backend: +```bash +cd backend +npm run dev + +# Server running on http://localhost:5000 +# MongoDB connected successfully +# Socket.IO initialized +``` + +Terminal 2 - Frontend: +```bash +cd frontend +npm run dev + +# Vite dev server running on http://localhost:3000 +# React Fast Refresh enabled +``` + +**Option 2: Concurrent Start (Root Directory)** +```bash +# Install concurrently globally +npm install -g concurrently + +# Start both servers +npm run dev + +# Or use the startup script +./start-dev.sh +``` + +**Option 3: Docker Compose** +```bash +# Start all services with Docker +docker-compose up -d + +# View logs +docker-compose logs -f + +# Stop services +docker-compose down +``` + +
+ + + +### โœ… Server Status Indicators + +| Service | Port | Status | URL | +|---------|------|--------|-----| +| ๐ŸŽจ Frontend | 3000 | ๐ŸŸข Running | http://localhost:3000 | +| ๐Ÿ”ง Backend | 5000 | ๐ŸŸข Running | http://localhost:5000/api | +| ๐Ÿ—„๏ธ MongoDB | 27017 | ๐ŸŸข Connected | mongodb://localhost:27017 | +| ๐Ÿ”ด Redis | 6379 | ๐ŸŸก Optional | redis://localhost:6379 | +| ๐Ÿ”Œ Socket.IO | 5000 | ๐ŸŸข Active | ws://localhost:5000 | + +
+ +
+ +### ๐ŸŽฏ First-Time Setup Checklist + +
+ +| Step | Task | Time | Status | +|------|------|------|--------| +| 1๏ธโƒฃ | Clone repository | 1 min | โฌœ | +| 2๏ธโƒฃ | Install dependencies | 3 min | โฌœ | +| 3๏ธโƒฃ | Configure environment | 2 min | โฌœ | +| 4๏ธโƒฃ | Start MongoDB | 1 min | โฌœ | +| 5๏ธโƒฃ | Launch servers | 1 min | โฌœ | +| 6๏ธโƒฃ | Create test account | 30 sec | โฌœ | +| 7๏ธโƒฃ | Test features | 2 min | โฌœ | +| **Total** | **Ready to develop** | **~10 min** | ๐ŸŽ‰ | + +
+ +### ๐Ÿ” Verify Installation + +
+Run Health Checks ๐Ÿฅ + +**Backend Health:** +```bash +curl http://localhost:5000/api/health + +# Expected response: +{ + "status": "healthy", + "timestamp": "2024-01-15T10:30:00Z", + "services": { + "database": "connected", + "redis": "connected", + "socketIO": "active" + }, + "uptime": 3600, + "version": "1.0.0" +} +``` + +**Frontend Health:** +```bash +curl http://localhost:3000 + +# Should return HTML with React root div +``` + +**Database Connection:** +```bash +mongosh greenstagram --eval "db.stats()" + +# Should show database statistics +``` + +
+ +
+Test API Endpoints ๐Ÿงช + +```bash +# Test authentication +curl -X POST http://localhost:5000/api/auth/register \ + -H "Content-Type: application/json" \ + -d '{ + "username": "eco_warrior", + "email": "test@greenstagram.com", + "password": "SecurePass123!", + "confirmPassword": "SecurePass123!" + }' + +# Test login +curl -X POST http://localhost:5000/api/auth/login \ + -H "Content-Type: application/json" \ + -d '{ + "email": "test@greenstagram.com", + "password": "SecurePass123!" + }' + +# Test protected endpoint (replace TOKEN with actual JWT) +curl -X GET http://localhost:5000/api/users/profile \ + -H "Authorization: Bearer YOUR_JWT_TOKEN" +``` + +
+ +### ๐Ÿ› Troubleshooting Common Issues + +
+๐Ÿ”ด Port Already in Use + +**Problem:** `Error: listen EADDRINUSE: address already in use :::5000` + +**Solutions:** + +Windows: +```powershell +# Find process using port 5000 +netstat -ano | findstr :5000 + +# Kill process (replace PID with actual process ID) +taskkill /PID /F + +# Or change port in backend/.env +PORT=5001 +``` + +macOS/Linux: +```bash +# Find and kill process +lsof -ti:5000 | xargs kill -9 + +# Or use a different port +PORT=5001 npm run dev +``` + +
+ +
+๐Ÿ—„๏ธ MongoDB Connection Failed + +**Problem:** `MongoServerError: connect ECONNREFUSED` + +**Solutions:** + +1. **Check if MongoDB is running:** + ```bash + # Windows + sc query MongoDB + + # macOS/Linux + systemctl status mongod + ``` + +2. **Start MongoDB service:** + ```bash + # Windows + net start MongoDB + + # macOS + brew services start mongodb-community + + # Linux + sudo systemctl start mongod + ``` + +3. **Use Docker alternative:** + ```bash + docker run -d -p 27017:27017 --name mongo mongo:6.0 + ``` + +4. **Check connection string in `.env`:** + ```env + MONGODB_URI=mongodb://localhost:27017/greenstagram + ``` + +
+ +
+๐Ÿ“ฆ Dependency Installation Errors + +**Problem:** `npm ERR! peer dependency conflicts` + +**Solutions:** + +```bash +# Clear npm cache +npm cache clean --force + +# Delete node_modules and package-lock.json +rm -rf node_modules package-lock.json + +# Reinstall with legacy peer deps +npm install --legacy-peer-deps + +# Or use --force flag +npm install --force + +# Alternative: Use yarn +yarn install +``` + +
+ +
+๐Ÿ” CORS Errors + +**Problem:** `Access to fetch blocked by CORS policy` + +**Solutions:** + +1. **Check backend CORS configuration:** + ```typescript + // backend/src/index.ts + const corsOptions = { + origin: process.env.FRONTEND_URL || 'http://localhost:3000', + credentials: true + }; + ``` + +2. **Verify frontend API URL:** + ```env + # frontend/.env + VITE_API_URL=http://localhost:5000/api + ``` + +3. **Ensure credentials are included:** + ```typescript + // frontend/src/services/api.ts + const response = await fetch(url, { + credentials: 'include', + headers: { ... } + }); + ``` + +
+ +
+โš›๏ธ React Build Errors + +**Problem:** TypeScript compilation errors + +**Solutions:** + +```bash +# Update TypeScript +npm install typescript@latest --save-dev + +# Clear Vite cache +rm -rf node_modules/.vite + +# Restart dev server +npm run dev + +# Check for missing types +npm install --save-dev @types/react @types/react-dom +``` + +
+ +--- + +
+ + + +## ๐Ÿ’ป Development Setup + + + +
+ +### ๐Ÿ› ๏ธ Development Tools + + + + + + + + +
+ + + +**Code Editor** + +[VS Code](https://code.visualstudio.com/) + +Recommended Extensions: +- ESLint +- Prettier +- TypeScript +- Tailwind CSS IntelliSense + + + + + +**API Testing** + +[Postman](https://www.postman.com/) +[Thunder Client](https://www.thunderclient.com/) + +Test all API endpoints +with collections + + + + + +**Database GUI** + +[MongoDB Compass](https://www.mongodb.com/products/compass) + +Visual interface for +MongoDB operations + + + + + +**Version Control** + +[Git](https://git-scm.com/) +[GitHub Desktop](https://desktop.github.com/) + +Source control +and collaboration + +
+ - **๐Ÿ”Ž Multi-faceted Search**: - Posts by content, hashtags, location - Users by username, interests, eco-level