Documentation β’ Architecture β’ API Docs β’ VPS Deployment Guide
Chatify is a production-ready, enterprise-grade real-time chat application built with modern technologies and best practices. This project demonstrates proficiency in full-stack development, microservices architecture, security implementation, and DevOps practices.
Built to impress: This isn't just another chat appβit's a showcase of production-ready engineering with security, scalability, and deployment automation at its core.
- ποΈ Production-Ready Architecture - Microservices design with Docker containerization
- π Security-First - JWT authentication, encrypted credentials, HTTPS/SSL ready
- π Real-Time Performance - WebSocket-based instant messaging with STOMP protocol
- π Observability - Health checks, metrics, and monitoring endpoints
- π DevOps Ready - Automated deployment, backup scripts, CI/CD compatible
- π¨ Modern UI/UX - Responsive Vue 3 frontend with TailwindCSS
graph TB
Client[Client Browser] -->|HTTPS| Nginx[Nginx Reverse Proxy]
Nginx -->|/api/*| Backend[Spring Boot Backend]
Nginx -->|/ws| Backend
Nginx -->|/| Frontend[Vue 3 SPA]
Backend -->|CRUD Operations| MongoDB[(MongoDB)]
Backend -->|WebSocket| Client
subgraph "Docker Network"
Nginx
Backend
MongoDB
Frontend
end
style Client fill:#4FC08D
style Nginx fill:#009639
style Backend fill:#6DB33F
style Frontend fill:#4FC08D
style MongoDB fill:#47A248
Key Design Decisions:
- Microservices Architecture - Independently scalable services
- Reverse Proxy Pattern - Nginx for SSL termination and load balancing
- Stateless Backend - JWT tokens for horizontal scalability
- Container Orchestration - Docker Compose for easy deployment
See ARCHITECTURE.md for detailed design documentation.
- β Real-Time Messaging - Instant message delivery via WebSockets
- β User Authentication - Secure JWT-based auth with refresh tokens
- β Persistent Chat History - MongoDB-backed message storage
- β Online Status - Live user presence tracking
- β Multiple Chat Rooms - Support for one-on-one conversations
- β Responsive Design - Mobile-first UI that works everywhere
- β JWT Authentication - Secure token-based authentication
- β Password Hashing - BCrypt password encryption
- β HTTPS/TLS Ready - SSL certificate configuration included
- β CORS Protection - Configurable cross-origin resource sharing
- β Security Headers - XSS, CSP, HSTS headers configured
- β Environment Variables - Secrets externalized and protected
- β Input Validation - Server-side validation on all endpoints
- β Docker Containerization - Multi-stage builds for optimization
- β Health Checks - Automated container health monitoring
- β Automated Backups - Scheduled MongoDB backup scripts
- β Monitoring Endpoints - Spring Boot Actuator integration
- β Log Management - Structured logging with configurable levels
- β One-Command Deployment - Automated deployment scripts
- β Security Validation - Pre-deployment security checks
- β Clean Architecture - Separation of concerns, layered design
- β RESTful API - Standard HTTP methods and status codes
- β Error Handling - Comprehensive exception handling
- β Unit Tests - JUnit tests for critical components
- β API Documentation - OpenAPI/Swagger integration
- β Type Safety - TypeScript-like structure with Pinia stores
- Docker & Docker Compose installed
- 2GB+ RAM available
- Ports 3000 and 4000 available
# 1. Clone the repository
git clone https://github.com/YOUR_USERNAME/chatify.git
cd chatify
# 2. Configure environment variables
cp .env.example .env
# Edit .env and set secure credentials
# Generate secure values:
# MongoDB password: openssl rand -base64 32
# JWT secret: openssl rand -base64 64
nano .env
# 3. Validate security configuration
./validate-security.sh
# 4. Deploy with Docker
./deploy.sh
# 5. Verify deployment
curl http://localhost:4000/actuator/healthAccess the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:4000
- Health Check: http://localhost:4000/actuator/health
| Document | Description |
|---|---|
| DEPLOYMENT.md | Complete deployment guide with Docker |
| VPS_DEPLOYMENT_GUIDE.md | Step-by-step VPS deployment with HTTPS |
| ARCHITECTURE.md | System architecture and design decisions |
| API_DOCS.md | REST API endpoint documentation |
| CONTRIBUTING.md | Contribution guidelines |
Security is a top priority. This project implements:
- Authentication: JWT with access & refresh tokens
- Encryption: BCrypt password hashing, HTTPS/TLS support
- Secrets Management: Environment variables, never committed to Git
- Input Validation: Server-side validation on all inputs
- Security Headers: XSS protection, CSP, HSTS, frame options
- Database Security: MongoDB authentication, internal network only
- Container Security: Non-root users, minimal attack surface
Security Validation: Run ./validate-security.sh before deployment to catch common security issues.
# Backend (Spring Boot)
cd server
mvn spring-boot:run
# Frontend (Vue 3)
cd client
npm install
npm run dev# One-command deployment
./deploy.sh
# Or manually
docker compose up -d --buildComplete guide with HTTPS/SSL setup available in VPS_DEPLOYMENT_GUIDE.md
Includes:
- Ubuntu server setup
- Docker installation
- SSL certificate (Let's Encrypt)
- Automated backups
- Firewall configuration
- Monitoring setup
- Build Time: ~49 seconds (multi-stage Docker build)
- Startup Time: ~60 seconds (all services)
- Container Size:
- Backend: ~250MB (Alpine-based JRE)
- Frontend: ~45MB (Nginx Alpine)
- MongoDB: ~700MB
- Response Time: <100ms (REST API)
- WebSocket Latency: <50ms (real-time messaging)
- Memory Usage: ~500MB (all containers combined)
# Run backend tests
cd server
mvn test
# Run frontend tests (if configured)
cd client
npm run test
# Security validation
./validate-security.shTest Coverage:
- Unit tests for core services
- Integration tests for API endpoints
- Security validation scripts
Contributions are welcome! Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
curl -X POST http://localhost:4000/auth/register \
-H "Content-Type: application/json" \
-d '{
"username": "john_doe",
"email": "john@example.com",
"password": "SecurePass123"
}'curl -X POST http://localhost:4000/auth/login \
-H "Content-Type: application/json" \
-d '{
"username": "john_doe",
"password": "SecurePass123"
}'const socket = new SockJS('http://localhost:4000/ws');
const stompClient = Stomp.over(socket);
stompClient.connect({}, () => {
stompClient.send('/app/chat', {}, JSON.stringify({
senderId: 'user1',
receiverId: 'user2',
content: 'Hello, World!'
}));
});Complete API documentation: API_DOCS.md
Building this project taught me:
- Full-Stack Development - End-to-end application development
- Real-Time Communication - WebSocket protocol and STOMP
- Security Best Practices - JWT, encryption, secure deployment
- Microservices Architecture - Service separation and communication
- Docker & Containerization - Multi-stage builds, orchestration
- DevOps Practices - Automated deployment, monitoring, backups
- Production Deployment - VPS setup, SSL, database backups
- Modern Frontend - Vue 3 Composition API, state management
β
Production-Ready - Not just a tutorial project, built for real deployment
β
Security-Conscious - Implements industry-standard security practices
β
Well-Documented - Extensive documentation for every aspect
β
Scalable Architecture - Designed to handle growth
β
DevOps Integration - Automated deployment and monitoring
β
Clean Code - Follows SOLID principles and best practices
β
Modern Tech Stack - Latest versions of frameworks and tools
This project is licensed under the MIT License - see the LICENSE file for details.
Sreenath Yadav
- GitHub: @sreenathyadavk
- LinkedIn: Sreenath Yadav
- Email: sreenathyadavk@gmail.com
- Spring Boot team for the excellent framework
- Vue.js community for the fantastic frontend tools
- MongoDB for the flexible database solution
- Docker for simplifying deployment
- All open-source contributors
Built with β€οΈ and a lot of β
Report Bug β’ Request Feature β’ Discussions




