QuietSpace is a privacy-focused social media application designed for meaningful interactions through a intuitive interface. Built with Spring Boot, the application provides a comprehensive set of features for modern social networking, emphasizing clean code, security, and real-time interaction.
- Secure user authentication and authorization
- Email account activation system
- Stateless security with JWT (JSON Web Tokens)
- Refresh token mechanism
- Token blacklist strategy for secure logout
- Posts
- Comments
- Replies
- User profiles
- User Reactions
- User Followings
- Real-time notifications
- Secure WebSocket Chat Functionality
- End-to-end encrypted messaging
- Real-time chat using STOMP protocol
- One-to-one private messaging
- Group chat support
- Message delivery and read receipts
- Secure WebSocket connections
- Persistent message storage
- Integration with existing authentication system
- User profile picture uploads
- Post and Message image attachments
- Image conversion and resizing
- Efficient image storage and retrieval
- Direct database storage of images
- Optimized image representation in DTOs
- Pagination, sorting and criteria queries for content
- Robust error handling with global exception management
- Scalable and modular application architecture
- Detailed API documentation
- Framework: Spring Boot 3.3.4
- Language: Java 17
- Security: Spring Security, JWT
- API Documentation: Swagger/OpenAPI
- Development Tools: Lombok
- Containerization: Docker, Kubernetes
- ORM: JPA/Hibernate
- Database: MySQL
- Migration: Flyway
- Test: Junit5, Mockito
- JWT-based authentication for connections
- Secure message routing
- Protection against unauthorized access
- Encrypted message payload
- Connection validation and management
- Error handling with custom Event messages
- Spring Security
- JWT (JSON Web Tokens)
- Secure token management
- Encrypted WebSocket connections
- Maven
- Lombok
- MapStruct
- Mockito
- JUnit 5
- Docker
- Docker Compose
- Kubernetes
QuietSpace-Backend/
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/quietspace/
│ │ │ ├── controller/ # REST API endpoints
│ │ │ │ ├── UserController.java
│ │ │ │ ├── PostController.java
│ │ │ │ └── CommentController.java
│ │ │ ├── model/ # Data Transfer Objects
│ │ │ │ ├── request/ # Input DTOs
│ │ │ │ └── response/ # Output DTOs
│ │ │ ├── entity/ # Database entities
│ │ │ │ ├── User.java
│ │ │ │ ├── Post.java
│ │ │ │ └── Comment.java
│ │ │ ├── repository/ # Data access layers
│ │ │ ├── service/ # Business logic
│ │ │ ├── config/ # Application configurations
│ │ │ │ ├── WebSocketConfig.java
│ │ │ │ └── SecurityConfig.java
│ │ │ ├── security/ # Authentication components
│ │ │ │ ├── JwtAuthenticationFilter.java
│ │ │ │ └── JwtUtil.java
│ │ │ └── exception/ # Error handling
│ │ └── resources/
│ │ ├── application.properties
│ │ └── db/migration/ # Flyway database scripts
│ └── test/ # Comprehensive test suites
│ ├── unit/
│ ├── integration/
│ └── mock/
└── infrastructure/
├── docker/ # Containerization configs
└── k8s/ # Kubernetes deployment
- Modular and clean architecture
- SOLID principles implementation
- Meaningful naming conventions
- Small, focused methods
- Global exception handling
- Strict DRY code approach
- Consistent coding style
- Integration, unit, and mock tests
- Java 17+
- Maven
- MySQL
- Docker (optional)
- Kubernetes (optional)
-
Clone the repository
git clone https://github.com/thural/QuietSpace-Backend.git cd QuietSpace-Backend
-
Configure Environment
- Create a
.env
file with database and JWT configurations
SPRING_DATASOURCE_URL=jdbc:mysql://localhost:3306/quietspace SPRING_DATASOURCE_USERNAME=your_username SPRING_DATASOURCE_PASSWORD=your_password JWT_SECRET=your_secret_key
- Create a
-
Build and Run
mvn clean install mvn spring-boot:run
Swagger/OpenAPI documentation available at:
http://localhost:8080/swagger-ui.html
- Fork the repository
- Create a feature branch
- Commit changes
- Push and create a pull request
This repository is licensed under the GNU Affero General Public License v3.0 (AGPLv3). This license requires that any modifications or distributions of the software, including commercial or proprietary use, must be made available under the same terms. Failure to comply with these terms may result in legal action.