Skip to content

d3cline/Agress

Repository files navigation

Agress Logo

Agress

Based Commerce

Agress is an open-source e-commerce platform that strips out the bloat, avoids plugin overload, and emphasizes performance with a single-template setup. Built with PHP, Signal-CLI, and a Tailwind/DaisyUI frontend, Agress delivers a streamlined experience on the front end and powerful, customizable workflows on the back end.

AgressAdmin


Key Features

  • Simplicity-First Design: A single template structure without excess.
  • API-Driven Architecture: REST API for easy frontend integration and custom workflows.
  • Chat Based Checkout: Checkout happens in chat. Enabling negotiation of custom payment shcemes on the fly. As well as being cryptographicly secure.

Installation

  1. Set up Signal-cli as a socket daemon. Follow their official documentation to do this, keep the socket path information for later. If you are using this within a user-space context, mount the socket in a custom user path.

  2. Clone the repository:

    git clone https://github.com/yourusername/agress.git
    cd agress
  3. Install dependencies:

    composer install
  4. Environment setup:

    • Configure your .env file with database, Signal-cli, and SMTP settings.
    • Add API keys for payment gateways as needed.
  5. Run Migrations:

    php artisan migrate
    php artisan db:seed
  6. Serve the application:

    php -S localhost:8000 -t public

Usage Examples

Add a New Product

curl -X POST 'http://localhost:8000/product' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-F 'name=Standard USD Product' \
-F 'price=19.99' \
-F 'currency=USD' \
-F 'description=Standard USD price' \
-F 'image=@/path/to/image.webp'

Update an Existing Product

curl -X POST 'http://localhost:8000/product/1' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-F '_method=PATCH' \
-F 'name=Updated Product Name' \
-F 'price=24.99' \
-F 'currency=USD' \
-F 'description=Updated description for the product' \
-F 'image=@/path/to/image.webp'

Delete a Product

curl -X DELETE 'http://localhost:8000/product/2' \
-H 'Authorization: Bearer YOUR_API_TOKEN'

Signal-CLI Setup

Agress supports Signal for secure messaging. Start the Signal-CLI daemon:

./signal-cli -u +YOUR_PHONE_NUMBER daemon --socket

To check if a user is registered on Signal:

echo '{"jsonrpc": "2.0", "method": "getUserStatus", "params": {"recipient": ["+123456789"]}, "id": 1}' | socat - UNIX-CONNECT:/run/user/1000/signal-cli/socket

Example response:

{
  "jsonrpc": "2.0",
  "result": [
    {
      "recipient": "+123456789",
      "number": "+123456789",
      "uuid": "46684565-1036-4a57-9fa6-bbed18a4b021",
      "isRegistered": true
    }
  ],
  "id": 1
}

Additional Tools and Dependencies

  • Mail Support: Install these packages for email support:

    composer require illuminate/mail
    composer require swiftmailer/swiftmailer
    composer require guzzlehttp/guzzle
  • CAPTCHA Integration: Set up hCaptcha:


Development

To contribute, clone the repository, make your changes, and submit a pull request. Ensure that all code adheres to PSR-12 standards and passes all tests.

Testing

Run unit tests with:

php artisan test

(not ready yet)

License

Agress is licensed under the MIT License.


Let’s build something incredible with Agress and redefine e-commerce, together!

Live examples, SwabCity.shop

Donate XMR

Donate Monero

Wallet Address: 88Up8HAFvsmZ5Avpf8n9H3ERcjTVvRHSr2nAschx2HYXJFcHXv9h2JWKuuCkBRgUPJZEZj9wjTsvyTS1vBBSuhBnCkqGdo8

Please concider hosting on Opalstack for the world's best support and full support with Agress.

About

Based Commerce

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages