This repository hosts the source code for a simple-featured Blog Application built with NestJS. It includes role-based access control, category management, and post creation features. The application uses JWT for authentication, Bcrypt for password hashing, Multer for file uploads, and Swagger for API documentation.
- Live Preview: https://blog-apis-nestjs.onrender.com/
- User and Admin roles
- JWT Authentication
- Password Hashing with Bcrypt
- CRUD Operations for Posts and Categories
- Multer for File Uploads
- Login/Signup
- Swagger API Documentation
- Role-Based Access Control
- Admin: Can create, edit, delete posts and categories.
- User: Can view posts and categories.
- Authenticated APIs for secured access
- REST APIs for interaction with the application
- Database: MySQL with TypeORM
You can access the full API documentation via Swagger at the root URL of the deployed application:
Swagger UI: https://your-app-url.com/
- User to Post: One-to-Many relationship (One user can have multiple posts).
- Category to Post: One-to-Many relationship (One category can contain multiple posts).
- Post Apis
- Categories And Authentication Apis
Clone the project
    git clone https://github.com/Mshandev/Blog-Apis-Nestjs.gitGo to the project directory
    cd Blog-Apis-NestjsInstall dependencies
    npm installSetup Environment Vaiables
  DATABASE_HOST=YOUR_DB_HOST
  DATABASE_PORT=YOUR_DB_PORT
  DATABASE_USER=YOUR_DB_USER
  DATABASE_PASSWORD=YOUR_DB_PASSWORD
  DATABASE_NAME=DB_NAME
  JWT_SECRET=secretkey
Start the server
    npm run start:dev- Nestjs
- TypeORM
- MySQL
- JWT Authentication
- Bcrypt
- Multer for File Uploads
- Swagger for API Documentation
The application is deployed on Render.
Contributions are always welcome! Just raise an issue, and we will discuss it.
If you have any feedback, please reach out to me here

