Skip to content

carpodok/node-mysql-social-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

👥 Social Media App

Node.js Express.js MySQL JWT Swagger Postman

📖 Overview

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.

🚀 Endpoints

  • Swagger UI: http://localhost:3000/api-docs
  • Postman Collection: Use the provided JSON file in the project.

Screenshots

auth
comments
likes
posts
relationships
stories
users

🔑 Key Features

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

⚙️ Installation

  1. Clone the repository
  git clone https://github.com/carpodok/node-mysql-social-app.git
  1. Navigate to the project directory:
 cd node-mysql-social-app
  1. Install required dependencies
 npm install

Configuration

  1. Creat a .env file 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"

Running the Application

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


License

This project is licensed under the MIT License.

About

RESTful API for social media built with Node.js and MySQL

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published