Skip to content

A microservice-based mailing list management system using Go, gRPC, Docker, and SQLite. It offers both HTTP and gRPC APIs for managing email entries, containerized for easy deployment and scalability.

License

Notifications You must be signed in to change notification settings

younesious/mailing-list-microservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mailing List Microservice

Description

This project is a microservice-based mailing list management system built with Go, gRPC, and Docker. It includes an HTTP API for handling JSON requests and a gRPC API for more efficient communication between microservices. The system uses SQLite as its database.

Project Structure

├── db
│   └── db.go
├── docker-compose.yml
├── go.mod
├── go.sum
├── grpc_api
│   ├── grpc_client
│   │   ├── Dockerfile
│   │   └── grpc_client.go
│   └── grpc_server
│       └── grpc_server.go
├── json_api
│   └── handlers.go
├── LICENSE
├── mailinglist.db
├── proto
│   ├── email_grpc.pb.go
│   ├── email.pb.go
│   └── email.proto
├── README.md
└── server
    ├── Dockerfile
    └── server.go

7 directories, 16 files

Getting Started

Prerequisites

  • Docker
  • Docker Compose

Running the Project

  1. Clone the repository:

    git clone https://github.com/younesious/mailing-list-microservice.git
    cd mailing-list-microservice
  2. Build and start the services using Docker Compose:

    docker compose up --build
  3. The HTTP server will be available on http://localhost:8080 and the gRPC server on http://localhost:8081.

Interacting with the Services

HTTP API Endpoints

  • Add Email: POST /email/add
  • Get Email: GET /email/get
  • Update Email: PUT /email/update
  • Delete Email: DELETE /email/delete
  • Get Email Batch: GET /email/batch

gRPC API

The gRPC API can be accessed using any gRPC client. Refer to the proto/email.proto file for the service definitions.

Building the Project

To build the project manually:

  • Build the server:

    docker build -t myserver -f server/Dockerfile .
  • Build the client:

    docker build -t myclient -f grpc_api/grpc_client/Dockerfile .

Running the Project

To run the gRPC server and client:

docker compose up --build

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Feel free to contribute and I'll be happy to see you :)

About

A microservice-based mailing list management system using Go, gRPC, Docker, and SQLite. It offers both HTTP and gRPC APIs for managing email entries, containerized for easy deployment and scalability.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published