Categorygithub.com/ed16/messenger
module
0.0.0-20240818170527-a5f9a9fe18b3
Repository: https://github.com/ed16/messenger.git
Documentation: pkg.go.dev

# README

Messenger Project

This project implements a simple messenger system with authentication and user management.

Project Structure

The project consists of several packages and files:

  • cmd: Contains main applications for different services.
    • auth_service: Authentication service.
    • user_service: User management service.
    • message_service: Message exchangement service.
  • internal: Contains internal packages and libraries.
    • handlers: HTTP request handlers for different endpoints.
    • lib: Libraries and utilities.
    • repository: Data access layer.
  • domain: Contains domain models and error definitions.
  • services: Business logic layer.

Setup and Installation

Installation

  1. Clone the repository:
git clone https://github.com/ed16/messenger.git
  1. Navigate to the project directory:
cd messenger
  1. Build and run the services using docker-compose:
colima start
cp .env_template .env
nano .env
docker-compose up
  1. Use Postman with the following Postman collection for the test: postman_collection.json

Usage

The API endpoints provided by the services can be accessed through HTTP requests. Here are the available endpoints:

Authentication Service

  • /auth/login: Login endpoint.
  • /auth/validate-token: Token validation endpoint.

User Service

  • /users: User management endpoints.
  • /users/contacts: Add or retrieve user contacts.
  • /users/profile: Update user profile details.

Messages

  • /messages/user/{userId}: Send a personal message to a user.
  • /messages/group/{groupId}: Send a message to a group.
  • /messages/user/: Retrieve personal messages between users.
  • /messages/group/: Retrieve messages from a group.
  • /messages/user/{userId}/file: Send a media file to a user.
  • /messages/group/{groupId}/file: Send a media file to a group.
  • /messages/file: Retrieve media files from messages.

Tracing and Monitoring

Jaeger

Jaeger is available at the following link: http://localhost:16686/

# Packages

No description provided by the author
No description provided by the author
No description provided by the author