ConvoSphere is a scalable, mobile-first chat application backend with a roadmap to include agentic AI features such as smart reminders, conversation summaries, and collaborative meeting scheduling.
This repository contains the Spring Boot backend (Phase 1) designed to support a React Native mobile application.
ConvoSphere aims to be more than just a chat app.
- Phase 1 – Core real-time chat (current scope)
- Phase 2 – “Remind Me” agent (follow-ups & nudges)
- Phase 3 – “While You Were Away” AI summaries
- Phase 4 – Agent-assisted group meeting scheduling
- User authentication (JWT-based)
- 1:1 and group conversations
- Real-time messaging (WebSockets + STOMP)
- Media messages (images/videos/GIFs)
- Message history with pagination
- MongoDB-based scalable schema
- Group membership & roles
- Unread message tracking
- AI agents
- Push notifications
- Typing indicators
- Message reactions
- End-to-end encryption
- Java 25
- Spring Boot 4
- Spring Security
- Spring WebSocket (STOMP)
- Spring Data MongoDB
- JWT (Auth0 / Nimbus)
- Lombok
- Spring Validation
- Springdoc OpenAPI (Swagger)
- AWS S3 / MinIO (media storage)
- MongoDB
- Document-based design
- Embedded conversation members
- Separate messages collection for high write throughput
- React Native
- TypeScript
- WebSockets + REST APIs
React Native App
|
| REST + WebSocket (JWT)
v
Spring Boot Backend
|
| MongoDB
|
| Object Storage (S3 / MinIO)
usersconversationsmessages- (optional)
messageReceipts
- No DBRefs /
@DocumentReferencefor hot-path data - Embedded members inside conversations
- Manual ID references between collections
- Index-driven query patterns
users
- id
- email (unique)
- username (unique)
- passwordHash
- displayName
- avatarUrl
- createdAt
- updatedAt
conversations
- id
- type (DIRECT | GROUP)
- title
- createdBy
- members[]
- lastMessage (denormalized preview)
- isArchived
- createdAt
- updatedAt
messages
- id
- conversationId
- senderId
- content
- messageType (TEXT | IMAGE | VIDEO | GIF | SYSTEM)
- mediaUrl
- replyToId
- createdAt
- editedAt
- isDeleted
- JWT-based authentication
- Passwords hashed using BCrypt
- JWT required for:
- All REST APIs
- WebSocket connections
- WebSockets with STOMP protocol
- Clients subscribe to:
/topic/conversations/{conversationId} - Messages are sent to:
/app/messages.send
src/main/java/com/example/convospherebackend/
├── auth/
├── config/
├── controllers/
├── entities/
├── enums/
├── repositories/
├── services/
└── dto/
spring.data.mongodb.uri=mongodb://localhost:27017/convosphere
spring.data.mongodb.auto-index-creation=true
jwt.secret=your-secret-key
jwt.expiration=86400000
Swagger UI:
http://localhost:8080/swagger-ui.html
- Java 25
- MongoDB
- Maven
- Docker (optional)
mvn spring-boot:run
- Messages indexed by
(conversationId, createdAt DESC) - Designed for high-write workloads
- Shard-friendly MongoDB schema
- No cross-collection joins in hot paths
- Natural language follow-ups
- Time-based reminders
- Chat resurfacing
- Priority-based summaries
- AI-generated highlights
- User-configurable importance rules
- Group availability analysis
- Calendar integration
- Consensus-based scheduling