Skip to content

A minimal example of asynchronous notification delivery powered by dev-family/admiral. This repository shows how to offload message sending to background workers, ensuring responsive applications and reliable delivery at scale.

Notifications You must be signed in to change notification settings

dev-family/admiral-notifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Structure

  • /backend -- App/Admin panel backend, Laravel
  • /admin -- Admin panel frontend (React, Vite)
  • /build -- Infrastructure (Dockerfiles, config files)

Required Software

To run the project locally, you need Docker and Docker Compose.

Configuration

The project is configured using environment variables. For development convenience, .env files can be used. .env files are not stored in vcs. Examples of filled .env files are provided in .env.example.

  • /backend/.env -- Backend application configuration
  • /admin/.env -- Admin panel application configuration

Launch

Creating docker-compose.yaml file

cp docker-compose.example.yaml  docker-compose.yaml

Creating .env Files

cp backend/.env.example  backend/.env
cp admin/.env.example admin/.env

At this stage, no changes are required.

Installing Dependencies

Start the containers:

docker compose up -d

Now, install dependencies:

docker compose run --rm back composer install --ignore-platform-reqs

Run this command whenever backend dependencies are updated (i.e., when backend/composer.lock changes).

Besides PHP dependencies, the admin panel also has frontend dependencies.

docker compose run --rm admin yarn install

Install these dependencies when admin/yarn.lock changes.

Generating APP_KEY

APP_KEY is a special environment variable for Laravel, used as a symmetric encryption key. Generate it once using:

docker compose run --rm back php artisan key:generate

Create the Database

Then run:

docker compose exec db psql -U postgres -c 'create database "backend"'

Configuring S3

S3 (e.g., minio is used for image storage.

Modify these params in backend/.env for S3 configuration:

S3_ENDPOINT=
S3_KEY=
S3_SECRET=
S3_REGION=us-east-1
S3_BUCKET=

Other integration options can also be found at backend/.env file

Migrating and Populating the Database

Migrate using:

docker compose run --rm back php artisan migrate

Populate using:

docker compose run --rm back php artisan db:seed

Running the Project

docker compose up -d

The nginx container exposes port 80 on the host machine, backend should be accessible at: http://localhost:802.

The admin container exposes port 3000 on the host machine, admin panel should be accessible at: http://localhost:3000.

About

A minimal example of asynchronous notification delivery powered by dev-family/admiral. This repository shows how to offload message sending to background workers, ensuring responsive applications and reliable delivery at scale.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published