A Node.js/Express-based REST API for a social media application with AI-powered post description generation.
- Overview
- Features
- Tech Stack
- Project Structure
- Installation & Setup
- Environment Variables
- API Endpoints
- Usage
- Google Gemini Integration
- Example Responses
- Future Enhancements
- License
This project is a Node.js/Express-based REST API that provides core functionalities for a social media application, including user authentication, post creation with image upload, and AI-powered description generation using Google Gemini.
✅ User Registration & Login
✅ JWT-based Authentication
✅ Image Upload (Multer)
✅ AI Description Generation (Google Gemini)
✅ Create & Manage Posts
Backend: Node.js, Express.js
Database: MySQL (or MongoDB, if used)
Authentication: JWT (JSON Web Token)
File Upload: Multer
AI Integration: Google Gemini API
Environment Variables: dotenv
project-name/
├── src/
│ ├── controllers/ # All controllers (auth, posts)
│ ├── routes/ # Routes for auth & posts
│ ├── middleware/ # Authentication middleware
│ ├── config/ # DB & Gemini config
│ └── app.js # Main entry point
├── uploads/ # Uploaded images
├── .env # Environment variables
├── package.json
└── README.md
1️⃣ Clone the repository
git clone https://github.com/your-username/your-repo.git
cd your-repo2️⃣ Install dependencies
bassh npm install
3️⃣ Create .env file
bash PORT=5000 DB_HOST=localhost DB_USER=root DB_PASS=yourpassword DB_NAME=yourdbname JWT_SECRET=your_jwt_secret GEMINI_API_KEY=your_gemini_api_key