Skip to content

LeothDev/WASAText

Repository files navigation

WASAText

A modern real-time messaging application built for the Web and Software Architecture course. Connect with friends effortlessly through private conversations and group chats, all from the convenience of your PC.

Features

Messaging

  • Private Conversations: Start one-on-one chats with any WASAText user
  • Group Chats: Create groups with multiple users for team discussions
  • Real-time Communication: Instant message delivery with WebSocket support
  • Message Types: Send text messages, images, and files
  • Message Actions: Reply to messages, forward content, and delete your own messages
  • Message Reactions: React to messages with emoticons and see who reacted

User Experience

  • Conversation List: View all conversations sorted by most recent activity
  • Message Previews: See the latest message content and timestamp
  • User Search: Find other users by username to start new conversations
  • Message Status: Track delivery and read status with checkmarks
    • ✓ Message delivered to recipients
    • ✓✓ Message read by all recipients
  • Profile Management: Update your username and profile photo

Group Management

  • Create Groups: Start group conversations with multiple users
  • Add Members: Group members can invite others to join
  • Leave Groups: Exit group conversations at any time
  • Group Settings: Manage group name, photo, and participants

Technical Architecture

Backend (Go)

  • RESTful API: OpenAPI 3.0 compliant endpoints
  • WebSocket Support: Real-time bidirectional communication
  • SQLite Database: Lightweight, embedded database solution
  • File Upload: Support for image and file attachments
  • Authentication: Simplified username-based login system

Frontend (Vue.js)

  • Single Page Application: Responsive web interface
  • Real-time Updates: WebSocket integration for live messaging
  • File Handling: Drag-and-drop file uploads
  • Responsive Design: Optimized for desktop use

Deployment

  • Docker Containerization: Multi-stage builds for production
  • Nginx Reverse Proxy: Frontend serving and API routing
  • Volume Persistence: Data and uploads preserved across restarts

Quick Start

Prerequisites

  • Docker and Docker Compose
  • Git

Installation

  1. Clone the repository

    git clone git@github.com:LeothDev/WASAText.git
    cd wasatext
  2. Start the application

    docker-compose up --build
  3. Access the application

    • Open your browser to http://localhost:8080
    • Register with any username to get started

Development Setup

For a clean development environment:

  go run ./cmd/webapi
  cd webui && yarn run dev

API Documentation

The application provides a complete OpenAPI specification. Check them at doc/api.yaml.

Architecture Highlights

Message Delivery System

  • Delivery Tracking: Messages show as delivered when received by all recipients
  • Read Receipts: Messages show as read only when ALL recipients have read them
  • Group Logic: In group chats, read status requires unanimous reading

Real-time Features

  • WebSocket Events: New messages, message status updates, typing indicators
  • Live Notifications: Unread message counts and conversation updates
  • Broadcast System: Efficient message distribution to conversation participants

Data Persistence

  • Message History: Complete conversation history with pagination
  • File Storage: Persistent uploads directory for images and files
  • User Profiles: Username and photo management

File Structure

wasatext/
├── cmd/webapi/          # Go application entry point
├── service/             # Backend business logic
│   ├── api/            # HTTP handlers and WebSocket
│   ├── database/       # Data access layer
│   └── models/         # Data structures
├── webui/              # Vue.js frontend application
├── uploads/            # File storage directory
├── docker-compose.yml  # Container orchestration
├── Dockerfile.backend  # Go backend container
├── Dockerfile.frontend # Nginx + Vue.js container
└── nginx.conf          # Reverse proxy configuration

Contributing

This project was developed as part of the Web and Software Architecture course requirements, implementing:

  1. OpenAPI Standard: Complete API specification and documentation
  2. Go Backend: RESTful services with WebSocket support
  3. JavaScript Frontend: Modern SPA with real-time features
  4. Docker Deployment: Production-ready containerization

License

Academic project for educational purposes.

About

WhatsApp clone webapp for WASA course at Sapienza University

Topics

Resources

License

Stars

Watchers

Forks