Home

Awesome

Microservice Architecture for Laravel

Table of Contents

Overview

This project is a microservice-based architecture designed to provide scalable and maintainable solutions. It includes various technologies for managing service discovery, messaging, and data integration.

Technologies

Getting Started

Ensure you have the following software installed:

To get a local copy of this project up and running, follow these simple steps.

Installation

  1. Clone the repository:
    git clone https://github.com/erayaydin/microservice-laravel.git
    cd microservice-laravel
    
  2. Copy the sample .env.example to .env:
    cp .env.example .env
    
  3. Edit necessary parts in .env file as needed.

Configuration

The configuration settings are stored in the .env file. Customize the necessary parts as needed.

Generate RSA Keys

You need to generate a pair of 4096-bit RSA private and public keys for inter-service authentication and authorization. These keys will be shared between services.

openssl genrsa -out secrets/oauth-private.key 4096
openssl rsa -in secrets/oauth-private.key -pubout -out secrets/oauth-public.key

Running the Services

To start all the services, run:

docker compose up -d

This command will start all the containers defined in the docker-compose.yml file.

Remember to run migrations and necessary adjustments before testing services. Like:

docker compose exec -u app security php artisan migrate

Microservices

Security Service

The Security Service is responsible for handling user authentication and authorization. Authentication and authorization will be handled with OAuth2.

Endpoints

Data Store

License Service

The Security Service is responsible for handling user licenses. Auth verification will be handled with JWT key decoding.

Endpoints

Data Store

File Management Service

The File Management Service is responsible for handling file operations. End user can upload and download files.

Endpoints

Data Store

Need to Implement

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit)
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a pull request with detailed description.

License

Distributed under the MIT License.