The Wall is a RESTful API built for a social media platform where users can create accounts, post content, bookmark posts, create and join groups, and interact with other users. This project is built using Node.js with Express and follows an organized, modular structure for scalability.
The-Wall-API/
│── bin/
│── database/
└── the_wall.sql
│── src/
│ ├── controllers/
│ ├── core/
│ ├── middlewares/
│ ├── models/
│ ├── routes/v1/
│ ├── utils/
│ └── index.js
│── static/uploads/
│── uploads/
│── .gitignore
│── README.md
│── package-lock.json
│── package.json
- User authentication (register, login, JWT-based authorization)
- Create, read, update, and delete posts
- Bookmark posts for later
- Create and manage groups
- Join and leave groups
- Comment and interact with posts
- Node.js installed on your system
- XAMPP for MySQL database
- Clone the repository:
https://github.com/yourusername/socmed-restful-api.git
cd socmed-restful-api- Install dependencies:
npm install- Start XAMPP and activate Apache and MySQL.
- Open
phpMyAdminand create a new database namedthe_wall. - Import the SQL file from the
database/the_wall.sqlfolder.
Create a .env file in the root directory with the following:
PORT=3001
API_KEY={private_key}
API_SECRET_KEY={private_key}
DB_HOST=localhost
DB_USER=root
DB_PASS=
DB_NAME=thewall_db
npm startThe server will be running on http://localhost:3001
The API has endpoints for users, posts, and groups. Each module is organized within the src/ directory:
- Controllers: Business logic for each endpoint.
- Models: Database schema and queries.
- Routes: API endpoint definitions.
- Middlewares: Authentication and error handling.
Refer to the detailed API documentation for all available endpoints.
Pull requests are welcome. For major changes, open an issue to discuss what you would like to change.
This project is licensed under the MIT License.