Skip to content

Latest commit

 

History

History
94 lines (62 loc) · 3.43 KB

File metadata and controls

94 lines (62 loc) · 3.43 KB

WASA Text - WhatsApp Clone

This repository contains the WASA Text project, a web application simulating WhatsApp features, developed for the Web and Software Architecture (WASA) exam at Sapienza University of Rome.

🏆 Grade achieved: 30/30

📝 Project Description

WASA Text is an instant messaging platform designed to replicate the user experience of modern chat applications. The system allows users to register, search for other users, start private or group conversations, and exchange multimedia content.

Main Features

  • 1-to-1 and Group Chats: Dynamic creation of single conversations and groups with customizable photos.
  • Advanced Messaging: Sending text and multimedia messages (photos).
  • Interactions: Ability to reply to specific messages and add reactions (emojis).
  • Forwarding: Functionality to forward messages to other chats or users.
  • Profile Management: Editing username and profile picture.
  • Real-Time Updates: Polling system to receive new messages and status updates.

🛠️ Technical Details

The project was built following strict architectural patterns to ensure scalability, maintainability, and security.

Backend (Go / Golang)

The core of the application is a RESTful server written in Go.

  • Routing: Uses julienschmidt/httprouter for high-performance, low-memory HTTP routing.
  • Architecture: Modular structure that strictly separates business logic (service/api) from data access (service/database), facilitating testing and code evolution.
  • API: Exposes a REST interface compliant with OpenAPI specifications (documented in doc/api.yaml).
  • Database: Data persistence managed via SQLite, ideal for the portability of the exam project, with optimized SQL queries and transactional management.

Frontend (Vue.js 3 + Vite)

The user interface is a modern and reactive Single Page Application (SPA).

  • Framework: Developed with Vue.js 3 (Composition API) for clean and modular state management.
  • Build Tool: Uses Vite for instant startup times and Hot Module Replacement (HMR) during development.
  • Styling: Integration of Bootstrap and custom CSS for a responsive and "pixel-perfect" design similar to the original.
  • Networking: HTTP calls management via Axios, with interceptors for authentication (Bearer Token).

Containerization & Build

The project includes scripts for automating the development and production environment, simulating a containerized environment for the frontend (via open-node.sh) to ensure dependencies are isolated and consistent.


🚀 How to Run

Prerequisites

  • Go 1.25+
  • Docker (optional, for the isolated Node environment)
  • Node.js/Yarn (if run locally without a container)

Development Mode

You can launch the backend and frontend separately for development.

  1. Backend:

    go run ./cmd/webapi/
  2. Frontend (in a new terminal, using the containerized environment):

    ./open-node.sh
    # (inside the container)
    yarn run dev

Production / Build for Delivery

To generate the final executable that includes the frontend (embedded):

./open-node.sh
# (inside the container)
yarn run build-prod
exit
# (outside the container)
go build -tags webui ./cmd/webapi/

Known Issues

If you encounter Javascript crashes in production that do not appear in dev, use:

yarn run build-prod
yarn run preview