Node MySQL Social App is a RESTful API for a social media platform built using Node.js and MySQL.
It supports user authentication with JWT and provides core social media functionalities:
- 👤 User management
- 📝 Posting system
- 💬 Comments
- ❤️ Likes
- 🔗 Followers (Relationships)
- 📖 Stories
The project follows an MVC architecture with organized routes, controllers, and configs.
API documentation is available via Swagger.
- Swagger UI:
http://localhost:3000/api-docs - Postman Collection: Use the provided JSON file in the project.
✔ CRUD Operations for users, posts, stories, and interactions
✔ JWT Authentication – secure login & session handling
✔ Password Hashing with bcryptjs
✔ Server-Side Validation using express-validator
✔ Pagination for large datasets
✔ Swagger API Documentation for collaboration & developer experience
- Clone the repository
git clone https://github.com/carpodok/node-mysql-social-app.git- Navigate to the project directory:
cd node-mysql-social-app- Install required dependencies
npm install- Creat a
.envfile on the root of the project and add the following environment variables.
PORT=3000
JWT_SECRET ="your-jwt-secret"
DB_HOST = "localhost"
DB_USER = "root"
DB_PASSWORD = "your-mysql-password"
DB_NAME="your-db-name"
To start the server, run the following command on the root of the project path;
npm start
For the development purpose;
npm run dev
👉 The application will be running on http://localhost:3000
This project is licensed under the MIT License.






