Skip to content

A secure real-time messaging backend built with Spring Boot, featuring end-to-end encrypted communication and steganography to hide messages within images. Includes JWT authentication, WebSocket support, friend management, and user presence tracking.

Notifications You must be signed in to change notification settings

Quo-len/spring-boot-messenger-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

messenger-java-spring-api

Spring Boot backend for a messenger app, providing authentication, chat, presence, and file handling APIs.

Features

  • JWT-based auth and Spring Security
  • REST APIs for users, friends, chats, and messages
  • WebSocket support for realtime updates
  • Postgres persistence via Spring Data JPA
  • Media/file uploads for avatars and messages

Tech Stack

  • Java 17
  • Spring Boot 3.5
  • PostgreSQL
  • Maven
  • MapStruct, Lombok

Requirements

  • Java 17
  • Maven (or use the included Maven Wrapper)
  • PostgreSQL

Quick Start

  1. Create a Postgres database (default: cryptDB).
  2. Update database credentials and JWT secret in application.properties.
  3. Run the app.

Run (Maven Wrapper)

./mvnw spring-boot:run

Run (Maven)

mvn spring-boot:run

The server starts on the default Spring Boot port 8080.

Configuration

Main config lives in src/main/resources/application.properties.

Key settings you may want to change:

  • spring.datasource.* for Postgres connection
  • jwt.secret for JWT signing
  • app.avatars.* and app.messages.* for uploads paths and URLs

Uploads are stored under uploads/ by default.

Project Structure

.
├── pom.xml
├── README.md
├── src
│   ├── main
│   │   ├── java
│   │   │   └── com/example/piccrypt
│   │   │       ├── PicCryptBackendApplication.java
│   │   │       ├── config
│   │   │       ├── controllers
│   │   │       ├── dtos
│   │   │       ├── exceptions
│   │   │       ├── mapper
│   │   │       ├── models
│   │   │       ├── repositories
│   │   │       ├── serviceImpl
│   │   │       ├── services
│   │   │       └── types
│   │   └── resources
│   │       └── application.properties
│   └── test
│       └── java/com/example/piccrypt
├── uploads
│   ├── avatars
│   └── messages
└── target
	└── ...

Tests

./mvnw test

Notes

  • The default JWT secret in application.properties is for local development only. Replace it for real deployments.
  • If you use a different port, set server.port in application.properties.

About

A secure real-time messaging backend built with Spring Boot, featuring end-to-end encrypted communication and steganography to hide messages within images. Includes JWT authentication, WebSocket support, friend management, and user presence tracking.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages