Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
7379276
Rename tickets to products
daveearley Sep 20, 2024
e3b5a72
Update config and tests
daveearley Sep 20, 2024
8871867
Update ticket creation form
daveearley Sep 20, 2024
d007041
Merge branch 'develop' into add-products
daveearley Sep 23, 2024
3a671d0
continued work on migration from tickets to products
daveearley Oct 19, 2024
d64d11f
continued work on migration from tickets to products
daveearley Oct 19, 2024
fcca120
Merge branch 'develop' into add-products
daveearley Oct 20, 2024
b45e09b
Update sorting logic for tickets. Continue work on product migration
daveearley Oct 28, 2024
8a621ec
Merge branch 'develop' into add-products
daveearley Oct 31, 2024
c71df0c
Update tests and order and attendee modals
daveearley Nov 1, 2024
05df93e
Update testHandleUpdatesProductQuantitiesForFreeOrder
daveearley Nov 1, 2024
204f118
Update testHandleDoesNotUpdateProductQuantitiesForPaidOrder
daveearley Nov 1, 2024
18862b1
Update attendees modals/forms
daveearley Nov 4, 2024
23fd4be
Merge pull request #281 from HiEventsDev/develop
daveearley Nov 4, 2024
b006e90
Merge pull request #239 from HiEventsDev/add-products
daveearley Nov 4, 2024
792f723
update migration
daveearley Nov 4, 2024
1592741
i18n
daveearley Nov 4, 2024
e325817
Update stats migration
daveearley Nov 4, 2024
c91299c
Product bug fixes
daveearley Nov 8, 2024
fb6db39
Add event product and daily sales reports
daveearley Nov 8, 2024
5a3e301
fix resend ticket
daveearley Nov 8, 2024
abab1d5
New -> Net
daveearley Nov 8, 2024
8bcdf58
Remove unused classes
daveearley Nov 8, 2024
b0702b9
Fix create attendee
daveearley Nov 12, 2024
64a78f2
Update exceptions
daveearley Nov 14, 2024
9494c9e
Merge branch 'develop' into v1.0.0-alpha
daveearley Nov 15, 2024
0215634
Update collapsable rows
daveearley Nov 15, 2024
79b5580
Merge branch 'v1.0.0-alpha' into feature/add-event-reports
daveearley Nov 15, 2024
2dc6202
Add promo code report
daveearley Nov 16, 2024
f71d42f
update promo code report
daveearley Nov 17, 2024
d27b37d
clean up reports
daveearley Nov 17, 2024
5c4d2da
Merge pull request #285 from HiEventsDev/feature/add-event-reports
daveearley Nov 17, 2024
75506af
i18n
daveearley Nov 17, 2024
0978ba9
unset setup_future_usage
daveearley Nov 17, 2024
9db4961
remove fields
daveearley Nov 17, 2024
272b146
Add setting sidebar
daveearley Nov 17, 2024
3a1ee70
Merge pull request #289 from HiEventsDev/feature/add-settings-sidebar
daveearley Nov 17, 2024
0714748
Update sidebar background
daveearley Nov 17, 2024
e4b1d7a
Improve settings initial load
daveearley Nov 17, 2024
92de2a7
Checkout flow UI improvements
daveearley Nov 22, 2024
5d72612
Merge pull request #293 from HiEventsDev/feature/checkout-flow-UX-imp…
daveearley Nov 22, 2024
4806287
i18n
daveearley Nov 22, 2024
b77024a
Update ICS file description
daveearley Nov 22, 2024
71e4f99
Move Handlers directory
daveearley Nov 22, 2024
a66add4
Merge pull request #296 from HiEventsDev/chore/move-handler-directory
daveearley Nov 22, 2024
808c7fd
Add capacity assignment migration
daveearley Nov 23, 2024
a10852b
Dashboard UI updates
daveearley Nov 27, 2024
8b5d336
i18n
daveearley Nov 27, 2024
92fd1f3
Merge pull request #304 from HiEventsDev/feature/dashboard-ui-updates
daveearley Nov 27, 2024
8041231
Merge branch 'develop' into v1.0.0-alpha
daveearley Dec 9, 2024
82b5491
Add ability to add notes to attendees
daveearley Dec 18, 2024
8de344e
Merge pull request #320 from HiEventsDev/feature/attendee-notes
daveearley Dec 18, 2024
5e997d2
Merge branch 'develop' into v1.0.0-alpha
daveearley Dec 18, 2024
83845a6
Update migration
daveearley Dec 18, 2024
927cbf0
i18n
daveearley Dec 18, 2024
960d9c4
Merge branch 'develop' into v1.0.0-alpha
daveearley Dec 21, 2024
0b8ea8a
Merge fixes
daveearley Dec 21, 2024
a1fe429
Add support for offline payments and invoice generation
daveearley Jan 11, 2025
c6cbb1a
remove dummy keys
daveearley Jan 11, 2025
c6acd75
Update tiptap image extension
daveearley Jan 11, 2025
0604787
Add offline payment support to the check in tool + Add invoicing support
daveearley Jan 17, 2025
03be81e
Add ability to edit order
daveearley Jan 19, 2025
195acba
Add payment provider to order summary
daveearley Jan 19, 2025
96c766a
Add notes to invoices
daveearley Jan 20, 2025
0c268f2
Update tests
daveearley Jan 20, 2025
fa4dae1
Merge pull request #341 from HiEventsDev/feature/offline-payments-and…
daveearley Jan 20, 2025
648a946
i18n
daveearley Jan 20, 2025
fb40a91
Revert "i18n"
daveearley Jan 20, 2025
0d49266
i18n
daveearley Jan 20, 2025
73f18f2
i18n
daveearley Jan 20, 2025
bd7e195
Add default payment provider
daveearley Jan 20, 2025
8268074
Add default payment provider
daveearley Jan 20, 2025
eb723cb
fix message display
daveearley Jan 20, 2025
3577bed
Add account configuration
daveearley Jan 21, 2025
5715b7f
add logging when payment intent not found
daveearley Jan 21, 2025
3a43fb0
fix repo name
daveearley Jan 21, 2025
94aaf76
Prepare codebase for Vapor deployment (#351)
daveearley Feb 1, 2025
75e9501
Improve Stripe event handling (#358)
daveearley Feb 2, 2025
eefb1c6
i18n
daveearley Feb 3, 2025
f1de1a8
Remove lodash
daveearley Feb 3, 2025
94b5e59
Make Stripe Connect account type configurable (#359)
daveearley Feb 3, 2025
2757088
Update .env
daveearley Feb 3, 2025
844fa93
Increase max order export number
daveearley Feb 5, 2025
b9ccedf
Add fathom snippet
daveearley Feb 5, 2025
8a7837a
React-Router v6 -> v7
daveearley Feb 8, 2025
379dde3
Add public Organizer API endpoints (#362)
daveearley Feb 8, 2025
7fdb13a
Add FE deploy (#363)
daveearley Feb 8, 2025
fc5d6ad
Add missing environment variables (#369)
podzz Feb 16, 2025
6d2a678
Feat/applicaiton fee updates (#373)
daveearley Feb 19, 2025
3295c31
Add Webhook Support (#366)
daveearley Feb 19, 2025
ca19cbd
Update orders table
daveearley Feb 19, 2025
6a38a6f
fix bad merge conflict
daveearley Feb 19, 2025
f33d288
Add ability to duplicate Products (#374)
daveearley Feb 19, 2025
a2d7dac
Update Homepage Designer preview (#375)
daveearley Feb 19, 2025
15d02d8
Update test
daveearley Feb 19, 2025
ab25054
Bad merge conflict resolution
daveearley Feb 19, 2025
df9e151
Bad merge conflict resolution
daveearley Feb 20, 2025
f85a72d
Misc bug fixes
daveearley Feb 20, 2025
5a34c4d
fixed translation errors (#354)
leonv5 Feb 20, 2025
c01b04a
i18n (#377)
daveearley Feb 20, 2025
8970574
Login & Register redesign (#378)
daveearley Feb 21, 2025
4ac6812
Style updates
daveearley Feb 21, 2025
9c756f3
Update README.md
daveearley Feb 21, 2025
2fe03c6
Merge branch 'develop' into v1.0.0-alpha
daveearley Feb 21, 2025
5b34818
Update padding
daveearley Feb 21, 2025
158d920
Merge branch 'v1.0.0-alpha' of github.com:HiEventsDev/hi.events into …
daveearley Feb 21, 2025
9e1348d
Update login page image
daveearley Feb 22, 2025
427e19f
i18n
daveearley Feb 22, 2025
e0cbe36
Style updates
daveearley Feb 23, 2025
6c6d183
Update email sending modal
daveearley Feb 24, 2025
a4fccbd
Update Dockerfile.all-in-one
daveearley Feb 24, 2025
7f2dab6
Add back copyright notice
daveearley Feb 24, 2025
f2192c4
Fix: Hide scrollbars on embeddable widget (#381)
daveearley Feb 25, 2025
e843d27
Fix webhook design issues (#385)
daveearley Feb 27, 2025
22e7982
Fix hardcoded answer string (#386)
daveearley Feb 27, 2025
b1191df
Update all-in-one Docker setup (#387)
daveearley Feb 27, 2025
425ecbb
Add wrap for translatable strings (#388)
haiphamhoang Feb 27, 2025
791cc09
Fix incorrect Product and Promo code reports (#389)
daveearley Feb 27, 2025
3229c98
Add Promo Code to Order details page (#390)
daveearley Feb 27, 2025
8ed85a4
Update deploy.yml
daveearley Feb 27, 2025
f61f8d0
Redesign Event Not Found page (#391)
daveearley Feb 27, 2025
a364692
Feature: Add vietnamese language (#383)
haiphamhoang Feb 27, 2025
10da7ca
i18n
daveearley Feb 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
184 changes: 184 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
name: Deploy to Vapor and Frontend

on:
push:
branches:
- main
- develop
workflow_dispatch:
inputs:
environment:
description: 'Environment to deploy to'
required: true
default: 'staging'
type: choice
options:
- staging
- production
test_mode:
description: 'Run in test mode (no actual deployment)'
required: false
default: false
type: boolean

jobs:
backend:
name: Deploy Backend
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
tools: composer:v2
coverage: none

- name: Prepare Laravel Environment
working-directory: ./backend
run: |
mkdir -p bootstrap/cache
chmod -R 775 bootstrap/cache

- name: Prepare HTMLPurifier Cache Directory
working-directory: ./backend
run: |
mkdir -p storage/app/htmlpurifier
chmod -R 775 storage/app/htmlpurifier

- name: Install Dependencies
working-directory: ./backend
run: composer install --no-dev --no-progress --no-scripts --optimize-autoloader

- name: Install Vapor CLI
run: composer global require laravel/vapor-cli

- name: Set Deployment Environment
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "VAPOR_ENV=${{ github.event.inputs.environment }}" >> "$GITHUB_ENV"
echo "TEST_MODE=${{ github.event.inputs.test_mode }}" >> "$GITHUB_ENV"
elif [[ "${{ github.ref_name }}" == "develop" ]]; then
echo "VAPOR_ENV=staging" >> "$GITHUB_ENV"
echo "TEST_MODE=false" >> "$GITHUB_ENV"
else
echo "VAPOR_ENV=production" >> "$GITHUB_ENV"
echo "TEST_MODE=false" >> "$GITHUB_ENV"
fi

- name: Log Branch and Environment
run: |
echo "🚀 Deploying branch ${{ github.ref_name }} to Vapor environment: ${{ env.VAPOR_ENV }}"
echo "🧪 Test mode: ${{ env.TEST_MODE }}"

- name: Validate Deployment Configuration
working-directory: ./backend
run: |
if [[ "${{ env.TEST_MODE }}" == "true" ]]; then
echo "✅ TEST MODE: Would deploy to ${{ env.VAPOR_ENV }} environment"
echo "vapor deploy ${{ env.VAPOR_ENV }} --dry-run"
exit 0
fi

- name: Deploy to Vapor
working-directory: ./backend
run: vapor deploy ${{ env.VAPOR_ENV }}
env:
VAPOR_API_TOKEN: ${{ secrets.VAPOR_API_TOKEN }}

frontend:
name: Deploy Frontend
runs-on: ubuntu-latest
needs: backend

steps:
- uses: actions/checkout@v3

- name: Set Deployment Environment
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
if [[ "${{ github.event.inputs.environment }}" == "staging" ]]; then
echo "DO_APP_ID=${{ secrets.DIGITALOCEAN_STAGING_APP_ID }}" >> "$GITHUB_ENV"
else
echo "DO_APP_ID=${{ secrets.DIGITALOCEAN_PRODUCTION_APP_ID }}" >> "$GITHUB_ENV"
fi
echo "TEST_MODE=${{ github.event.inputs.test_mode }}" >> "$GITHUB_ENV"
elif [[ "${{ github.ref_name }}" == "develop" ]]; then
echo "DO_APP_ID=${{ secrets.DIGITALOCEAN_STAGING_APP_ID }}" >> "$GITHUB_ENV"
echo "TEST_MODE=false" >> "$GITHUB_ENV"
else
echo "DO_APP_ID=${{ secrets.DIGITALOCEAN_PRODUCTION_APP_ID }}" >> "$GITHUB_ENV"
echo "TEST_MODE=false" >> "$GITHUB_ENV"
fi

- name: Log Environment Settings
run: |
echo "🚀 Deploying frontend to DigitalOcean App: ${{ env.DO_APP_ID }}"
echo "🧪 Test mode: ${{ env.TEST_MODE }}"

- name: Validate Deployment Configuration (Test Mode)
if: env.TEST_MODE == 'true'
run: |
echo "✅ TEST MODE: Would trigger deployment for DigitalOcean App: ${{ env.DO_APP_ID }}"
echo "curl -X POST 'https://api.digitalocean.com/v2/apps/${{ env.DO_APP_ID }}/deployments'"
exit 0

- name: Trigger Deployment on DigitalOcean
if: env.TEST_MODE != 'true'
id: trigger_deployment
run: |
RESPONSE=$(curl -s -o response.json -w "%{http_code}" -X POST "https://api.digitalocean.com/v2/apps/$DO_APP_ID/deployments" \
-H "Authorization: Bearer ${{ secrets.DIGITALOCEAN_API_TOKEN }}" \
-H "Content-Type: application/json")

if [ "$RESPONSE" -ne 201 ] && [ "$RESPONSE" -ne 200 ]; then
ERROR_MSG=$(jq -r '.message // "Unknown error occurred."' response.json)
echo "❌ Failed to trigger deployment. HTTP Status: $RESPONSE. Error: $ERROR_MSG"
exit 1
fi

DEPLOYMENT_ID=$(jq -r '.deployment.id' response.json)
if [ "$DEPLOYMENT_ID" == "null" ]; then
echo "❌ Failed to extract deployment ID."
exit 1
fi

echo "::add-mask::$DEPLOYMENT_ID"
echo "✅ Deployment triggered successfully."

echo "deployment_id=$DEPLOYMENT_ID" >> "$GITHUB_ENV"

- name: Poll Deployment Status
if: env.TEST_MODE != 'true'
run: |
# Increase MAX_RETRIES or SLEEP_TIME if your deployments take longer
MAX_RETRIES=30
SLEEP_TIME=10
COUNTER=0

while [ $COUNTER -lt $MAX_RETRIES ]; do
RESPONSE=$(curl -s -X GET "https://api.digitalocean.com/v2/apps/$DO_APP_ID/deployments/${{ env.deployment_id }}" \
-H "Authorization: Bearer ${{ secrets.DIGITALOCEAN_API_TOKEN }}" \
-H "Content-Type: application/json")

STATUS=$(echo "$RESPONSE" | jq -r '.deployment.phase')

echo "🔄 Deployment Status: $STATUS"

if [ "$STATUS" == "ACTIVE" ]; then
echo "✅ Deployment completed successfully."
exit 0
elif [[ "$STATUS" == "FAILED" || "$STATUS" == "CANCELLED" ]]; then
echo "❌ Deployment failed or was cancelled."
exit 1
fi

COUNTER=$((COUNTER + 1))
echo "⏳ Retrying in $SLEEP_TIME seconds... ($COUNTER/$MAX_RETRIES)"
sleep $SLEEP_TIME
done

echo "⏰ Deployment timed out."
exit 1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
frontend/.env
backend/.env
todo.md

.vercel
8 changes: 5 additions & 3 deletions Dockerfile.all-in-one
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,19 @@ RUN apk add --no-cache nodejs yarn nginx supervisor
COPY --from=node-frontend /app/frontend /app/frontend

COPY ./backend /app/backend
RUN chown -R www-data:www-data /app/backend \
RUN mkdir -p /app/backend/bootstrap/cache \
&& mkdir -p /app/backend/storage \
&& chown -R www-data:www-data /app/backend \
&& find /app/backend -type d -exec chmod 755 {} \; \
&& find /app/backend -type f -exec chmod 644 {} \; \
&& chmod -R 777 /app/backend/storage /app/backend/bootstrap/cache \
&& chmod -R 755 /app/backend/storage /app/backend/bootstrap/cache \
&& composer install --working-dir=/app/backend \
--ignore-platform-reqs \
--no-interaction \
--no-dev \
--optimize-autoloader \
--prefer-dist \
&& chmod -R 777 /app/backend/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer
&& chmod -R 755 /app/backend/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer

COPY ./docker/all-in-one/nginx/nginx.conf /etc/nginx/nginx.conf
COPY ./docker/all-in-one/supervisor/supervisord.conf /etc/supervisord.conf
Expand Down
70 changes: 46 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<h3 align="center">Hi.Events</h3>

<p align="center">
<a href="https://demo.hi.events/event/1/dog-conf-2030">Demo Event 🌟</a> • <a href="https://hi.events?utm_source=gh-readme">Website 🌎</a> • <a href="https://hi.events/docs">Documentation 📄</a> • <a href="https://hi.events/docs/getting-started?utm_source=gh-readme">Installation ⚙️</a>
<a href="https://demo.hi.events/event/1/dog-conf-2030">Demo Event 🌟</a> • <a href="https://hi.events?utm_source=gh-readme">Website 🌎</a> • <a href="https://hi.events/docs?utm_source=gh-readme">Documentation 📄</a> • <a href="https://hi.events/docs/getting-started?utm_source=gh-readme">Installation ⚙️</a>
</p>

<h3 align="center">
Expand Down Expand Up @@ -63,34 +63,56 @@
<a href="https://hi.events">Hi.Events</a> is a feature-rich, self-hosted event management and ticketing platform. From conferences to club nights,
Hi.Events is designed to help you create, manage, and sell tickets for events of all sizes.

<img alt="Hi.Events self-hosted ticket selling dashboard" src="https://hievents-public.s3.us-west-1.amazonaws.com/website/dashboard-screenshot.png"/>
<img alt="Hi.Events self-hosted ticket selling dashboard" src="https://hievents-public.s3.us-west-1.amazonaws.com/website/github-readme-screenshot.png"/>
<caption>Generated using <a href="https://screenshot.rocks?utm_source=hi.events-readme">Screenshot Rocks</a></caption>

## 🌟 Features

<a href="https://hi.events">Hi.Events</a> is packed with features to streamline your event management and ticketing:

- 📊 **Event Analytics:** Gain deep insights into event performance and ticket sales.
- 🎟 **Embeddable Ticket Widget:** Easily integrate ticket sales into any website.
- 🖥 **Customizable Event Homepages:** Create eye-catching event pages with flexible design options.
- 🔑 **Intuitive Check-In Tools:** Easily check in attendees at the door with Hi.Events' QR code check-in tool.
- 💬 **Event Messaging Tools:** Message attendees with important updates and reminders.
- 📝 **Custom Order Forms:** Collect attendee information with tailored questions at checkout.
- 🎫 **Multiple Ticket Types:** Free, paid, donation, or tiered ticket types.
- 💸 **Versatile Promo Codes:** Highly versatile discount codes. Pre-sale access, multiple discount options.
- 💰 **Instant Payouts:** Enjoy instant payouts with seamless Stripe integration.
- 🧾 **Tax and Fee Configuration:** Add tax and fees on a per-ticket basis.
- 📦 **Data Exports:** Export attendee and order data to XLSX or CSV.
- 💻 **REST API:** Full-featured REST API for custom integrations.
- 🔍 **SEO Tools:** Customize SEO settings for each event.
- 🛒 **Beautiful Checkout Process:** Ensure a smooth, beautiful checkout experience.
- 🔐 **Role-Based Access:** Support for multiple user roles.
- 💻 **Online Event Support:** Offer online event instructions and links.
- ⏪ **Full and Partial Refund Support:** Manage full and partial refunds with ease.
- 📧 **Email Notifications:** Keep attendees informed with automated email notifications.
- 📱 **Mobile-Responsive:** Enjoy a seamless experience on any device.
- 🌐 **Multi-Language Support:** Support for multiple languages (English, Português, Español, 中文 (Zhōngwén), Deutsch, Français)
- 🔋 **Advanced Capacity Management:** Set capacity limits across multiple ticket types.
- 🎉 **And much more!**
### 🎟 Ticketing & Product Sales
- **Multiple Ticket Types:** Free, Paid, Donation, and Tiered tickets.
- **Capacity Management:** Set event-wide or ticket-specific limits.
- **Capacity Assignments:** Manage shared capacity across multiple ticket types.
- **Promo Codes:** Discount codes for pre-sale access and special offers.
- **Product Sales:** Sell event-related products (e.g., t-shirts, add-ons).
- **Taxes & Fees:** Apply custom taxes and fees per product or order.

### 🏆 Event Management & Customization
- **Event Dashboard:** Real-time revenue, ticket sales, and attendee analytics.
- **Homepage Designer:** Customize event pages with a live preview editor.
- **Embeddable Ticket Widget:** Add a seamless ticketing experience to your website.
- **SEO Tools:** Customize event metadata for better search visibility.
- **Event Categories:** Organize products and tickets with category management.
- **Offline Event Support:** Provide instructions for physical events.

### 📧 Attendee & Order Management
- **Custom Checkout Forms:** Collect attendee details with tailored questions.
- **Attendee Management:** Search, edit, cancel, and message attendees.
- **Order Management:** Refund, cancel, and resend order details easily.
- **Bulk Messaging:** Email or message specific ticket holders.
- **Data Exports:** Export attendees and orders to CSV/XLSX.

### 📱 Mobile-Friendly & Check-In Tools
- **QR Code Check-In:** Web-based and mobile-friendly check-in tool.
- **Check-In Lists:** Generate and share access-controlled check-in lists.
- **Multi-User Access:** Role-based access control for event staff.

### 🔧 Integrations & Automation
- **Webhooks Support:** Automate tasks with Zapier, IFTTT, Make, or CRM integrations.
- **Salesforce & HubSpot Integrations:** Sync attendees and orders automatically.
- **Stripe Connect Integration:** Organizers get instant payouts.

### 📊 Advanced Features
- **Multi-Language Support:** English, Deutsch, Español, Português, Français, 中文 (Zhōngwén), and more.
- **Partial & Full Refunds:** Manage refunds with detailed order tracking.
- **Role-Based Access Control:** Multiple user roles with permission management.
- **REST API:** Full API access for custom integrations.
- **Invoicing System:** Generate and send invoices with tax details, payment terms, and due dates.
- **Offline Payment Support:** Enable bank transfers, cash payments, or custom payment methods.
- **Event Archive:** Archive past events to keep the dashboard organized.
- **Advanced Ticket Locking:** Lock tickets behind promo codes or access restrictions.
- **Advanced Reporting:** Daily sales, tax breakdowns, product sales, and promo code usage reports.

## 🚀 Getting Started

Expand Down
4 changes: 3 additions & 1 deletion backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ APP_SAAS_MODE_ENABLED=false
APP_SAAS_STRIPE_APPLICATION_FEE_PERCENT=1.5
APP_HOMEPAGE_VIEWS_UPDATE_BATCH_SIZE=8
APP_DISABLE_REGISTRATION=false
APP_STRIPE_CONNECT_ACCOUNT_TYPE=express
[email protected]

STRIPE_PUBLIC_KEY=
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=

CORS_ALLOWED_ORIGINS=http://localhost:5173
CORS_ALLOWED_ORIGINS=*

LOG_CHANNEL=stderr
LOG_DEPRECATIONS_CHANNEL=null
Expand Down
2 changes: 2 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
.env
.env.backup
.env.production
.env.staging
.phpunit.result.cache
Homestead.json
Homestead.yaml
Expand All @@ -19,3 +20,4 @@ yarn-error.log
/.vscode
.idea
/app-back
bootstrap/cache
16 changes: 16 additions & 0 deletions backend/app/DomainObjects/AccountConfigurationDomainObject.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace HiEvents\DomainObjects;

class AccountConfigurationDomainObject extends Generated\AccountConfigurationDomainObjectAbstract
{
public function getFixedApplicationFee(): float
{
return $this->getApplicationFees()['fixed'] ?? config('app.default_application_fee_fixed');
}

public function getPercentageApplicationFee(): float
{
return $this->getApplicationFees()['percentage'] ?? config('app.default_application_fee_percentage');
}
}
24 changes: 24 additions & 0 deletions backend/app/DomainObjects/AccountDomainObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@

namespace HiEvents\DomainObjects;

use HiEvents\DomainObjects\DTO\AccountApplicationFeeDTO;

class AccountDomainObject extends Generated\AccountDomainObjectAbstract
{
private ?AccountConfigurationDomainObject $configuration = null;

public function getApplicationFee(): AccountApplicationFeeDTO
{
/** @var AccountConfigurationDomainObject $applicationFee */
$applicationFee = $this->getConfiguration();

return new AccountApplicationFeeDTO(
$applicationFee->getPercentageApplicationFee(),
$applicationFee->getFixedApplicationFee()
);
}

public function getConfiguration(): ?AccountConfigurationDomainObject
{
return $this->configuration;
}

public function setConfiguration(AccountConfigurationDomainObject $configuration): void
{
$this->configuration = $configuration;
}
}
7 changes: 7 additions & 0 deletions backend/app/DomainObjects/ApplicationFeeDomainObject.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace HiEvents\DomainObjects;

class ApplicationFeeDomainObject extends Generated\ApplicationFeeDomainObjectAbstract
{
}
Loading
Loading