This project is a clone of the Reddit API, which allows users to create and manage subreddits, posts, and comments. It is built using Spring Boot and uses a MySQL database to store the data.
- User registration and authentication (JWT-based security)
- Subreddit creation and management
- Post creation and management
- Comment creation and management
- Upvote and downvote functionality for posts and comments
- Follows RESTful best practices
- Java 17
- Spring Boot 3.4.3
- Spring Security (JWT-based authentication)
- Spring Data JPA
- MySQL
- Lombok
- MapStruct
- Maven
- Java mail API
- Swagger documentation
- Java 17
- MySQL
- Maven
- Clone the repository
git clone https://github.com/Elbialy0/reddit-api.git
cd reddit-api- Configure the MySQL database
spring.datasource.url=jdbc:postgresql://localhost:5432/reddit_db
spring.datasource.username=your_username
spring.datasource.password=your_password- Build the project
mvn clean install
mvn spring-boot:run- Access the API at http://localhost:8080
- Access the Swagger documentation at http://localhost:8080/swagger-ui/index.html