Andromeda social media application Spring Boot API(Spring Boot, Neo4j, Redis)
MIT License
Welcome to the Andromeda Spring Framework Neo4j API project! This project is a backend API for a social media platform called Andromeda, developed using the Spring Framework, Neo4j, and Redis. The API provides CRUD functionality for various entities such as users, posts, comments, likes, friendships, products, and notifications. It uses Spring Data Neo4j for database operations and JWT for authentication.
andromeda/
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ ├── com/
│ │ │ │ └── andromeda/
│ │ │ │ ├── config/
│ │ │ │ │ ├── SecurityConfig.java
│ │ │ │ │ ├── Neo4jConfig.java
│ │ │ │ │ └── SwaggerConfig.java
│ │ │ │ ├── controller/
│ │ │ │ │ ├── AuthController.java
│ │ │ │ │ ├── CommentController.java
│ │ │ │ │ ├── FriendshipController.java
│ │ │ │ │ ├── LikeController.java
│ │ │ │ │ ├── NotificationController.java
│ │ │ │ │ ├── PostController.java
│ │ │ │ │ ├── ProductController.java
│ │ │ │ │ └── UserController.java
│ │ │ │ ├── dto/
│ │ │ │ │ ├── CommentDTO.java
│ │ │ │ │ ├── FriendshipDTO.java
│ │ │ │ │ ├── LikeDTO.java
│ │ │ │ │ ├── NotificationDTO.java
│ │ │ │ │ ├── PostDTO.java
│ │ │ │ │ ├── ProductDTO.java
│ │ │ │ │ └── UserDTO.java
│ │ │ │ ├── entity/
│ │ │ │ │ ├── Comment.java
│ │ │ │ │ ├── Friendship.java
│ │ │ │ │ ├── Like.java
│ │ │ │ │ ├── Notification.java
│ │ │ │ │ ├── Post.java
│ │ │ │ │ ├── Product.java
│ │ │ │ │ └── User.java
│ │ │ │ ├── repository/
│ │ │ │ │ ├── CommentRepository.java
│ │ │ │ │ ├── FriendshipRepository.java
│ │ │ │ │ ├── LikeRepository.java
│ │ │ │ │ ├── NotificationRepository.java
│ │ │ │ │ ├── PostRepository.java
│ │ │ │ │ ├── ProductRepository.java
│ │ │ │ │ └── UserRepository.java
│ │ │ │ ├── service/
│ │ │ │ │ ├── AuthService.java
│ │ │ │ │ ├── CommentService.java
│ │ │ │ │ ├── FriendshipService.java
│ │ │ │ │ ├── LikeService.java
│ │ │ │ │ ├── NotificationService.java
│ │ │ │ │ ├── PostService.java
│ │ │ │ │ ├── ProductService.java
│ │ │ │ │ └── UserService.java
│ │ │ │ └── util/
│ │ │ │ ├── JwtTokenUtil.java
│ │ │ │ └── PasswordUtil.java
│ │ └── resources/
│ │ ├── application.properties
│ │ └── schema.cypher
└── pom.xml
Clone the repository:
git clone https://github.com/7irelo/andromeda-spring-api.git
cd andromeda-spring-api
Set up Neo4j and Redis:
andromeda_neo4j
.Update application.properties
:
spring.neo4j.uri=bolt://localhost:7687
spring.neo4j.authentication.username=neo4j
spring.neo4j.authentication.password=your_password
spring.redis.host=localhost
spring.redis.port=6379
jwt.secret=your_jwt_secret
Run the project:
mvn clean install
mvn spring-boot:run
Use the /auth/login
and /auth/register
endpoints to obtain a JWT token. This token must be included in the Authorization
header for all other API requests.
Refer to the Swagger documentation for a detailed list of all available endpoints and their usage.
Swagger is integrated for API documentation. You can access it at http://localhost:8080/swagger-ui.html.
Contributions are welcome! Please follow these steps:
git checkout -b feature/your-feature-name
)git commit -am 'Add some feature'
)git push origin feature/your-feature-name
)This project is licensed under the MIT License - see the LICENSE file for details.