This project serves as the backend for a small social media application, handling user management, posts, and tagging functionality.
- User Management: Register new users, fetch user details, update and delete users.
- Authentication: Supports user authentication and JWT token generation.
- Post Management: Create, retrieve, update, and delete posts. Supports file uploads and pagination.
- Tag Management: Create, retrieve, update, and delete tags associated with posts.
- Spring Boot: For creating the application.
- Spring Security: For security and authentication.
- MySQL: Database to store all persistent data.
- Hibernate: ORM tool for data management.
- ModelMapper: For mapping between models.
-
Clone the repository:
git clone https://github.com/AhmedJguirim/Minglezone-Springboot.git
-
Set up MySQL:
- Ensure MySQL is installed and running.
- Create a database named 'minglezone' or configure the
spring.datasource.url
inapplication.properties
.
-
Configure application.properties:
- Update the database username and password as per your MySQL setup.
spring.datasource.url=jdbc:mysql://localhost/minglezone?createDatabaseIfNotExist=true&serverTimezone=UTC spring.datasource.username=root spring.datasource.password=root
-
Build the project:
mvn clean install
-
Run the application:
mvn spring-boot:run
POST /register
- Register a new userGET /users
- Get all usersGET /users/{id}
- Get a single user by IDPUT /users/{id}
- Update a userDELETE /users/{id}
- Delete a user
GET /posts
- Get all postsGET /posts/myPosts
- Get posts for the currently authenticated userPOST /posts
- Create a new postPUT /posts/{id}
- Update a postDELETE /posts/{id}
- Delete a post
GET /tags
- Get all tagsPOST /tags
- Create a new tagGET /tags/{id}
- Get a tag by IDPUT /tags/{id}
- Update a tagDELETE /tags/{id}
- Delete a tag
Feel free to fork the project and submit pull requests.
MIT license