├── .circleci
└── config.yml
├── .docker
├── dev
│ ├── app
│ │ ├── Dockerfile
│ │ └── php.ini
│ ├── db
│ │ └── mysql
│ │ │ └── my.cnf
│ └── webserver
│ │ └── nginx
│ │ └── default.conf
└── prod
│ ├── app
│ ├── Dockerfile
│ ├── Dockerfile.lukasz
│ └── php.ini
│ ├── db
│ └── mysql
│ │ └── my.cnf
│ ├── sphinx
│ ├── .gitignore
│ ├── data
│ │ └── .gitignore
│ └── sphinx.conf
│ ├── supervisor
│ ├── Dockerfile
│ └── supervisord.conf
│ └── webserver
│ └── nginx
│ └── default.conf
├── .env.example
├── .env.testing
├── .gitignore
├── .phpunit.cache
└── test-results
├── .rnd
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── DOCUMENTATION.md
├── Dockerfile
├── LICENSE
├── Makefile
├── README.md
├── SECURITY.md
├── aliases.sh
├── app
├── Broadcasting
│ └── Notification.php
├── Console
│ ├── Commands
│ │ ├── SyncWithGeneanum.php
│ │ └── Synchronize
│ │ │ └── CopyPeopleFromTenancyToGenealogy.php
│ └── Kernel.php
├── Contracts
│ └── liberu
│ │ └── files
│ │ ├── Attachable.php
│ │ └── AuthorizesFileAccess.php
├── DynamicRelations
│ └── Company
│ │ ├── Comments.php
│ │ ├── Discussions.php
│ │ └── Documents.php
├── Enums
│ └── Privacy.php
├── Events
│ ├── GedComProgressSent.php
│ ├── MessageSent.php
│ └── ServerCreated.php
├── Exceptions
│ └── Handler.php
├── Http
│ ├── Controllers
│ │ ├── Auth
│ │ │ ├── LoginController.php
│ │ │ ├── RegisterController.php
│ │ │ └── VerificationController.php
│ │ └── Controller.php
│ ├── Kernel.php
│ └── Middleware
│ │ ├── Authenticate.php
│ │ ├── EncryptCookies.php
│ │ ├── InitializeTenancyByDomain.php
│ │ ├── Multitenant.php
│ │ ├── PreventRequestsDuringMaintenance.php
│ │ ├── RedirectIfAuthenticated.php
│ │ ├── TrimStrings.php
│ │ ├── TrustHosts.php
│ │ ├── TrustProxies.php
│ │ ├── VerifyCsrfToken.php
│ │ └── VerifyStripeWebhook.php
├── Jobs
│ ├── DnaMatching.php
│ ├── ExportGedCom.php
│ ├── Geneanum
│ │ ├── Malta
│ │ │ ├── SyncBaptisms.php
│ │ │ ├── SyncBurials.php
│ │ │ ├── SyncCensus.php
│ │ │ ├── SyncMarriages.php
│ │ │ ├── SyncNotaries.php
│ │ │ └── SyncPassports.php
│ │ ├── Sync.php
│ │ └── Tunisia
│ │ │ ├── SyncBirthsNBaptisms.php
│ │ │ ├── SyncBurials.php
│ │ │ └── SyncMarriages.php
│ ├── ImportGedcom.php
│ └── Tenant
│ │ ├── ClearStrg.php
│ │ ├── CreateDB.php
│ │ ├── CreateDBs.php
│ │ ├── DropDB.php
│ │ ├── DropTb.php
│ │ ├── Migration.php
│ │ └── MigrationFresh.php
├── Logic
│ └── Activation
│ │ └── ActivationRepository.php
├── Models
│ ├── Activation.php
│ ├── Company.php
│ ├── Person.php
│ ├── Tenant.php
│ ├── User.php
│ └── UserSocial.php
├── Notifications
│ ├── ResetPassword.php
│ ├── SendActivationEmail.php
│ ├── SubscribeSuccessfully.php
│ └── UnsubscribeSuccessfully.php
├── Providers
│ ├── AppServiceProvider.php
│ ├── AuthServiceProvider.php
│ ├── BroadcastServiceProvider.php
│ ├── CalendarServiceProvider.php
│ ├── EventServiceProvider.php
│ ├── HorizonServiceProvider.php
│ ├── RouteServiceProvider.php
│ ├── TelescopeServiceProvider.php
│ └── TenancyServiceProvider.php
├── Services
│ ├── MixedConnection.php
│ ├── ProfileBuilder.php
│ └── Tenant.php
├── Tenant
│ ├── Manager.php
│ ├── ManagerOld.php
│ └── Middleware
│ │ └── Multitenancy.php
├── Traits
│ ├── ActivationTrait.php
│ ├── ConnectionTrait.php
│ ├── CreatedBy.php
│ ├── Login.php
│ ├── TenantConnectionResolver.php
│ └── UniqueStringTrait.php
└── Upgrades
│ └── DumpActivityLog.php
├── artisan
├── bootstrap
├── app.php
└── cache
│ └── .gitignore
├── composer.json
├── composer.lock
├── config
├── app.php
├── auth.php
├── broadcasting.php
├── cache.php
├── cors.php
├── database.php
├── filesystems.php
├── hashing.php
├── horizon.php
├── insights.php
├── laravolt
│ └── avatar.php
├── liberu
│ ├── addresses.php
│ ├── auth.php
│ ├── charts.php
│ ├── comments.php
│ ├── config.php
│ ├── discussions.php
│ ├── documents.php
│ ├── exports.php
│ ├── files.php
│ ├── forms.php
│ ├── imports.php
│ ├── inspiring.php
│ ├── localisation.php
│ ├── searchable.php
│ ├── select.php
│ ├── tables.php
│ └── themes.php
├── local
│ └── roles
│ │ ├── Agent.php
│ │ ├── monitoring.php
│ │ ├── supervisor.php
│ │ └── user.php
├── logging.php
├── mail.php
├── octane.php
├── paypal.php
├── queue.php
├── recordsapi.php
├── request-docs.php
├── sanctum.php
├── scout.php
├── sentry.php
├── services.php
├── session.php
├── settings.php
├── stats.php
├── telescope.php
├── tenancy.php
└── view.php
├── database
├── .gitignore
├── factories
│ ├── CompanyFactory.php
│ └── UserFactory.php
├── migrations
│ ├── 2014_10_12_100000_create_password_resets_table.php
│ ├── 2017_01_01_112100_create_file_types_table.php
│ ├── 2017_01_01_120000_create_structure_for_dashboard.php
│ ├── 2019_09_15_000010_create_tenants_table.php
│ ├── 2019_09_15_000020_create_domains_table.php
│ ├── 2019_12_14_000001_create_personal_access_tokens_table.php
│ └── 2020_06_30_135250_create_activations_table.php
└── seeders
│ ├── CompanySeeder.php
│ ├── CustomPermissionSeeder.php
│ ├── DatabaseSeeder.php
│ ├── RoleSeeder.php
│ └── UserSeeder.php
├── deployment
└── octane
│ ├── .rr.prod.yaml
│ ├── entrypoint.sh
│ ├── opcache.ini
│ ├── php.ini
│ ├── supervisord.app.conf
│ ├── supervisord.app.roadrunner.conf
│ ├── supervisord.horizon.conf
│ └── utilities.sh
├── docker-compose.dev.yml
├── docker-compose.lukasz.yaml
├── docker-compose.yml
├── lang
├── app
│ ├── ar.json
│ ├── br.json
│ ├── de.json
│ ├── es.json
│ ├── fr.json
│ ├── hu.json
│ ├── mn.json
│ ├── nl.json
│ ├── ro.json
│ └── ru.json
├── ar.json
├── ar
│ ├── auth.php
│ ├── pagination.php
│ ├── passwords.php
│ ├── validation-inline.php
│ └── validation.php
├── br.json
├── br
│ ├── auth.php
│ ├── pagination.php
│ ├── passwords.php
│ └── validation.php
├── de.json
├── de
│ ├── auth.php
│ ├── pagination.php
│ ├── passwords.php
│ ├── validation-inline.php
│ └── validation.php
├── en
│ ├── auth.php
│ ├── pagination.php
│ ├── passwords.php
│ └── validation.php
├── es.json
├── es
│ ├── auth.php
│ ├── pagination.php
│ ├── passwords.php
│ ├── validation-inline.php
│ └── validation.php
├── fr.json
├── fr
│ ├── auth.php
│ ├── pagination.php
│ ├── passwords.php
│ ├── validation-inline.php
│ └── validation.php
├── hu.json
├── hu
│ ├── auth.php
│ ├── pagination.php
│ ├── passwords.php
│ ├── validation-inline.php
│ └── validation.php
├── mn.json
├── mn
│ ├── auth.php
│ ├── pagination.php
│ ├── passwords.php
│ ├── validation-inline.php
│ └── validation.php
├── nl.json
├── nl
│ ├── auth.php
│ ├── pagination.php
│ ├── passwords.php
│ ├── validation-inline.php
│ └── validation.php
├── ro.json
├── ro
│ ├── auth.php
│ ├── pagination.php
│ ├── passwords.php
│ ├── validation-inline.php
│ └── validation.php
├── ru.json
└── ru
│ ├── auth.php
│ ├── pagination.php
│ ├── passwords.php
│ ├── validation-inline.php
│ └── validation.php
├── laravel-echo-server.lock
├── package-lock.json
├── phpunit.xml
├── public
├── .htaccess
├── index.php
├── robots.txt
└── vendor
│ ├── horizon
│ ├── app-dark.css
│ ├── app.css
│ ├── app.js
│ ├── img
│ │ ├── favicon.png
│ │ ├── horizon.svg
│ │ └── sprite.svg
│ └── mix-manifest.json
│ └── telescope
│ ├── app-dark.css
│ ├── app.css
│ ├── app.js
│ ├── favicon.ico
│ └── mix-manifest.json
├── ray.php
├── rector.php
├── resources
├── genetic_map_HapMapII_GRCh37.tar.gz
├── images
│ ├── bulma-logo.png
│ ├── bulma.svg
│ ├── corners
│ │ ├── bottom-center.svg
│ │ ├── bottom-left.svg
│ │ ├── bottom-right.svg
│ │ ├── top-center.svg
│ │ ├── top-left.svg
│ │ └── top-right.svg
│ ├── earthlink.svg
│ ├── emails
│ │ ├── facebook.gif
│ │ ├── googleplus.gif
│ │ └── twitter.gif
│ ├── enso-favicon.png
│ ├── enso.svg
│ ├── favicon.png
│ ├── laravel-badge.png
│ ├── logo.svg
│ ├── made-with-bulma.png
│ └── vue-badge.png
├── preferences.json
└── views
│ ├── callback.blade.php
│ ├── errors
│ └── 503.blade.php
│ ├── stubs
│ └── production-index.blade.stub
│ └── vendor
│ └── mail
│ └── html
│ ├── footer.blade.php
│ └── themes
│ └── enso.css
├── routes
├── api.php
├── channels.php
├── console.php
├── tenant.php
└── web.php
├── server.php
├── storage
├── app
│ └── public
│ │ └── .gitignore
├── framework
│ ├── cache
│ │ └── .gitignore
│ ├── sessions
│ │ └── .gitignore
│ ├── testing
│ │ └── .gitignore
│ └── views
│ │ └── .gitignore
├── logs
│ └── laravel.log
└── public
│ └── .gitignore
├── tests
├── CreatesApplication.php
├── Mocks
│ └── Tree.ged
└── TestCase.php
└── yarn.lock
/.docker/dev/app/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM php:8.1-fpm-bullseye
2 |
3 | # Set working directory
4 | WORKDIR /var/www
5 |
6 | # Install dependencies
7 | #install all the system dependencies and enable PHP modules
8 | RUN apt-get update \
9 | && apt-get -y install --no-install-recommends \
10 | locales \
11 | git \
12 | unzip \
13 | libzip-dev \
14 | libicu-dev \
15 | libonig-dev \
16 | && apt-get clean \
17 | && rm -rf /var/lib/apt/lists/* \
18 | && locale-gen en_US.UTF-8 \
19 | && localedef -f UTF-8 -i en_US en_US.UTF-8 \
20 | && docker-php-ext-install \
21 | intl \
22 | pdo_mysql \
23 | zip \
24 | bcmath
25 |
26 | # Install composer
27 | RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
28 |
29 | #change uid and gid of apache to docker user uid/gid
30 | RUN usermod -u 1000 www-data && groupmod -g 1000 www-data
31 |
32 | # Copy existing application directory contents
33 | #COPY . /var/www
34 |
35 | # Copy existing application directory permissions
36 | RUN chown -R www-data:www-data /var/www
37 |
38 | # Change current user to www-data
39 | USER www-data
40 |
41 |
42 | # Expose port 9000 and start php-fpm server
43 | EXPOSE 9000
44 | CMD ["php-fpm"]
45 |
--------------------------------------------------------------------------------
/.docker/dev/app/php.ini:
--------------------------------------------------------------------------------
1 | [php]
2 |
3 | ; https://www.php.net/manual/en/ini.core.php#ini.memory-limit
4 | memory_limit = 256M
5 |
6 | ; http://php.net/upload-max-filesize
7 | upload_max_filesize = 20M
8 |
9 | ; http://php.net/post-max-size
10 | post_max_size = 20M
11 |
12 | ; https://www.php.net/manual/en/ini.core.php#ini.expose-php
13 | expose_php = 0
14 |
--------------------------------------------------------------------------------
/.docker/dev/db/mysql/my.cnf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laravel-liberu/boilerplate/2069b40bb5ebc69dbaf94b81e4070bea16810fe5/.docker/dev/db/mysql/my.cnf
--------------------------------------------------------------------------------
/.docker/dev/webserver/nginx/default.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80;
3 | index index.php index.html;
4 | error_log /var/log/nginx/error.log;
5 | access_log /var/log/nginx/access.log;
6 | root /var/www/public;
7 | server_name cloud.cyberassessor.net;
8 | client_max_body_size 10M;
9 | location ~ \.php$ {
10 | try_files $uri =404;
11 | fastcgi_split_path_info ^(.+\.php)(/.+)$;
12 | fastcgi_pass app:9000;
13 | fastcgi_index index.php;
14 | include fastcgi_params;
15 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
16 | fastcgi_param PATH_INFO $fastcgi_path_info;
17 | }
18 | location / {
19 | try_files $uri $uri/ /index.php?$query_string;
20 | gzip_static on;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/.docker/prod/app/Dockerfile:
--------------------------------------------------------------------------------
1 | ##
2 | ## PHP Dependencies
3 | ##
4 | #FROM composer:latest as vendor
5 | #
6 | #WORKDIR /
7 | #COPY ./composer.json /composer.json
8 | #
9 | #COPY ./composer.lock /composer.lock
10 | #
11 | #RUN composer install \
12 | # --ignore-platform-reqs \
13 | # --no-interaction \
14 | # --no-plugins \
15 | # --no-scripts \
16 | # --prefer-dist
17 | #
18 | # Application
19 | #
20 |
21 | FROM php:8.2-fpm-bullseye
22 |
23 | ARG BIN_DIR=/usr/local/bin
24 | ARG COMPOSER_VERSION=2.5.5
25 | # Set working directory
26 | COPY . /var/www/
27 | COPY ./.env.example /var/www/.env
28 |
29 | WORKDIR /var/www
30 |
31 | # Install dependencies
32 | #install all the system dependencies and enable PHP modules
33 | RUN apt-get update \
34 | && apt-get -y install --no-install-recommends \
35 | locales \
36 | git \
37 | unzip \
38 | libzip-dev \
39 | libicu-dev \
40 | libonig-dev \
41 | curl \
42 | libmemcached-dev \
43 | libz-dev \
44 | libpq-dev \
45 | libjpeg-dev \
46 | libpng-dev \
47 | libfreetype6-dev \
48 | libssl-dev \
49 | libwebp-dev \
50 | libxpm-dev \
51 | libmcrypt-dev
52 |
53 | RUN apt-get clean
54 | RUN rm -rf /var/lib/apt/lists/* \
55 |
56 | RUN locale-gen en_US.UTF-8 \
57 | && localedef -f UTF-8 -i en_US en_US.UTF-8 \
58 | && docker-php-ext-install \
59 | intl \
60 | pdo_mysql \
61 | zip \
62 | bcmath \
63 | pcntl
64 |
65 | RUN docker-php-ext-configure gd \
66 | --prefix=/usr \
67 | --with-jpeg \
68 | --with-webp \
69 | --with-xpm \
70 | --with-freetype \
71 | && docker-php-ext-install gd
72 |
73 | # Install Composer
74 | RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=${BIN_DIR} --filename=composer --version=${COMPOSER_VERSION} \
75 | && ${BIN_DIR}/composer --version
76 |
77 | #change uid and gid of apache to docker user uid/gid
78 | RUN usermod -u 1000 www-data && groupmod -g 1000 www-data
79 |
80 | # Copy existing application directory permissions
81 | RUN chown -R www-data:www-data /var/www
82 |
83 | # Change current user to www-data
84 | USER www-data
85 |
86 | # Expose port 9000 and start php-fpm server
87 | EXPOSE 9000
88 | CMD ["php-fpm"]
89 |
--------------------------------------------------------------------------------
/.docker/prod/app/Dockerfile.lukasz:
--------------------------------------------------------------------------------
1 | FROM php:8.2-fpm-bullseye
2 | WORKDIR /var/www
3 |
4 | # Set working directory
5 | #COPY . /var/www/
6 | #COPY ./.env.example /var/www/.env
7 | #COPY --from=vendor /app/vendor/ /var/www/vendor/
8 |
9 |
10 | # Install dependencies
11 | #install all the system dependencies and enable PHP modules
12 | RUN apt-get update
13 | RUN apt-get -y install --no-install-recommends
14 | RUN apt-get -y install locales
15 | RUN apt-get -y install git
16 | RUN apt-get -y install unzip
17 | RUN apt-get -y install libzip-dev
18 | RUN apt-get -y install libicu-dev
19 | RUN apt-get -y install libonig-dev
20 | RUN apt-get -y install curl
21 | RUN apt-get -y install libmemcached-dev
22 | RUN apt-get -y install libz-dev
23 | RUN apt-get -y install libpq-dev
24 | RUN apt-get -y install libjpeg-dev
25 | RUN apt-get -y install libpng-dev
26 | RUN apt-get -y install libfreetype6-dev
27 | RUN apt-get -y install libssl-dev
28 | RUN apt-get -y install libwebp-dev
29 | RUN apt-get -y install libxpm-dev
30 | RUN apt-get -y install libmcrypt-dev
31 | RUN locale-gen en_US.UTF-8
32 | RUN localedef -f UTF-8 -i en_US en_US.UTF-8
33 | RUN docker-php-ext-install intl
34 | RUN docker-php-ext-install pdo_mysql
35 | RUN docker-php-ext-install zip
36 | RUN docker-php-ext-install bcmath
37 | RUN docker-php-ext-install pcntl
38 | RUN docker-php-ext-configure gd \
39 | --prefix=/usr \
40 | --with-jpeg \
41 | --with-webp \
42 | --with-xpm \
43 | --with-freetype
44 |
45 | #change uid and gid of apache to docker user uid/gid
46 | RUN usermod -u 1000 www-data && groupmod -g 1000 www-data
47 |
48 | # Copy existing application directory permissions
49 | #RUN chown -R www-data:www-data /var/www
50 |
51 | # Change current user to www-data
52 | USER www-data
53 |
54 | # Expose port 9000 and start php-fpm server
55 | EXPOSE 9000
56 | CMD ["php-fpm"]
57 |
--------------------------------------------------------------------------------
/.docker/prod/app/php.ini:
--------------------------------------------------------------------------------
1 | [php]
2 |
3 | ; https://www.php.net/manual/en/ini.core.php#ini.memory-limit
4 | memory_limit = -1
5 |
6 | ; http://php.net/upload-max-filesize
7 | upload_max_filesize = 20M
8 |
9 | ; http://php.net/post-max-size
10 | post_max_size = 20M
11 |
12 | ; https://www.php.net/manual/en/ini.core.php#ini.expose-php
13 | expose_php = 0
14 |
--------------------------------------------------------------------------------
/.docker/prod/db/mysql/my.cnf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laravel-liberu/boilerplate/2069b40bb5ebc69dbaf94b81e4070bea16810fe5/.docker/prod/db/mysql/my.cnf
--------------------------------------------------------------------------------
/.docker/prod/sphinx/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laravel-liberu/boilerplate/2069b40bb5ebc69dbaf94b81e4070bea16810fe5/.docker/prod/sphinx/.gitignore
--------------------------------------------------------------------------------
/.docker/prod/sphinx/data/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laravel-liberu/boilerplate/2069b40bb5ebc69dbaf94b81e4070bea16810fe5/.docker/prod/sphinx/data/.gitignore
--------------------------------------------------------------------------------
/.docker/prod/sphinx/sphinx.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laravel-liberu/boilerplate/2069b40bb5ebc69dbaf94b81e4070bea16810fe5/.docker/prod/sphinx/sphinx.conf
--------------------------------------------------------------------------------
/.docker/prod/supervisor/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM php:8.1-fpm-alpine
2 |
3 | RUN docker-php-ext-install pdo pdo_mysql
4 |
5 | RUN apk update && apk add --no-cache supervisor
6 |
7 | RUN mkdir -p "/etc/supervisor/logs"
8 |
9 | CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]
10 |
--------------------------------------------------------------------------------
/.docker/prod/supervisor/supervisord.conf:
--------------------------------------------------------------------------------
1 | [supervisord]
2 | logfile=/etc/supervisor/logs/supervisord.log ; main log file; default $CWD/supervisord.log
3 | logfile_maxbytes=5MB ; max main logfile bytes b4 rotation; default 50MB
4 | logfile_backups=10 ; # of main logfile backups; 0 means none, default 10
5 | loglevel=info ; log level; default info; others: debug,warn,trace
6 | pidfile=/tmp/supervisord.pid ; supervisord pidfile; default supervisord.pid
7 | nodaemon=false ; start in foreground if true; default false
8 | minfds=1024 ; min. avail startup file descriptors; default 1024
9 | minprocs=200 ; min. avail process descriptors;default 200
10 |
11 | [rpcinterface:supervisor]
12 | supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
13 |
14 | [supervisorctl]
15 | serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
16 |
17 | [program:laravel-worker]
18 | process_name=%(program_name)s_%(process_num)02d
19 | command=php /var/www/artisan queue:work
20 | autostart=true
21 | autorestart=true
22 | stopasgroup=true
23 | killasgroup=true
24 | numprocs=1
25 | redirect_stderr=true
26 | stdout_logfile=/var/www/storage/logs/worker.log
27 | stopwaitsecs=3600
28 | stdout_logfile_maxbytes=5MB
29 |
--------------------------------------------------------------------------------
/.docker/prod/webserver/nginx/default.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80;
3 | index index.php index.html;
4 | error_log /var/log/nginx/error.log;
5 | access_log /var/log/nginx/access.log;
6 | root /var/www/public;
7 | server_name localhost;
8 | client_max_body_size 10M;
9 | location ~ \.php$ {
10 | try_files $uri =404;
11 | fastcgi_split_path_info ^(.+\.php)(/.+)$;
12 | fastcgi_pass app:9000;
13 | fastcgi_index index.php;
14 | include fastcgi_params;
15 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
16 | fastcgi_param PATH_INFO $fastcgi_path_info;
17 | }
18 | location / {
19 | try_files $uri $uri/ /index.php?$query_string;
20 | gzip_static on;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/.env.example:
--------------------------------------------------------------------------------
1 | COMPOSE_FILE=docker-compose.yml
2 | BASE_IMAGE_DOCKERFILE=./.docker/prod/base/Dockerfile
3 | IMAGE_REGISTRY=familytree365
4 | IMAGE_TAG=latest
5 |
6 | APP_NAME="Liberu Ecommerce"
7 | APP_ENV=local
8 | APP_KEY=base64:2DzJhWedD2gRkRfhK/ENYEBBiQJACDRVfiYg0NdImvw=
9 | APP_DEBUG=true
10 | APP_URL=http://localhost
11 |
12 | OWNER_COMPANY_ID=1
13 | DB_TENANT_DATABASE=tenant
14 |
15 | LOG_CHANNEL=stack
16 | LOG_DEPRECATIONS_CHANNEL=null
17 | LOG_LEVEL=debug
18 |
19 | DB_CONNECTION=mysql
20 | DB_HOST=127.0.0.1
21 | DB_PORT=3306
22 | DB_DATABASE=genealogy
23 | DB_USERNAME=root
24 | DB_PASSWORD=
25 |
26 | BROADCAST_DRIVER=redis
27 | CACHE_DRIVER=array
28 | FILESYSTEM_DISK=local
29 | SESSION_DRIVER=file
30 | SESSION_LIFETIME=120
31 | SESSION_DOMAIN=localhost
32 |
33 | CACHE_LIFETIME=60
34 |
35 | LOGIN_ATTEMPTS_PER_MINUTE=5
36 | PASSWORD_LIFETIME=0
37 | PASSWORD_MIN_LENGTH=6
38 | PASSWORD_MIXED_CASE=0
39 | PASSWORD_NUMERIC=0
40 | PASSWORD_SPECIAL=0
41 |
42 | REDIS_HOST=127.0.0.1
43 | REDIS_PREFIX=
44 | REDIS_PASSWORD=null
45 | REDIS_PORT=6379
46 |
47 | MAIL_MAILER=smtp
48 | MAIL_HOST=smtp.mailtrap.io
49 | MAIL_PORT=2525
50 | MAIL_USERNAME=null
51 | MAIL_PASSWORD=null
52 | MAIL_ENCRYPTION=null
53 | MAIL_FROM_ADDRESS=null
54 | MAIL_FROM_NAME="${APP_NAME}"
55 |
56 | MAILGUN_DOMAIN=
57 | MAILGUN_SECRET=
58 | MAILGUN_ENDPOINT=api.mailgun.net
59 |
60 | AWS_ACCESS_KEY_ID=
61 | AWS_SECRET_ACCESS_KEY=
62 | AWS_DEFAULT_REGION=us-east-1
63 | AWS_BUCKET=
64 | AWS_USE_PATH_STYLE_ENDPOINT=false
65 |
66 | PUSHER_APP_ID=
67 | PUSHER_APP_KEY=
68 | PUSHER_APP_SECRET=
69 | PUSHER_APP_CLUSTER=mt1
70 |
71 | FACEBOOK_CLIENT_ID=
72 | FACEBOOK_CLIENT_SECRET=
73 | FACEBOOK_REDIRECT_URI=
74 |
75 | GOOGLE_CLIENT_ID=
76 | GOOGLE_CLIENT_SECRET=
77 | GOOGLE_REDIRECT_URI=
78 |
79 | GITHUB_CLIENT_ID=
80 | GITHUB_CLIENT_SECRET=
81 | GITHUB_REDIRECT_URI=
82 |
83 | STRIPE_KEY=XXX
84 | STRIPE_SECRET=XXX
85 |
86 | SENTRY_DSN=
87 |
88 | TELESCOPE_ENABLED=0
89 |
90 | ENSO_API_TOKEN=
91 |
92 | WIKITREE_API=
93 |
94 | TINY_MCE_API_KEY=
95 |
96 | SANCTUM_STATEFUL_DOMAINS=localhost,127.0.0.1,127.0.0.1:8000,127.0.0.1:3000,localhost:3000,localhost:8080,::1
97 |
98 | GELATO_API_KEY=x
99 |
100 | LARAVEL_ECHO_SERVER_REDIS_HOST=127.0.0.1
101 | LARAVEL_ECHO_SERVER_REDIS_PORT=6379
102 | LARAVEL_ECHO_SERVER_DEBUG=true
103 |
--------------------------------------------------------------------------------
/.env.testing:
--------------------------------------------------------------------------------
1 | APP_NAME=Liberu
2 | APP_ENV=testing
3 | APP_KEY=base64:GS0VwCqzgSVBnM0Wz/Ig610q86M+GIvyVmzQQvrL7Xw=
4 | APP_DEBUG=true
5 | APP_URL=http://localhost
6 |
7 | OWNER_COMPANY_ID=1
8 | DB_TENANT_DATABASE=tenant
9 |
10 | LOG_CHANNEL=stack
11 |
12 | DB_CONNECTION=mysql
13 | DB_HOST=localhost
14 | DB_PORT=3306
15 | DB_DATABASE=liberu
16 | DB_USERNAME=root
17 | DB_PASSWORD=
18 |
19 | BROADCAST_DRIVER=log
20 | CACHE_DRIVER=file
21 | FILESYSTEM_DISK=local
22 | SESSION_DRIVER=file
23 | SESSION_LIFETIME=120
24 |
25 | CACHE_LIFETIME=60
26 |
27 | LOGIN_ATTEMPTS_PER_MINUTE=5
28 | PASSWORD_LIFETIME=0
29 | PASSWORD_MIN_LENGTH=6
30 | PASSWORD_MIXED_CASE=0
31 | PASSWORD_NUMERIC=0
32 | PASSWORD_SPECIAL=0
33 |
34 | REDIS_HOST=127.0.0.1
35 | REDIS_PASSWORD=null
36 | REDIS_PORT=6379
37 |
38 | MAIL_MAILER=log
39 | MAIL_HOST=
40 | MAIL_PORT=
41 | MAIL_USERNAME=null
42 | MAIL_PASSWORD=null
43 | MAIL_ENCRYPTION=null
44 | MAIL_FROM_ADDRESS=null
45 | MAIL_FROM_NAME="${APP_NAME}"
46 |
47 | MAILGUN_DOMAIN=
48 | MAILGUN_SECRET=
49 | MAILGUN_ENDPOINT=api.mailgun.net
50 |
51 | AWS_ACCESS_KEY_ID=
52 | AWS_SECRET_ACCESS_KEY=
53 | AWS_DEFAULT_REGION=us-east-1
54 | AWS_BUCKET=
55 |
56 | PUSHER_APP_ID=
57 | PUSHER_APP_KEY=
58 | PUSHER_APP_SECRET=
59 | PUSHER_APP_CLUSTER=mt1
60 |
61 | SENTRY_LARAVEL_DSN=
62 |
63 | TELESCOPE_ENABLED=0
64 | SCOUT_DRIVER=null
65 |
66 | ENSO_API_TOKEN=
67 |
68 | TINY_MCE_API_KEY=
69 |
70 | SANCTUM_STATEFUL_DOMAINS=localhost,127.0.0.1,127.0.0.1:8000,127.0.0.1:3000,localhost:3000,localhost:8080,::1
71 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # local
2 | .DS_STORE
3 | .DS_Store
4 | ._*
5 | Homestead.json
6 | Homestead.yaml
7 | /public/*
8 | !/public/robots.txt
9 | !/public/index.php
10 | !/public/.htaccess
11 | !/public/vendor
12 | /resources/views/index.blade.php
13 | /node_modules
14 | /vendor
15 | /packages
16 | .vagrant
17 |
18 | # client
19 | /client/node_modules
20 |
21 | # env
22 | .env
23 | .env.backup
24 | # logs
25 | .phpunit.result.cache
26 | .php_cs
27 | .php_cs.cache
28 | npm-debug.log
29 | yarn-error.log
30 |
31 | # code editors
32 | /.idea
33 | /.vscode
34 | *.suo
35 | *.ntvs*
36 | *.njsproj
37 | *.sln
38 | *.sw*
39 | storage
40 | /.docker/prod/db/dbdata/*
41 | /.docker/dev/db/dbdata/*
42 | .bash_history
43 | .composer/
44 |
--------------------------------------------------------------------------------
/.rnd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/laravel-liberu/boilerplate/2069b40bb5ebc69dbaf94b81e4070bea16810fe5/.rnd
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | Contributions are **welcome** and will be fully **credited**. We accept contributions via Pull Requests on [Github](https://github.com/familytree365/genealogy).
4 |
5 | ## Pull Requests
6 |
7 | - **[PSR-4 Coding Standard.]** The easiest way to apply the conventions is to install [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer).
8 | - **Document any change in behaviour.** Make sure the `README.md` and any other relevant documentation are kept up-to-date.
9 | - **Create feature branches.** Don't ask us to pull from your master branch.
10 | - **One pull request per feature.** If you want to do more than one thing, send multiple pull requests.
11 | - **Send coherent history.** Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
12 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020-2023 Family Tree 365 Ltd
4 | Copyright (c) 2017-2022 laravel-liberu
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Supported Versions
4 |
5 | Use this section to tell people about which versions of your project are
6 | currently being supported with security updates.
7 |
8 | | Version | Supported |
9 | | ------- | ------------------ |
10 | | 5.1.x | :white_check_mark: |
11 | | 5.0.x | :x: |
12 | | 4.0.x | :white_check_mark: |
13 | | < 4.0 | :x: |
14 |
15 | ## Reporting a Vulnerability
16 |
17 | Use this section to tell people how to report a vulnerability.
18 |
19 | Tell them where to go, how often they can expect to get an update on a
20 | reported vulnerability, what to expect if the vulnerability is accepted or
21 | declined, etc.
22 |
--------------------------------------------------------------------------------
/aliases.sh:
--------------------------------------------------------------------------------
1 | #TODO: feature 'salo' app that forwards common calls
2 |
3 | # Execute command from the app container by the current user
4 | alias api='docker-compose -f docker-compose.dev.yml exec --user "$(id -u):$(id -g)" app'
5 |
6 | # Execute command from specified container
7 | alias from='docker-compose -f docker-compose.dev.yml exec'
8 |
9 | # Execute command from specified container by the current user
10 | alias owning='docker-compose -f docker-compose.dev.yml exec --user "$(id -u):$(id -g)"'
11 |
12 | # Run artisan commands
13 | alias artisan='docker-compose -f docker-compose.dev.yml exec --user "$(id -u):$(id -g)" app php artisan'
14 |
15 | # Testing aliases
16 | alias test='docker-compose -f docker-compose.dev.yml exec app vendor/bin/phpunit'
17 | alias tf='docker-compose -f docker-compose.dev.yml exec app vendor/bin/phpunit --filter'
18 | alias ts='docker-compose -f docker-compose.dev.yml exec app vendor/bin/phpunit --testsuite'
19 |
--------------------------------------------------------------------------------
/app/Broadcasting/Notification.php:
--------------------------------------------------------------------------------
1 | option('test') !== 'false';
39 |
40 | Sync::$is_testing = $is_testing;
41 |
42 | dispatch(new SyncMaltaBaptisms());
43 | dispatch(new SyncMaltaBurials());
44 | dispatch(new SyncMaltaCensus());
45 | dispatch(new SyncMaltaMarriages());
46 | dispatch(new SyncMaltaNotaries());
47 | dispatch(new SyncMaltaPassports());
48 | dispatch(new SyncTunisiaBirthsNBaptisms());
49 | dispatch(new SyncTunisiaBurials());
50 | dispatch(new SyncTunisiaMarriages());
51 |
52 | return 0;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/app/Console/Commands/Synchronize/CopyPeopleFromTenancyToGenealogy.php:
--------------------------------------------------------------------------------
1 | first()?->updated_at;
34 | $this->info('Tenant people records syncronization since: '.($recordsSince ?: 'start'));
35 |
36 | tenancy()->query()->cursor()->each(function (Tenant $tenant) use ($recordsSince) {
37 | try {
38 | tenancy()->initialize($tenant);
39 |
40 | $tenantPersonQuery = Person::query();
41 |
42 | if ($recordsSince) {
43 | $tenantPersonQuery->where('updated_at', '>=', $recordsSince);
44 | }
45 |
46 | $this->info('Processing tenant #'.$tenant->id.' records: '.(clone $tenantPersonQuery)->count());
47 | $tenantPersonQuery->chunk(100, function ($people) use ($tenant) {
48 | // clear old records and push updated ones
49 | TenantPerson::where('tenant_id', $tenant->id)
50 | ->whereIn('tenant_person_id', $people->pluck('id'))
51 | ->delete();
52 |
53 | foreach ($people as $person) {
54 | $personData = $person->toArray();
55 | unset($personData['id']);
56 | $personData['tenant_id'] = $tenant->id;
57 | $personData['tenant_person_id'] = $person->id;
58 |
59 | (new TenantPerson($personData))->save();
60 | }
61 | });
62 |
63 | tenancy()->end();
64 | } catch (\Exception) {
65 | }
66 | });
67 |
68 | return Command::SUCCESS;
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/app/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | schedule = $schedule;
22 |
23 | $this->pruneFailedJobs()
24 | ->horizonSnapshot();
25 |
26 | if (App::isProduction()) {
27 | }
28 | }
29 |
30 | protected function commands()
31 | {
32 | $this->load(__DIR__.'/Commands');
33 |
34 | require base_path('routes/console.php');
35 | }
36 |
37 | private function pruneFailedJobs(): self
38 | {
39 | $this->schedule->command('queue:prune-failed', ['--hours' => 7 * 24])
40 | ->weekly();
41 |
42 | return $this;
43 | }
44 |
45 | private function horizonSnapshot(): void
46 | {
47 | $this->schedule->command('horizon:snapshot')
48 | ->everyFiveMinutes();
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/app/Contracts/liberu/files/Attachable.php:
--------------------------------------------------------------------------------
1 | $this->morphMany(Comment::class, 'commentable');
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/DynamicRelations/Company/Discussions.php:
--------------------------------------------------------------------------------
1 | $this->morphMany(Discussion::class, 'discussable');
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/DynamicRelations/Company/Documents.php:
--------------------------------------------------------------------------------
1 | $this->morphMany(Document::class, 'documentable');
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/Enums/Privacy.php:
--------------------------------------------------------------------------------
1 | 'key',
28 | ];
29 | }
30 | }
31 | // class GedComProgressSent extends \GenealogiaWebsite\LaravelGedcom\Events\GedComProgressSent
32 | // {
33 | // }
34 |
--------------------------------------------------------------------------------
/app/Events/MessageSent.php:
--------------------------------------------------------------------------------
1 | message = $message;
30 | $this->user = $user;
31 | }
32 |
33 | /**
34 | * Determine if this event should broadcast.
35 | */
36 | public function broadcastWhen(): bool
37 | {
38 | // return $this->conversation->status == 1;
39 | return true;
40 | }
41 |
42 | /**
43 | * Get the data to broadcast.
44 | *
45 | * @return array
46 | */
47 | public function broadcastWith()
48 | {
49 | return [
50 | 'user' => $this->user,
51 | 'message' => $this->message,
52 | 'conversation' => $this->conversation,
53 | ];
54 | }
55 |
56 | /**
57 | * Get the channels the event should broadcast on.
58 | *
59 | * @return \Illuminate\Broadcasting\Channel|array
60 | */
61 | public function broadcastOn()
62 | {
63 | return new PrivateChannel('chat');
64 | }
65 |
66 | public function broadcastAs(): string
67 | {
68 | return 'MessageSent';
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/app/Events/ServerCreated.php:
--------------------------------------------------------------------------------
1 | shouldReport($exception)) {
24 | Sentry::report($exception);
25 | }
26 |
27 | parent::report($exception);
28 | }
29 |
30 | // public function register()
31 | // {
32 | // $this->reportable(function (Throwable $e) {
33 | //
34 | // });
35 | // }
36 | }
37 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/VerificationController.php:
--------------------------------------------------------------------------------
1 | all();
31 | $this->validator($data)->validate();
32 | $token = $request->get('token');
33 | $activation = Activation::where('token', $token)->first();
34 | if ($activation === null) {
35 | return response()->json(
36 | [
37 | 'error' => [
38 | 'code' => 300,
39 | 'message' => 'Send activation code again.',
40 | ],
41 | ],
42 | Response::HTTP_UNPROCESSABLE_ENTITY
43 | );
44 | }
45 | $user_id = $activation->user_id;
46 | $user = User::find($user_id);
47 | if ($user === null) {
48 | return response()->json(
49 | [
50 | 'error' => [
51 | 'code' => 301,
52 | 'message' => 'There is not such user.',
53 | ],
54 | ],
55 | Response::HTTP_UNPROCESSABLE_ENTITY
56 | );
57 | }
58 | $user->is_active = 1;
59 | $user->email_verified_at = date('Y-m-d H:i:s');
60 | $user->save();
61 | Activation::where('user_id', $user_id)->delete();
62 |
63 | return response()->json([
64 | 'csrfToken' => csrf_token(),
65 | ]);
66 | }
67 |
68 | protected function validator(array $data)
69 | {
70 | return Validator::make($data, [
71 | 'token' => ['required', 'string', 'max:255'],
72 | ]);
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Controller.php:
--------------------------------------------------------------------------------
1 | getHost(), config('tenancy.central_domains'), true)) {
19 | return $next($request);
20 | }
21 |
22 | return $this->initalizeTenancy($request, $next, $request->getHost());
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/Http/Middleware/Multitenant.php:
--------------------------------------------------------------------------------
1 | get();
20 | // Log::debug();
21 |
22 | $user = \Auth::user();
23 | \Session::get('conn');
24 | //$value = \Session::get('db');
25 | if ($user->isAdmin()) {
26 | $key = 'database.connections.mysql.database';
27 | $value = env('DB_DATABASE', 'liberu');
28 | } else {
29 | $key = 'database.connections.tenantdb.database';
30 | if (session()->get('db')) {
31 | $value = session()->get('db');
32 | } else {
33 | $company = $user->person->company();
34 | // dd($company);
35 | $tenants = \App\Models\Tenant::find($company->id);
36 | // dd($tenants);
37 | $value = $tenants->tenancy_db_name;
38 | }
39 | }
40 | // Log::debug($value);
41 | // Log::debug('Avatar-'.$user->avatar);
42 | // Log::debug($company);
43 | session()->put('db', $value);
44 | config([$key => $value]);
45 | \DB::connection('tenantdb')->getDatabaseName();
46 | // Log::debug('DB-'.$databaseName);
47 |
48 | //Family::setConnection();
49 | // config(['database.default'=>'tenant']);
50 | /*}/*else {
51 | config(['database.default'=>'mysql']);
52 | }*/
53 |
54 | /*if ($request->has('_tenantId')) {
55 | $request->request->remove('_tenantId');
56 | }*/
57 | return $next($request);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/app/Http/Middleware/PreventRequestsDuringMaintenance.php:
--------------------------------------------------------------------------------
1 | check()) {
18 | return redirect(RouteServiceProvider::HOME);
19 | }
20 | }
21 |
22 | return $next($request);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrimStrings.php:
--------------------------------------------------------------------------------
1 | allSubdomainsOfApplicationUrl(),
13 | ];
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrustProxies.php:
--------------------------------------------------------------------------------
1 | getContent(),
26 | $request->header('Stripe-Signature'),
27 | \Config::get('services.stripe.webhook'),
28 | null
29 | );
30 | } catch (SignatureVerificationException $exception) {
31 | throw new AccessDeniedHttpException($exception->getMessage(), $exception);
32 | }
33 |
34 | return $next($request);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/Jobs/Geneanum/Malta/SyncBaptisms.php:
--------------------------------------------------------------------------------
1 | $date,
40 | 'name' => $name,
41 | 'first_name' => $first_name,
42 | 'sex' => $sex,
43 | 'father_first_name' => $father_first_name,
44 | 'father_is_dead' => $father_is_dead,
45 | 'mother_name' => $mother_name,
46 | 'mother_first_name' => $mother_first_name,
47 | 'mother_is_dead' => $mother_is_dead,
48 | 'observation1' => $observation1,
49 | 'observation2' => $observation2,
50 | 'observation3' => $observation3,
51 | 'observation4' => $observation4,
52 | 'officer' => $officer,
53 | 'parish' => $parish,
54 | 'source' => $source,
55 | 'update' => $update,
56 | ];
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/app/Jobs/Geneanum/Malta/SyncBurials.php:
--------------------------------------------------------------------------------
1 | $date,
44 | 'name' => $name,
45 | 'first_name' => $first_name,
46 | 'age' => $age,
47 | 'father_first_name' => $father_first_name,
48 | 'father_is_dead' => $father_is_dead,
49 | 'mother_name' => $mother_name,
50 | 'mother_first_name' => $mother_first_name,
51 | 'mother_is_dead' => $mother_is_dead,
52 | 'spouse_name' => $spouse_name,
53 | 'spouse_first_name' => $spouse_first_name,
54 | 'spouse_dcd' => $spouse_dcd,
55 | 'spouse_father_first_name' => $spouse_father_first_name,
56 | 'spouse_father_is_dead' => $spouse_father_is_dead,
57 | 'spouse_mother_name' => $spouse_mother_name,
58 | 'spouse_mother_first_name' => $spouse_mother_first_name,
59 | 'spouse_mother_is_dead' => $spouse_mother_is_dead,
60 | 'observation1' => $observation1,
61 | 'observation2' => $observation2,
62 | 'parish' => $parish,
63 | 'source' => $source,
64 | ];
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/app/Jobs/Geneanum/Malta/SyncCensus.php:
--------------------------------------------------------------------------------
1 | $order_no,
35 | 'parish' => $parish,
36 | 'year' => $year,
37 | 'family_no' => $family_no,
38 | 'first_name' => $first_name,
39 | 'last_name' => $last_name,
40 | 'age' => $age,
41 | 'observation1' => $observation1,
42 | 'inferred_birth' => $inferred_birth,
43 | 'observation2' => $observation2,
44 | 'observation3' => $observation3,
45 | 'source' => $source,
46 | ];
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/app/Jobs/Geneanum/Malta/SyncPassports.php:
--------------------------------------------------------------------------------
1 | $dead,
40 | 'first_name' => $first_name,
41 | 'last_name' => $last_name,
42 | 'dad' => $dad,
43 | 'dcd' => $dcd,
44 | 'husband' => $husband,
45 | 'dcd2' => $dcd2,
46 | 'date_of_birth' => $date_of_birth,
47 | 'birth' => $birth,
48 | 'age' => $age,
49 | 'job' => $job,
50 | 'residence' => $residence,
51 | 'destination' => $destination,
52 | 'can_read' => $can_read,
53 | 'obs' => $obs,
54 | 'index' => $index,
55 | 'no' => $no,
56 | ];
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/app/Jobs/Geneanum/Tunisia/SyncBirthsNBaptisms.php:
--------------------------------------------------------------------------------
1 | $pictures,
35 | 'date_of_birth' => $date_of_birth,
36 | 'town_hall' => $town_hall,
37 | 'baptism_date' => $baptism_date,
38 | 'parish' => $parish,
39 | 'last_name' => $last_name,
40 | 'first_name' => $first_name,
41 | 'father_first_name' => $father_first_name,
42 | 'mother_name' => $mother_name,
43 | 'mother_first_name' => $mother_first_name,
44 | 'directory' => $directory,
45 | 'observation' => $observation,
46 | ];
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/app/Jobs/Geneanum/Tunisia/SyncBurials.php:
--------------------------------------------------------------------------------
1 | $photos,
36 | 'death_date' => $death_date,
37 | 'town' => $town,
38 | 'burial_date' => $burial_date,
39 | 'parish' => $parish,
40 | 'name' => $name,
41 | 'first_name' => $first_name,
42 | 'father_first_name' => $father_first_name,
43 | 'mother_name' => $mother_name,
44 | 'mother_first_name' => $mother_first_name,
45 | 'spouse_name' => $spouse_name,
46 | 'index' => $index,
47 | 'observation' => $observation,
48 | ];
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/app/Jobs/Geneanum/Tunisia/SyncMarriages.php:
--------------------------------------------------------------------------------
1 | $photos,
40 | 'civil_date' => $civil_date,
41 | 'town' => $town,
42 | 'date' => $date,
43 | 'parish' => $parish,
44 | 'husband_name' => $husband_name,
45 | 'husband_first_name' => $husband_first_name,
46 | 'husband_father_first_name' => $husband_father_first_name,
47 | 'husband_mother_name' => $husband_mother_name,
48 | 'husband_mother_first_name' => $husband_mother_first_name,
49 | 'wife_name' => $wife_name,
50 | 'wife_first_name' => $wife_first_name,
51 | 'wife_father_first_name' => $wife_father_first_name,
52 | 'wife_mother_name' => $wife_mother_name,
53 | 'wife_mother_first_name' => $wife_mother_first_name,
54 | 'index' => $index,
55 | 'observation' => $observation,
56 | ];
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/app/Jobs/ImportGedcom.php:
--------------------------------------------------------------------------------
1 | filePath), \Exception::class, "{$this->filePath} does not exist.");
31 |
32 | $tenant = Manager::fromModel($this->user->company(), $this->user);
33 | if (! $tenant->databaseExists()) {
34 | //$tenant->dropDatabase();
35 | $tenant->createDatabase();
36 | $tenant->connect();
37 | $tenant->migrateDatabase();
38 | }
39 | $tenant->connect();
40 | $slug = $this->slug ?? Str::uuid();
41 |
42 | $job = ImportJob::on($tenant->connectionName())->create([
43 | 'user_id' => $this->user->getKey(),
44 | 'status' => 'queue',
45 | 'slug' => $slug,
46 | ]);
47 | $parser = new GedcomParser();
48 |
49 | $parser->parse($tenant->connectionName(), $this->filePath, $slug, true);
50 | // with(new GedcomParser())->parse($tenant->connectionName(), $this->filePath, $slug, true);
51 |
52 | File::delete($this->filePath);
53 |
54 | $job->update(['status' => 'complete']);
55 |
56 | $tenant->disconnect();
57 |
58 | return 0;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/app/Jobs/Tenant/ClearStrg.php:
--------------------------------------------------------------------------------
1 | tenant = $tenant;
29 |
30 | // $this->queue = 'light';
31 | }
32 |
33 | /**
34 | * Execute the job.
35 | *
36 | * @return void
37 | */
38 | public function handle()
39 | {
40 | Tenant::set($this->tenant);
41 |
42 | Storage::deleteDirectory($this->tenantPath());
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/Jobs/Tenant/CreateDB.php:
--------------------------------------------------------------------------------
1 | $this->tenant->id,
37 | ]);
38 |
39 | //
40 | // Tenant::set($this->tenant);
41 | // DB::statement('CREATE DATABASE '.$this->tenantDatabase());
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/app/Jobs/Tenant/CreateDBs.php:
--------------------------------------------------------------------------------
1 | $this->tenant->id,
35 | ]);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/Jobs/Tenant/DropDB.php:
--------------------------------------------------------------------------------
1 | queue = 'light';
27 | }
28 |
29 | /**
30 | * Execute the job.
31 | *
32 | * @return void
33 | */
34 | public function handle()
35 | {
36 | Tenant::set($this->tenant);
37 |
38 | DB::statement('DROP DATABASE '.$this->tenantDatabase());
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/Jobs/Tenant/DropTb.php:
--------------------------------------------------------------------------------
1 | queue = 'light';
27 | }
28 |
29 | /**
30 | * Execute the job.
31 | *
32 | * @return void
33 | */
34 | public function handle()
35 | {
36 | Tenant::set($this->tenant);
37 |
38 | DB::connection(Connections::Tenant)
39 | ->getSchemaBuilder()
40 | ->dropAllTables();
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/app/Jobs/Tenant/MigrationFresh.php:
--------------------------------------------------------------------------------
1 | queue = 'sync';
27 | }
28 |
29 | /**
30 | * Execute the job.
31 | *
32 | * @return void
33 | */
34 | public function handle()
35 | {
36 | Tenant::set($this->tenant);
37 | $company = Tenant::get();
38 |
39 | Artisan::call('migrate:fresh', [
40 | '--database' => $company,
41 | '--path' => '/database/migrations/tenant',
42 | '--force' => true,
43 | ]);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/Models/Activation.php:
--------------------------------------------------------------------------------
1 | 'datetime',
23 | 'birthday' => 'datetime',
24 | 'deathday' => 'datetime',
25 | 'burial_day' => 'datetime',
26 | 'chan' => 'datetime',
27 | ];
28 |
29 | protected $guarded = ['id'];
30 |
31 | protected $fillable = [
32 | 'gid',
33 | 'givn',
34 | 'surn',
35 | 'sex',
36 | 'child_in_family_id',
37 | 'description',
38 | 'titl', 'name', 'appellative', 'email', 'phone', 'birthday',
39 | 'deathday', 'burial_day', 'bank', 'bank_account', 'chan', 'rin', 'resn', 'rfn', 'afn',
40 | ];
41 |
42 | public function fullname(): string
43 | {
44 | return $this->givn . ' ' . $this->surn;
45 | }
46 |
47 | public function getSex(): string
48 | {
49 | if ($this->sex === 'F') {
50 | return 'Female';
51 | }
52 |
53 | return 'Male';
54 | }
55 |
56 | public static function getList()
57 | {
58 | $persons = self::get();
59 | $result = [];
60 | foreach ($persons as $person) {
61 | $result[$person->id] = $person->fullname();
62 | }
63 |
64 | return collect($result);
65 | }
66 |
67 | public static function bootUpdatedBy()
68 | {
69 | self::creating(fn($model) => $model->setUpdatedBy());
70 |
71 | self::updating(fn($model) => $model->setUpdatedBy());
72 | }
73 |
74 | public function setUpdatedBy()
75 | {
76 | if (!is_dir(storage_path('app/public'))) {
77 | // dir doesn't exist, make it
78 | File::makeDirectory(storage_path() . '/app/public', 0777, true);
79 | }
80 |
81 | file_put_contents(storage_path('app/public/file.txt'), $this->connection);
82 | if ($this->connection !== 'tenant' && Auth::check()) {
83 | $this->updated_by = Auth::id();
84 | }
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/app/Models/Tenant.php:
--------------------------------------------------------------------------------
1 | hasMany(UserSocial::class, 'user_id', 'id');
28 | }
29 |
30 | public function avatar()
31 | {
32 | return $this->hasOne(Avatar::class, 'user_id', 'id');
33 | }
34 |
35 | public function getNameAttribute()
36 | {
37 | return $this->person?->name;
38 | }
39 |
40 | public function hasSocialLinked($service): bool
41 | {
42 | return (bool) $this->social->where('service', $service)->count();
43 | }
44 |
45 | public function messages()
46 | {
47 | return $this->hasMany(Message::class);
48 | }
49 |
50 | public function convOne()
51 | {
52 | return $this->belongsTo(Conversation::class, 'user_one');
53 | }
54 |
55 | public function convTwo()
56 | {
57 | return $this->belongsTo(Conversation::class, 'user_two');
58 | }
59 |
60 | public function conversations()
61 | {
62 | return $this->convOne->merage($this->convTwo);
63 | }
64 |
65 | public function sendPasswordResetNotification($token)
66 | {
67 | $this->notify(new ResetPassword($token));
68 | }
69 | // public function avatar()
70 | // {
71 | // return $this->hasOne(\Avatar::class);
72 | // }
73 |
74 | // private function getIdAttribute($value='')
75 | // {
76 | // $this->id=1;
77 | // }
78 | }
79 |
--------------------------------------------------------------------------------
/app/Models/UserSocial.php:
--------------------------------------------------------------------------------
1 | hasOne(User::class, 'id', 'user_id');
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/Notifications/ResetPassword.php:
--------------------------------------------------------------------------------
1 | token.'&email='.$notifiable->email;
29 |
30 | return (new MailMessage())
31 | ->subject("[ {$appName} ] {$this->title()}")
32 | ->markdown('laravel-liberu/core::emails.reset', [
33 | 'name' => $notifiable->person->name,
34 | 'url' => $url,
35 | ]);
36 | }
37 |
38 | private function title(): string
39 | {
40 | return __('Reset password request');
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/app/Notifications/SendActivationEmail.php:
--------------------------------------------------------------------------------
1 | onQueue('social');
24 | }
25 |
26 | /**
27 | * Get the notification's delivery channels.
28 | *
29 | * @return array
30 | */
31 | public function via(mixed $notifiable)
32 | {
33 | return ['mail'];
34 | }
35 |
36 | /**
37 | * Get the mail representation of the notification.
38 | *
39 | * @return \Illuminate\Notifications\Messages\MailMessage
40 | */
41 | public function toMail(mixed $notifiable)
42 | {
43 | $baseUrl = env('APP_URL');
44 | $url = $baseUrl.'/verify?token='.$this->token;
45 | $message = new MailMessage();
46 | $message->subject(trans('emails.activationSubject'))
47 | ->greeting(trans('emails.activationGreeting'))
48 | ->line(trans('emails.activationMessage'))
49 | ->action(trans('emails.activationButton'), $url)
50 | ->line($this->token)
51 | ->line(trans('emails.activationThanks'));
52 |
53 | return $message;
54 | }
55 |
56 | /**
57 | * Get the array representation of the notification.
58 | *
59 | * @return array
60 | */
61 | public function toArray(mixed $notifiable)
62 | {
63 | return [
64 |
65 | ];
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/app/Notifications/SubscribeSuccessfully.php:
--------------------------------------------------------------------------------
1 | plan = is_array($plan_id) ? $stripe->plans->retrieve($plan_id['planId']) : $stripe->plans->retrieve($plan_id);
24 | }
25 |
26 | /**
27 | * Get the notification's delivery channels.
28 | *
29 | * @return array
30 | */
31 | public function via(mixed $notifiable)
32 | {
33 | return ['mail'];
34 | }
35 |
36 | /**
37 | * Get the mail representation of the notification.
38 | *
39 | * @return \Illuminate\Notifications\Messages\MailMessage
40 | */
41 | public function toMail(mixed $notifiable)
42 | {
43 | return (new MailMessage())
44 | ->subject('subscribed Successfully!')
45 | ->line('You have subscribed successfully!')
46 | ->line('Subscription Plan:'.$this->plan->nickname)
47 | ->line('Thank you for using Genealogia!');
48 | }
49 |
50 | /**
51 | * Get the array representation of the notification.
52 | *
53 | * @return array
54 | */
55 | public function toArray(mixed $notifiable)
56 | {
57 | return [
58 |
59 | ];
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/app/Notifications/UnsubscribeSuccessfully.php:
--------------------------------------------------------------------------------
1 | plan = $stripe->plans->retrieve($plan_id);
24 | }
25 |
26 | /**
27 | * Get the notification's delivery channels.
28 | *
29 | * @return array
30 | */
31 | public function via(mixed $notifiable)
32 | {
33 | return ['mail'];
34 | }
35 |
36 | /**
37 | * Get the mail representation of the notification.
38 | *
39 | * @return \Illuminate\Notifications\Messages\MailMessage
40 | */
41 | public function toMail(mixed $notifiable)
42 | {
43 | return (new MailMessage())
44 | ->subject('Unsubscribed Successfully!')
45 | ->line('You have unsubscribed successfully!')
46 | ->line('Subscription Plan:'.$this->plan->nickname)
47 | ->line('Thank you for using Genealogia!');
48 | }
49 |
50 | /**
51 | * Get the array representation of the notification.
52 | *
53 | * @return array
54 | */
55 | public function toArray(mixed $notifiable)
56 | {
57 | return [
58 |
59 | ];
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/app/Providers/AppServiceProvider.php:
--------------------------------------------------------------------------------
1 | User::class,
19 | ];
20 |
21 | public function boot()
22 | {
23 | Schema::defaultStringLength(191);
24 | /**
25 | * @docs https://stackoverflow.com/questions/49746440/laravel-artisan-use-of-undefined-constant-stdin-assumed-stdin-infinite-loop
26 | */
27 | // if (!defined('STDIN')) {
28 | // define('STDIN', fopen('php://stdin', 'r'));
29 | // }
30 | }
31 |
32 | public function register()
33 | {
34 | Methods::bind(Company::class, [Comments::class, Discussions::class, Documents::class]);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/Providers/AuthServiceProvider.php:
--------------------------------------------------------------------------------
1 | registerPolicies();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/Providers/BroadcastServiceProvider.php:
--------------------------------------------------------------------------------
1 | register);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/Providers/EventServiceProvider.php:
--------------------------------------------------------------------------------
1 | [
11 | 'App\Listeners\EventListener',
12 | ],
13 | ];
14 |
15 | public function boot()
16 | {
17 | }
18 |
19 | public function shouldDiscoverEvents()
20 | {
21 | return false;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/app/Providers/HorizonServiceProvider.php:
--------------------------------------------------------------------------------
1 | $user?->isAdmin());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Providers/RouteServiceProvider.php:
--------------------------------------------------------------------------------
1 | configureRateLimiting();
18 |
19 | $this->mapApiRoutes();
20 |
21 | $this->mapWebRoutes();
22 | }
23 |
24 | protected function mapWebRoutes()
25 | {
26 | // Route::middleware('web')
27 | // ->namespace($this->namespace)
28 | // ->group(base_path('routes/web.php'));
29 | foreach ($this->centralDomains() as $domain) {
30 | Route::middleware('web')
31 | ->domain($domain)
32 | ->namespace($this->namespace)
33 | ->group(base_path('routes/web.php'));
34 | }
35 | }
36 |
37 | protected function mapApiRoutes()
38 | {
39 | // Route::prefix('api')
40 | // ->middleware('api')
41 | // ->namespace($this->namespace)
42 | // ->group(base_path('routes/api.php'));
43 | foreach ($this->centralDomains() as $domain) {
44 | Route::prefix('api')
45 | ->domain($domain)
46 | ->middleware('api')
47 | ->namespace($this->namespace)
48 | ->group(base_path('routes/api.php'));
49 | }
50 | }
51 |
52 | protected function configureRateLimiting()
53 | {
54 | RateLimiter::for('api', fn () => App::runningUnitTests()
55 | ? Limit::none()
56 | : Limit::perMinute(1000));
57 | }
58 |
59 | protected function centralDomains(): array
60 | {
61 | return config('tenancy.central_domains');
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/app/Providers/TelescopeServiceProvider.php:
--------------------------------------------------------------------------------
1 | hideSensitiveRequestDetails();
17 |
18 | Telescope::filter(fn (IncomingEntry $entry) => $this->app->isLocal()
19 | || $entry->isReportableException()
20 | || $entry->isFailedJob()
21 | || $entry->isScheduledTask()
22 | || $entry->hasMonitoredTag());
23 | }
24 |
25 | protected function hideSensitiveRequestDetails()
26 | {
27 | if (! $this->app->isLocal()) {
28 | Telescope::hideRequestParameters(['_token']);
29 | Telescope::hideRequestHeaders(['cookie', 'x-csrf-token', 'x-xsrf-token']);
30 | }
31 | }
32 |
33 | protected function gate()
34 | {
35 | Gate::define('viewTelescope', fn ($user) => $user?->isAdmin());
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/Services/MixedConnection.php:
--------------------------------------------------------------------------------
1 | $value]);
23 |
24 | DB::purge(Connections::Tenant);
25 |
26 | DB::reconnect(Connections::Tenant);
27 | }
28 |
29 | private static function connection($connection)
30 | {
31 | $key = 'database.connections.'.Connections::Tenant.'.database';
32 | $value = config("database.connections.{$connection}.database");
33 | error_log($key.'=>'.$value);
34 | config([$key => $value]);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/Services/ProfileBuilder.php:
--------------------------------------------------------------------------------
1 | user->load([
22 | 'person:id,name,appellative,birthday,phone',
23 | 'group:id,name', 'role:id,name', 'avatar:id,user_id',
24 | ]);
25 |
26 | $this->build();
27 | }
28 |
29 | public function build(): void
30 | {
31 | $this->user->loginCount = $this->user->logins()->count();
32 | $this->user->actionLogCount = $this->user->actionLogs()->count();
33 | $this->user->daysSinceMember = max(Carbon::parse($this->user->created_at)->diffInDays(), 1);
34 | $this->user->rating = $this->rating();
35 | }
36 |
37 | private function rating(): int
38 | {
39 | $loginRatio = Decimals::div($this->user->loginCount, $this->user->daysSinceMember);
40 | $loginRating = Decimals::mul(self::LoginRating, $loginRatio);
41 | $actionRatio = Decimals::div($this->user->actionLogCount, $this->user->daysSinceMember);
42 | $actionRating = Decimals::mul(self::ActionRating, $actionRatio);
43 | $total = Decimals::add($loginRating, $actionRating);
44 |
45 | return (int) Decimals::div($total, 100);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/Services/Tenant.php:
--------------------------------------------------------------------------------
1 | id;
18 | config([$key => $value]);
19 |
20 | DB::purge(Connections::Tenant);
21 |
22 | DB::reconnect(Connections::Tenant);
23 | }
24 |
25 | public static function get()
26 | {
27 | return Company::find(self::tenantId());
28 | }
29 |
30 | public static function tenantDatabase()
31 | {
32 | return config('database.connections.'.Connections::Tenant.'.database');
33 | }
34 |
35 | private static function tenantId(): int
36 | {
37 | return (int) Str::replaceFirst(Connections::Tenant, '', self::tenantDatabase());
38 | }
39 |
40 | private static function tenantPrefix()
41 | {
42 | if (! isset(self::$tenantPrefix)) {
43 | self::$tenantPrefix = self::tenantDatabase();
44 | }
45 |
46 | return self::$tenantPrefix;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/app/Tenant/Middleware/Multitenancy.php:
--------------------------------------------------------------------------------
1 | user()) {
16 | return $next($request);
17 | }
18 |
19 | $company = $request->user()->belongsToAdminGroup() && $request->has('_tenantId')
20 | ? Company::find($request->get('_tenantId'))
21 | : $request->user()->company();
22 |
23 | if (optional($company)->isTenant()) {
24 | Manager::fromModel($company, $request->user())->connect(true);
25 | }
26 |
27 | if ($request->has('_tenantId')) {
28 | $request->request->remove('_tenantId');
29 | }
30 |
31 | return $next($request);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/Traits/ActivationTrait.php:
--------------------------------------------------------------------------------
1 | validateEmail($user)) {
14 | // return true;
15 | // }
16 |
17 | $activationRepostory = new ActivationRepository();
18 | $activationRepostory->createTokenAndSendEmail($user);
19 | }
20 |
21 | public function initiateEmailActivationApi(User $user)
22 | {
23 | if (! config('settings.activation') || ! $this->validateEmail($user)) {
24 | return true;
25 | }
26 |
27 | $activationRepostory = new ActivationRepository();
28 | $activationRepostory->createTokenAndSendEmailApi($user);
29 | }
30 |
31 | protected function validateEmail(User $user)
32 | {
33 | $validator = Validator::make(['email' => $user->email], ['email' => 'required|email']);
34 | return !$validator->fails();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/Traits/ConnectionTrait.php:
--------------------------------------------------------------------------------
1 | $db]);
14 | }
15 | \Session::put('conn', $conn);
16 | \Session::put('db', $db);
17 | }
18 |
19 | public function getConnection()
20 | {
21 | $conn = \Session::get('conn');
22 | $db = \Session::get('db');
23 | if ($conn === 'tenant') {
24 | $key = 'database.connections.tenant.database';
25 | $value = $db;
26 | config([$key => $value]);
27 | }
28 |
29 | return $conn;
30 | }
31 |
32 | public function getDB()
33 | {
34 | return \Session::get('db');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/Traits/CreatedBy.php:
--------------------------------------------------------------------------------
1 | $model->setCreatedBy());
13 | }
14 |
15 | public function createdBy(): Relation
16 | {
17 | $userModel = Config::get('auth.providers.users.model');
18 |
19 | return $this->belongsTo($userModel, 'created_by');
20 | }
21 |
22 | public static function bootUpdatedBy()
23 | {
24 | self::creating(fn ($model) => $model->setUpdatedBy());
25 | }
26 |
27 | public function UpdatedBy(): Relation
28 | {
29 | $userModel = Config::get('auth.providers.users.model');
30 |
31 | return $this->belongsTo($userModel, 'updated_by');
32 | }
33 |
34 | private function setCreatedBy($value = 1)
35 | {
36 | // if($value==''){
37 | // if (Auth::check()) {
38 | // $this->created_by = Auth::id();
39 | // }
40 | // }else{
41 | $this->created_by = null;
42 | // }
43 | }
44 |
45 | private function setUpdatedBy($value = 1)
46 | {
47 | // if($value==''){
48 | // if (Auth::check()) {
49 | // $this->updated_by = Auth::id();
50 | // }
51 | // }else{
52 | $this->updated_by = null;
53 | // }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/app/Traits/Login.php:
--------------------------------------------------------------------------------
1 | validateLogin($request);
12 |
13 | if (
14 | method_exists($this, 'hasTooManyLoginAttempts') &&
15 | $this->hasTooManyLoginAttempts($request)
16 | ) {
17 | $this->fireLockoutEvent($request);
18 |
19 | return $this->sendLockoutResponse($request);
20 | }
21 |
22 | if ($this->attemptLogin($request)) {
23 | if ($request->attributes->get('sanctum')) {
24 | $request->session()->put('auth.password_confirmed_at', time());
25 | }
26 | return $this->sendLoginResponse($request);
27 | }
28 |
29 | $this->incrementLoginAttempts($request);
30 |
31 | return $this->sendFailedLoginResponse($request);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/Traits/TenantConnectionResolver.php:
--------------------------------------------------------------------------------
1 | role_id;
15 | if ($user->isAdmin()) {
16 | return env('DB_DATABASE', 'genealogy'); //'liberu');
17 | }
18 | if (session()->get('db')) {
19 | return 'tenantdb';
20 | }
21 | }
22 |
23 | return $this->connection;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/Traits/UniqueStringTrait.php:
--------------------------------------------------------------------------------
1 | count();
29 |
30 | // Store the random character in the tested array
31 | // To keep track which ones are already tested
32 | $tested[] = $random;
33 |
34 | // String appears to be unique
35 | if ($count === 0) {
36 | // Set unique to true to break the loop
37 | $unique = true;
38 | }
39 |
40 | // If unique is still false at this point
41 | // it will just repeat all the steps until
42 | // it has generated a random string of characters
43 | } while (! $unique);
44 |
45 | return $random;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/Upgrades/DumpActivityLog.php:
--------------------------------------------------------------------------------
1 | menu()->doesntExist();
18 | }
19 |
20 | public function migrateData(): void
21 | {
22 | DB::table('migrations')->whereIn('migration', [
23 | '2018_08_09_100000_create_activity_logs_table',
24 | '2018_08_09_101000_create_structure_for_activity_logs',
25 | ])->delete();
26 |
27 | $this->menu()->delete();
28 |
29 | Permission::whereName('core.activityLogs.index')->delete();
30 | }
31 |
32 | public function migratePostDataMigration(): void
33 | {
34 | Schema::dropIfExists('activity_logs');
35 | }
36 |
37 | private function menu(): Builder
38 | {
39 | return Menu::whereName('Activity Log');
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/artisan:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | make(Illuminate\Contracts\Console\Kernel::class);
34 |
35 | $status = $kernel->handle(
36 | $input = new Symfony\Component\Console\Input\ArgvInput,
37 | new Symfony\Component\Console\Output\ConsoleOutput
38 | );
39 |
40 | /*
41 | |--------------------------------------------------------------------------
42 | | Shutdown The Application
43 | |--------------------------------------------------------------------------
44 | |
45 | | Once Artisan has finished running, we will fire off the shutdown events
46 | | so that any final work may be done by the application before we shut
47 | | down the process. This is the last thing to happen to the request.
48 | |
49 | */
50 |
51 | $kernel->terminate($input, $status);
52 |
53 | exit($status);
54 |
--------------------------------------------------------------------------------
/bootstrap/app.php:
--------------------------------------------------------------------------------
1 | singleton(
30 | Illuminate\Contracts\Http\Kernel::class,
31 | App\Http\Kernel::class
32 | );
33 |
34 | $app->singleton(
35 | Illuminate\Contracts\Console\Kernel::class,
36 | App\Console\Kernel::class
37 | );
38 |
39 | $app->singleton(
40 | Illuminate\Contracts\Debug\ExceptionHandler::class,
41 | App\Exceptions\Handler::class
42 | );
43 |
44 | /*
45 | |--------------------------------------------------------------------------
46 | | Return The Application
47 | |--------------------------------------------------------------------------
48 | |
49 | | This script returns the application instance. The instance is given to
50 | | the calling script so we can separate the building of the instances
51 | | from the actual running of the application and sending responses.
52 | |
53 | */
54 |
55 | return $app;
56 |
--------------------------------------------------------------------------------
/bootstrap/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/config/broadcasting.php:
--------------------------------------------------------------------------------
1 | env('BROADCAST_DRIVER', 'redis'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Broadcast Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may define all of the broadcast connections that will be used
26 | | to broadcast events to other systems or over websockets. Samples of
27 | | each available type of connection are provided inside this array.
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'pusher' => [
34 | 'driver' => 'pusher',
35 | 'key' => env('PUSHER_APP_KEY'),
36 | 'secret' => env('PUSHER_APP_SECRET'),
37 | 'app_id' => env('PUSHER_APP_ID'),
38 | 'options' => [
39 | 'cluster' => env('PUSHER_APP_CLUSTER'),
40 | 'useTLS' => true,
41 | ],
42 | 'client_options' => [
43 | // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
44 | ],
45 | ],
46 |
47 | 'ably' => [
48 | 'driver' => 'ably',
49 | 'key' => env('ABLY_KEY'),
50 | ],
51 |
52 | 'redis' => [
53 | 'driver' => 'redis',
54 | 'connection' => 'default',
55 | ],
56 |
57 | 'log' => [
58 | 'driver' => 'log',
59 | ],
60 |
61 | 'null' => [
62 | 'driver' => 'null',
63 | ],
64 |
65 | ],
66 |
67 | ];
68 |
--------------------------------------------------------------------------------
/config/cors.php:
--------------------------------------------------------------------------------
1 | ['*'],
19 |
20 | 'allowed_methods' => ['*'],
21 |
22 | 'allowed_origins' => [
23 | 'http://pusher.com',
24 | 'https://pusher.com',
25 | 'http://genealogy.test',
26 | 'http://127.0.0.1:8000',
27 | 'http://localhost:8000',
28 | 'http://localhost:3000',
29 | 'http://localhost:55487',
30 | 'https://familytree365.com',
31 | 'https://api.familytree365.com',
32 | 'https://www.familytree365.com', ],
33 |
34 | 'allowed_origins_patterns' => [],
35 |
36 | 'allowed_headers' => ['*'],
37 |
38 | 'exposed_headers' => [],
39 |
40 | 'max_age' => 0,
41 |
42 | 'supports_credentials' => true,
43 |
44 | ];
45 |
--------------------------------------------------------------------------------
/config/hashing.php:
--------------------------------------------------------------------------------
1 | 'bcrypt',
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Bcrypt Options
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may specify the configuration options that should be used when
26 | | passwords are hashed using the Bcrypt algorithm. This will allow you
27 | | to control the amount of time it takes to hash the given password.
28 | |
29 | */
30 |
31 | 'bcrypt' => [
32 | 'rounds' => env('BCRYPT_ROUNDS', 10),
33 | ],
34 |
35 | /*
36 | |--------------------------------------------------------------------------
37 | | Argon Options
38 | |--------------------------------------------------------------------------
39 | |
40 | | Here you may specify the configuration options that should be used when
41 | | passwords are hashed using the Argon algorithm. These will allow you
42 | | to control the amount of time it takes to hash the given password.
43 | |
44 | */
45 |
46 | 'argon' => [
47 | 'memory' => 65536,
48 | 'threads' => 1,
49 | 'time' => 4,
50 | ],
51 |
52 | ];
53 |
--------------------------------------------------------------------------------
/config/liberu/addresses.php:
--------------------------------------------------------------------------------
1 | 'cascade',
5 | 'defaultCountryId' => 184,
6 | ];
7 |
--------------------------------------------------------------------------------
/config/liberu/auth.php:
--------------------------------------------------------------------------------
1 | (int) env('LOGIN_ATTEMPTS_PER_MINUTE', 5),
5 | 'password' => [
6 | 'lifetime' => env('PASSWORD_LIFETIME', 0),
7 | 'minLength' => env('PASSWORD_MIN_LENGTH', 6),
8 | 'mixedCase' => (bool) env('PASSWORD_MIXED_CASE', 0),
9 | 'numeric' => (bool) env('PASSWORD_NUMERIC', 0),
10 | 'special' => (bool) env('PASSWORD_SPECIAL', 0),
11 | ],
12 | ];
13 |
--------------------------------------------------------------------------------
/config/liberu/charts.php:
--------------------------------------------------------------------------------
1 | 0.25,
5 | 'colors' => [
6 | 'Green' => '#008000',
7 | 'Red' => '#FF0000',
8 | 'Blue' => '#1E90FF',
9 | 'Purple' => '#800080',
10 | 'Orange' => '#FFA500',
11 | 'Brown' => '#A52A2A',
12 | 'OrangeRed' => '#FF4500',
13 | 'Teal' => '#008080',
14 | 'Coral' => '#FF7F50',
15 | 'SlateBlue' => '#6A5ACD',
16 | 'Maroon' => '#800000',
17 | 'SlateGrey' => '#708090',
18 | 'DeepPink' => '#FF1493',
19 | 'LightGreen' => '#90EE90',
20 | 'SteelBlue' => '#4682B4',
21 | 'Magenta' => '#FF00FF',
22 | 'Tan' => '#D2B48C',
23 | 'Silver' => '#C0C0C0',
24 | 'Black' => '#000000',
25 | ],
26 | ];
27 |
--------------------------------------------------------------------------------
/config/liberu/comments.php:
--------------------------------------------------------------------------------
1 | 24 * 60 * 60,
5 | 'onDelete' => 'cascade',
6 | 'humanReadableDates' => true,
7 | 'loggableMorph' => [
8 | 'commentable' => [],
9 | ],
10 | ];
11 |
--------------------------------------------------------------------------------
/config/liberu/config.php:
--------------------------------------------------------------------------------
1 | '5.0.0',
5 | 'ownerCompanyId' => (int) env('OWNER_COMPANY_ID', 1),
6 | 'showQuote' => (bool) env('SHOW_QUOTE', true),
7 | 'defaultRole' => 'admin',
8 | 'dateFormat' => 'd-m-Y',
9 | 'dateTimeFormat' => 'd-m-Y H:i:s',
10 | 'facebook' => 'https://facebook.com',
11 | 'instagram' => 'https://www.instagram.com',
12 | 'twitter' => 'https://twitter.com',
13 | 'extendedDocumentTitle' => (bool) env('EXTENDED_DOCUMENT_TITLE', false),
14 | ];
15 |
--------------------------------------------------------------------------------
/config/liberu/discussions.php:
--------------------------------------------------------------------------------
1 | 'cascade',
5 | 'loggableMorph' => [
6 | 'discussable' => [],
7 | ],
8 | ];
9 |
--------------------------------------------------------------------------------
/config/liberu/documents.php:
--------------------------------------------------------------------------------
1 | 60 * 60,
5 | 'linkExpiration' => 60 * 60 * 24,
6 | 'imageWidth' => 2048,
7 | 'imageHeight' => 2048,
8 | 'onDelete' => 'restrict',
9 | 'loggableMorph' => [
10 | 'documentable' => [],
11 | ],
12 | 'queues' => [
13 | 'ocr' => 'heavy',
14 | ],
15 | ];
16 |
--------------------------------------------------------------------------------
/config/liberu/exports.php:
--------------------------------------------------------------------------------
1 | (int) env('EXPORT_ROW_LIMIT', 1_000_000),
14 |
15 | /*
16 | |--------------------------------------------------------------------------
17 | | Chunk
18 | |--------------------------------------------------------------------------
19 | |
20 | | Sets the default chunk when processing excel exports.
21 | |
22 | */
23 |
24 | 'chunk' => (int) env('EXPORT_CHUNK', 25000),
25 |
26 | /*
27 | |--------------------------------------------------------------------------
28 | | Retain exports for a number of days
29 | |--------------------------------------------------------------------------
30 | | Sets the default period in days for retainig exports. Must be used
31 | | together with the Purge command.
32 | |
33 | */
34 |
35 | 'retainFor' => (int) env('EXPORT_RETAIN_FOR', 60),
36 | ];
37 |
--------------------------------------------------------------------------------
/config/liberu/files.php:
--------------------------------------------------------------------------------
1 | (int) env('TEMPORARY_LINK_EXPIRATION', 60 * 60 * 24),
17 | 'storageLimit' => 500000,
18 | 'paginate' => (int) env('FILES_PAGINATION', 50),
19 | 'testingFolder' => 'testing',
20 | 'renameFolders' => [
21 | 'dataImport' => 'import',
22 | 'dataExport' => 'export',
23 | 'webshopCarouselSlide' => 'carouselSlide',
24 | ],
25 | 'nonStandardFolders' => [
26 | 'files', 'imports', 'carousel', 'howToVideos', 'webshopCarouselSlide',
27 | ],
28 | 'upgrade' => [
29 | 'avatar' => Avatar::class,
30 | 'dataExport' => Export::class,
31 | 'upload' => Upload::class,
32 | 'dataImport' => Import::class,
33 | 'rejectedImport' => RejectedImport::class,
34 | 'document' => Document::class,
35 | 'productPicture' => Picture::class,
36 | 'webshopBrand' => Brand::class,
37 | 'webshopCarouselSlide' => CarouselSlide::class,
38 | 'poster' => Poster::class,
39 | 'video' => Video::class,
40 | ],
41 | ];
42 |
--------------------------------------------------------------------------------
/config/liberu/inspiring.php:
--------------------------------------------------------------------------------
1 | [
5 | 'There is only one boss... the customer - Sam Walton @ Walmart',
6 | 'Get Shit Done - Aaron Levie @ Box',
7 | 'Less Meetings. More Doing - Jason Goldberg @ Fab.com',
8 | "Don't Compromise - Steve Jobs @ Apple",
9 | 'Whatever the problem be part of the solution - Tina Fey',
10 | "If a user is having a problem, it's our problem - Steve Jobs @ Apple",
11 | 'Complaining is not a strategy - Jeff Bezons @ Amazon',
12 | "Optimism, pessimism, F... that! We're going to make it happen - Elon Musk @ Tesla",
13 | 'Think like a customer - Paul Gillin',
14 | 'Always deliver more than expected - Larry Page @ Google',
15 | 'Done is better than perfect - Sheryl Sandberg @ Facebook',
16 | 'Make it work then make it better',
17 | 'Be more curious - Tanner Christensen @ Facebook',
18 | 'Start where you are, use what you have, do what you can',
19 | 'Ideas are worthless until you get them out of your head to see what they can do - Tanner Christensen @ Facebook',
20 | 'Set goals. Reach. Repeat',
21 | 'Quality is the best business plan - John Lasseter @ Pixar',
22 | 'Never Never Never Give Up - Winston Churchill',
23 | 'Life is short. Do stuff that matters - Siqi Chen @ Hey',
24 | 'Experiment. Fail. Learn. Repeat.',
25 | "We have a strategic plan. It's called Doing Things - Herb Kelleher @ Southwest Arilines",
26 | 'Vision without execution is hallucination',
27 | "It's simple until you make it complicated - Jason Fried @ Twitter",
28 | "There's nothing wrong with being small. You can do big things with a small team - Jason Fried @ 37signals",
29 | "There are seven days in a week. Someday isn't one of them",
30 | 'Wake up with determination. Go to bed with satisfaction',
31 | "Be so good they can't ignore you - Steve Martin",
32 | 'The worst decision is indecision - Ryan Harwood @ PureWow',
33 | "Don't guess. Measure - Slava Akhmechet @ RethinkDB",
34 | 'Try again. Fail again. Fail better - Samuel Beckett',
35 | ],
36 | ];
37 |
--------------------------------------------------------------------------------
/config/liberu/localisation.php:
--------------------------------------------------------------------------------
1 | false,
14 | ];
15 |
--------------------------------------------------------------------------------
/config/liberu/searchable.php:
--------------------------------------------------------------------------------
1 | 'name',
5 | 'routes' => [
6 | 'show' => 'eye',
7 | 'edit' => 'pencil-alt',
8 | 'index' => 'list-ul',
9 | ],
10 | 'limit' => 10,
11 | ];
12 |
--------------------------------------------------------------------------------
/config/liberu/select.php:
--------------------------------------------------------------------------------
1 | 'id',
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Query attributes
21 | |--------------------------------------------------------------------------
22 | | The default query attributes used for every select. You can override
23 | | it by adding a protected $queryAttributes property in the local
24 | | Options controller.
25 | */
26 |
27 | 'queryAttributes' => ['name'],
28 |
29 | /*
30 | |--------------------------------------------------------------------------
31 | | SQL comparison operator
32 | |--------------------------------------------------------------------------
33 | | The comparison operator will be the default used for every select.
34 | | Possible values for comparison operator: LIKE, ILIKE
35 | */
36 |
37 | 'comparisonOperator' => ComparisonOperators::Like,
38 |
39 | /*
40 | |--------------------------------------------------------------------------
41 | | Search Mode
42 | |--------------------------------------------------------------------------
43 | | Controls the global way in which wildcards are used in the query.
44 | | Can be customized for each select. Possible values for search mode:
45 | | SearchModes::Full, SearchModes::StartsWith, SearchModes::EndsWith
46 | */
47 |
48 | 'searchMode' => SearchModes::Full,
49 | ];
50 |
--------------------------------------------------------------------------------
/config/liberu/themes.php:
--------------------------------------------------------------------------------
1 | 'light',
5 | 'dark' => 'dark',
6 | 'light-rtl' => 'light-rtl',
7 | 'dark-rtl' => 'dark-rtl',
8 | ];
9 |
--------------------------------------------------------------------------------
/config/local/roles/Agent.php:
--------------------------------------------------------------------------------
1 | 3,
5 | 'role' => ['name' => 'Agent', 'display_name' => 'Agent Role'],
6 | 'default_menu' => 'dashboard.index',
7 | 'permissions' => [
8 | 'core.home.index',
9 | 'core.avatars.update',
10 | 'core.avatars.show',
11 | 'core.avatars.store',
12 | 'core.preferences.store',
13 | 'core.preferences.resetToDefault',
14 | 'dashboard.index',
15 | 'administration.userGroups.initTable',
16 | 'administration.users.show',
17 | 'core.impersonate.stop',
18 | 'core.notifications.count',
19 | 'core.notifications.read',
20 | 'core.notifications.readAll',
21 | 'core.notifications.destroyAll',
22 | 'system.tutorials.load',
23 | 'core.comments.index',
24 | 'core.comments.store',
25 | 'core.comments.update',
26 | 'core.comments.destroy',
27 | 'howTo.videos.index',
28 | 'howTo.videos.show',
29 | 'howTo.tags.index',
30 | 'howTo.posters.show',
31 | 'core.notifications.index',
32 | 'core.notifications.destroy',
33 | 'core.search.index',
34 | 'core.uploads.store',
35 | 'core.uploads.destroy',
36 | 'core.calendar.events.index',
37 | 'core.calendar.create',
38 | 'core.calendar.store',
39 | 'core.calendar.edit',
40 | 'core.calendar.update',
41 | 'core.calendar.destroy',
42 | 'core.calendar.index',
43 | 'core.calendar.options',
44 | 'core.comments.users',
45 | 'system.localisation.options',
46 | 'export.cancel',
47 | 'core.files.favorite',
48 | 'core.files.browse',
49 | 'core.files.recent',
50 | 'core.files.favorites',
51 | 'core.files.makePublic',
52 | 'core.files.makePrivate',
53 | 'core.files.update',
54 | ],
55 | ];
56 |
--------------------------------------------------------------------------------
/config/local/roles/monitoring.php:
--------------------------------------------------------------------------------
1 | 4,
5 | 'role' => ['name' => 'monitoring', 'display_name' => 'monitoring'],
6 | 'default_menu' => '',
7 | 'permissions' => [
8 | 'apis.controlPanel.statistics',
9 | 'apis.controlPanel.actions',
10 | 'apis.controlPanel.action',
11 | 'system.localisation.options',
12 | 'export.cancel',
13 | 'core.files.favorite',
14 | 'core.files.browse',
15 | 'core.files.recent',
16 | 'core.files.favorites',
17 | 'core.files.makePublic',
18 | 'core.files.makePrivate',
19 | 'core.files.update',
20 | ],
21 | ];
22 |
--------------------------------------------------------------------------------
/config/local/roles/user.php:
--------------------------------------------------------------------------------
1 | 3,
5 | 'role' => ['name' => 'user', 'display_name' => 'User'],
6 | 'default_menu' => 'howTo.videos.index',
7 | 'permissions' => [
8 | 'howTo.videos.index',
9 | 'howTo.videos.show',
10 | 'howTo.tags.index',
11 | 'howTo.posters.show',
12 | 'core.home.index',
13 | 'core.avatars.update',
14 | 'core.avatars.show',
15 | 'core.avatars.store',
16 | 'core.preferences.store',
17 | 'core.preferences.reset',
18 | 'dashboard.index',
19 | 'system.roles.options',
20 | 'administration.users.show',
21 | 'core.impersonate.stop',
22 | 'core.notifications.index',
23 | 'core.notifications.count',
24 | 'core.notifications.read',
25 | 'core.notifications.readAll',
26 | 'core.notifications.destroy',
27 | 'core.notifications.destroyAll',
28 | 'system.tutorials.load',
29 | 'core.comments.users',
30 | 'core.comments.index',
31 | 'core.comments.store',
32 | 'core.comments.update',
33 | 'core.comments.destroy',
34 | 'core.discussions.index',
35 | 'core.discussions.store',
36 | 'core.discussions.show',
37 | 'core.discussions.update',
38 | 'core.discussions.destroy',
39 | 'core.discussions.storeReply',
40 | 'core.discussions.updateReply',
41 | 'core.discussions.destroyReply',
42 | 'core.discussions.react',
43 | 'core.files.index',
44 | 'core.files.link',
45 | 'core.files.show',
46 | 'core.files.download',
47 | 'core.files.destroy',
48 | 'core.uploads.store',
49 | 'core.uploads.destroy',
50 | 'core.search.index',
51 | 'core.calendar.events.index',
52 | 'core.calendar.events.create',
53 | 'core.calendar.events.store',
54 | 'core.calendar.events.edit',
55 | 'core.calendar.events.update',
56 | 'core.calendar.events.destroy',
57 | 'core.calendar.create',
58 | 'core.calendar.store',
59 | 'core.calendar.edit',
60 | 'core.calendar.update',
61 | 'core.calendar.destroy',
62 | 'core.calendar.index',
63 | 'core.calendar.options',
64 | 'test',
65 | ],
66 | ];
67 |
--------------------------------------------------------------------------------
/config/paypal.php:
--------------------------------------------------------------------------------
1 | .
5 | */
6 |
7 | return [
8 | 'mode' => env('PAYPAL_MODE', 'sandbox'), // Can only be 'sandbox' Or 'live'. If empty or invalid, 'live' will be used.
9 | 'sandbox' => [
10 | 'client_id' => env('PAYPAL_SANDBOX_CLIENT_ID', ''),
11 | 'client_secret' => env('PAYPAL_SANDBOX_CLIENT_SECRET', ''),
12 | 'app_id' => 'APP-80W284485P519543T',
13 | ],
14 | 'live' => [
15 | 'client_id' => env('PAYPAL_LIVE_CLIENT_ID', ''),
16 | 'client_secret' => env('PAYPAL_LIVE_CLIENT_SECRET', ''),
17 | 'app_id' => env('PAYPAL_LIVE_APP_ID', ''),
18 | ],
19 |
20 | 'payment_action' => env('PAYPAL_PAYMENT_ACTION', 'Sale'), // Can only be 'Sale', 'Authorization' or 'Order'
21 | 'currency' => env('PAYPAL_CURRENCY', 'USD'),
22 | 'notify_url' => env('PAYPAL_NOTIFY_URL', ''), // Change this accordingly for your application.
23 | 'locale' => env('PAYPAL_LOCALE', 'en_US'), // force gateway language i.e. it_IT, es_ES, en_US ... (for express checkout only)
24 | 'validate_ssl' => env('PAYPAL_VALIDATE_SSL', true), // Validate SSL when creating api client.
25 | ];
26 |
--------------------------------------------------------------------------------
/config/recordsapi.php:
--------------------------------------------------------------------------------
1 | env('RECORDS_API_URL', ''),
5 |
6 | 'records_app_id' => env('RECORDS_APP_ID'),
7 |
8 | 'records_app_key' => env('RECORDS_APP_KEY'),
9 | ];
10 |
--------------------------------------------------------------------------------
/config/sanctum.php:
--------------------------------------------------------------------------------
1 | explode(',', (string) env('SANCTUM_STATEFUL_DOMAINS', sprintf(
19 | '%s%s',
20 | 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
21 | Sanctum::currentApplicationUrlWithPort()
22 | ))),
23 |
24 | /*
25 | |--------------------------------------------------------------------------
26 | | Sanctum Guards
27 | |--------------------------------------------------------------------------
28 | |
29 | | This array contains the authentication guards that will be checked when
30 | | Sanctum is trying to authenticate a request. If none of these guards
31 | | are able to authenticate the request, Sanctum will use the bearer
32 | | token that's present on an incoming request for authentication.
33 | |
34 | */
35 |
36 | 'guard' => ['web'],
37 |
38 | /*
39 | |--------------------------------------------------------------------------
40 | | Expiration Minutes
41 | |--------------------------------------------------------------------------
42 | |
43 | | This value controls the number of minutes until an issued token will be
44 | | considered expired. If this value is null, personal access tokens do
45 | | not expire. This won't tweak the lifetime of first-party sessions.
46 | |
47 | */
48 |
49 | 'expiration' => null,
50 |
51 | /*
52 | |--------------------------------------------------------------------------
53 | | Sanctum Middleware
54 | |--------------------------------------------------------------------------
55 | |
56 | | When authenticating your first-party SPA with Sanctum you may need to
57 | | customize some of the middleware Sanctum uses while processing the
58 | | request. You may change the middleware listed below as required.
59 | |
60 | */
61 |
62 | 'middleware' => [
63 | 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class,
64 | 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class,
65 | ],
66 |
67 | ];
68 |
--------------------------------------------------------------------------------
/config/sentry.php:
--------------------------------------------------------------------------------
1 | env('SENTRY_LARAVEL_DSN', env('SENTRY_DSN')),
6 |
7 | // capture release as git sha
8 | 'release' => trim(exec('git --git-dir '.base_path('.git').' log --pretty="%h" -n1 HEAD')),
9 |
10 | 'breadcrumbs' => [
11 | // Capture Laravel logs in breadcrumbs
12 | 'logs' => true,
13 |
14 | // Capture SQL queries in breadcrumbs
15 | 'sql_queries' => true,
16 |
17 | // Capture bindings on SQL queries logged in breadcrumbs
18 | 'sql_bindings' => true,
19 |
20 | // Capture queue job information in breadcrumbs
21 | 'queue_info' => true,
22 | ],
23 |
24 | ];
25 |
--------------------------------------------------------------------------------
/config/services.php:
--------------------------------------------------------------------------------
1 | [
18 | 'domain' => env('MAILGUN_DOMAIN'),
19 | 'secret' => env('MAILGUN_SECRET'),
20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
21 | ],
22 |
23 | 'postmark' => [
24 | 'token' => env('POSTMARK_TOKEN'),
25 | ],
26 |
27 | 'ses' => [
28 | 'key' => env('AWS_ACCESS_KEY_ID'),
29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
31 | ],
32 |
33 | 'google' => [
34 | 'client_id' => env('GOOGLE_CLIENT_ID'),
35 | 'client_secret' => env('GOOGLE_CLIENT_SECRET'),
36 | 'redirect' => env('GOOGLE_REDIRECT_URI'),
37 | ],
38 |
39 | 'facebook' => [
40 | 'client_id' => env('FACEBOOK_CLIENT_ID'),
41 | 'client_secret' => env('FACEBOOK_CLIENT_SECRET'),
42 | 'redirect' => env('FACEBOOK_REDIRECT_URI'),
43 | ],
44 |
45 | 'github' => [
46 | 'client_id' => env('GITHUB_CLIENT_ID'),
47 | 'client_secret' => env('GITHUB_CLIENT_SECRET'),
48 | 'redirect' => env('GITHUB_REDIRECT_URI'),
49 | ],
50 |
51 | 'openarch' => [
52 | 'api' => [
53 | 'records' => 'https://api.openarch.nl/1.0/records',
54 | ],
55 | ],
56 |
57 | 'nationalarch' => [
58 | 'api' => [
59 | 'records' => 'https://discovery.nationalarchives.gov.uk/API/search/records',
60 | ],
61 | ],
62 |
63 | 'genealogycloud' => [
64 | 'api' => [
65 | 'records' => 'http://wsdev.onegreatfamily.com/v11.02/Search.svc/Search',
66 | ],
67 | ],
68 |
69 | 'familysearch' => [
70 | 'api' => [
71 | 'records' => 'https://api.familysearch.org/platform/tree',
72 | ],
73 | ],
74 |
75 | 'wikitree' => [
76 | 'api' => env('WIKITREE_API'),
77 | ],
78 |
79 | 'stripe' => [
80 | 'model' => App\Models\User::class,
81 | 'key' => env('STRIPE_KEY'),
82 | 'secret' => env('STRIPE_SECRET'),
83 | 'webhook' => env('STRIPE_WEBHOOK_SECRET'),
84 | ],
85 | ];
86 |
--------------------------------------------------------------------------------
/config/settings.php:
--------------------------------------------------------------------------------
1 | env('APP_PROJECT_VERSION'),
9 |
10 | /*
11 | * Is email activation required
12 | */
13 | 'activation' => env('ACTIVATION', true),
14 |
15 | /*
16 | * Is email activation required
17 | */
18 | 'timePeriod' => env('ACTIVATION_LIMIT_TIME_PERIOD', 24),
19 |
20 | /*
21 | * Is email activation required
22 | */
23 | 'maxAttempts' => env('ACTIVATION_LIMIT_MAX_ATTEMPTS', 3),
24 |
25 | /*
26 | * NULL Ip to enter to match database schema
27 | */
28 | 'nullIpAddress' => env('NULL_IP_ADDRESS', '0.0.0.0'),
29 |
30 | /*
31 | * User restore encryption type
32 | */
33 | 'restoreUserEncType' => 'AES-256-ECB',
34 |
35 | /*
36 | * User restore days past cutoff
37 | */
38 | 'restoreUserCutoff' => env('USER_RESTORE_CUTOFF_DAYS', 31),
39 |
40 | /*
41 | * User list pagination size
42 | */
43 | 'userListPaginationSize' => env('USER_LIST_PAGINATION_SIZE', 50),
44 |
45 | /*
46 | * User restore encryption key
47 | */
48 | 'restoreKey' => env('USER_RESTORE_ENCRYPTION_KEY', 'sup3rS3cr3tR35t0r3K3y21!'),
49 |
50 | /*
51 | * ReCaptcha Status
52 | */
53 | 'reCaptchStatus' => env('ENABLE_RECAPTCHA', true),
54 |
55 | /*
56 | * ReCaptcha Site Key
57 | */
58 | 'reCaptchSite' => env('RE_CAP_SITE', '6LeKYugUAAAAAH6CArdCzWCut7DesdKzNzwxwAYm'),
59 |
60 | /*
61 | * ReCaptcha Secret
62 | */
63 | 'reCaptchSecret' => env('RE_CAP_SECRET', '6LeKYugUAAAAABKOS4FsLGgLjSoGWKxD8ba5xzxu'),
64 |
65 | /*
66 | * Google Maps API V3 Status
67 | */
68 | 'googleMapsAPIStatus' => env('GOOGLEMAPS_API_STATUS', false),
69 |
70 | /*
71 | * Google Maps API Key
72 | */
73 | 'googleMapsAPIKey' => env('GOOGLE_MAP_KEY', 'YOURGOOGLEMAPSkeyHERE'),
74 |
75 | /*
76 | * DropZone CDN
77 | */
78 | 'dropZoneJsCDN' => env('DROPZONE_JS_CDN', 'https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.4.0/dropzone.js'),
79 |
80 | /*
81 | * Client URL
82 | */
83 | 'clientBaseUrl' => env('CLIENT_BASE_URL', 'http://localhost:3000'),
84 | ];
85 |
--------------------------------------------------------------------------------
/config/stats.php:
--------------------------------------------------------------------------------
1 | [
8 | base_path('app'),
9 | base_path('database'),
10 | base_path('tests'),
11 | base_path('vendor/laravel-enso'),
12 | ],
13 |
14 | /*
15 | * List of files/folders to be excluded from analysis.
16 | */
17 | 'exclude' => [
18 | // base_path('app/helpers.php'),
19 | // base_path('app/Services'),
20 | ],
21 |
22 | /*
23 | * List of your custom Classifiers
24 | */
25 | 'custom_component_classifier' => [
26 | // \App\Classifiers\CustomerExportClassifier::class
27 | ],
28 |
29 | /*
30 | * The Strategy used to reject Classes from the project statistics.
31 | *
32 | * By default all Classes located in
33 | * the vendor directory are being rejected and don't
34 | * count to the statistics.
35 | *
36 | * The package ships with 2 strategies:
37 | * - \Wnx\LaravelStats\RejectionStrategies\RejectVendorClasses::class
38 | * - \Wnx\LaravelStats\RejectionStrategies\RejectInternalClasses::class
39 | *
40 | * If none of the default strategies fit for your usecase, you can
41 | * write your own class which implements the RejectionStrategy Contract.
42 | */
43 | 'rejection_strategy' => \Wnx\LaravelStats\RejectionStrategies\RejectInternalClasses::class,
44 |
45 | /*
46 | * Namespaces which should be ignored.
47 | * Laravel Stats uses the `starts_with`-string helper, to
48 | * check if a Namespace should be ignored.
49 | *
50 | * You can use `Illuminate` to ignore the entire `Illuminate`-namespace
51 | * or `Illuminate\Support` to ignore a subset of the namespace.
52 | */
53 | 'ignored_namespaces' => [
54 | 'Wnx\LaravelStats',
55 | 'Illuminate',
56 | 'Symfony',
57 | ],
58 | ];
59 |
--------------------------------------------------------------------------------
/config/view.php:
--------------------------------------------------------------------------------
1 | [
17 | resource_path('views'),
18 | ],
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Compiled View Path
23 | |--------------------------------------------------------------------------
24 | |
25 | | This option determines where all the compiled Blade templates will be
26 | | stored for your application. Typically, this is within the storage
27 | | directory. However, as usual, you are free to change this value.
28 | |
29 | */
30 |
31 | 'compiled' => env(
32 | 'VIEW_COMPILED_PATH',
33 | realpath(storage_path('framework/views'))
34 | ),
35 |
36 | ];
37 |
--------------------------------------------------------------------------------
/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite
2 | *.sqlite-journal
3 |
--------------------------------------------------------------------------------
/database/factories/CompanyFactory.php:
--------------------------------------------------------------------------------
1 | Person::factory(),
19 | 'group_id' => UserGroup::factory(),
20 | 'email' => fn ($attributes) => Person::find($attributes['person_id'])->email,
21 | 'role_id' => Role::factory(),
22 | 'is_active' => $this->faker->boolean,
23 | ];
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_100000_create_password_resets_table.php:
--------------------------------------------------------------------------------
1 | string('email')->primary();
13 | $table->string('token')->index();
14 | $table->timestamp('created_at')->nullable();
15 | });
16 | }
17 |
18 | public function down()
19 | {
20 | Schema::dropIfExists('password_resets');
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/database/migrations/2017_01_01_112100_create_file_types_table.php:
--------------------------------------------------------------------------------
1 | id();
13 |
14 | $table->string('name')->unique();
15 | $table->string('model')->unique()->nullable();
16 | $table->string('folder')->nullable();
17 | $table->string('icon')->nullable();
18 | $table->string('endpoint')->nullable();
19 |
20 | $table->text('description')->nullable();
21 |
22 | $table->boolean('is_browsable');
23 | $table->boolean('is_system');
24 |
25 | $table->timestamps();
26 | });
27 | }
28 |
29 | public function down()
30 | {
31 | Schema::dropIfExists('file_types');
32 | }
33 | };
34 |
--------------------------------------------------------------------------------
/database/migrations/2017_01_01_120000_create_structure_for_dashboard.php:
--------------------------------------------------------------------------------
1 | 'dashboard.index', 'description' => 'Dashboard page', 'is_default' => true],
9 | ];
10 |
11 | protected array $menu = [
12 | 'name' => 'Dashboard', 'icon' => 'tachometer-alt', 'route' => 'dashboard.index', 'order_index' => 100, 'has_children' => false,
13 | ];
14 | };
15 |
--------------------------------------------------------------------------------
/database/migrations/2019_09_15_000010_create_tenants_table.php:
--------------------------------------------------------------------------------
1 | string('id')->primary();
20 |
21 | // your custom columns may go here
22 |
23 | $table->timestamps();
24 | $table->json('data')->nullable();
25 | });
26 | }
27 |
28 | /**
29 | * Reverse the migrations.
30 | *
31 | * @return void
32 | */
33 | public function down(): void
34 | {
35 | Schema::dropIfExists('tenants');
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/database/migrations/2019_09_15_000020_create_domains_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
20 | $table->string('domain', 255)->unique();
21 | $table->string('tenant_id');
22 |
23 | $table->timestamps();
24 | $table->foreign('tenant_id')->references('id')->on('tenants')->onUpdate('cascade')->onDelete('cascade');
25 | });
26 | }
27 |
28 | /**
29 | * Reverse the migrations.
30 | *
31 | * @return void
32 | */
33 | public function down(): void
34 | {
35 | Schema::dropIfExists('domains');
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php:
--------------------------------------------------------------------------------
1 | id();
16 | $table->morphs('tokenable');
17 | $table->string('name');
18 | $table->string('token', 64)->unique();
19 | $table->text('abilities')->nullable();
20 | $table->timestamp('last_used_at')->nullable();
21 | $table->timestamp('expires_at')->nullable();
22 | $table->timestamps();
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | */
29 | public function down(): void
30 | {
31 | Schema::dropIfExists('personal_access_tokens');
32 | }
33 | };
34 |
--------------------------------------------------------------------------------
/database/migrations/2020_06_30_135250_create_activations_table.php:
--------------------------------------------------------------------------------
1 | id();
17 | $table->unsignedBigInteger('user_id')->unsigned()->index();
18 | $table->string('token');
19 | $table->ipAddress('ip_address')->nullable();
20 | $table->timestamps();
21 | });
22 | }
23 |
24 | /**
25 | * Reverse the migrations.
26 | *
27 | * @return void
28 | */
29 | public function down()
30 | {
31 | Schema::dropIfExists('activations');
32 | }
33 | };
34 |
--------------------------------------------------------------------------------
/database/seeders/CompanySeeder.php:
--------------------------------------------------------------------------------
1 | admin_company();
15 |
16 | $person = Person::where('id', '1')->first();
17 | $person->companies()->attach(1, ['person_id' => 1, 'is_main' => 1, 'is_mandatary' => 1, 'company_id' => $admin_company->id]);
18 |
19 | $supervisor_company = $this->supervisor_company();
20 | $person = Person::where('id', '2')->first();
21 | $person->companies()->attach(1, ['person_id' => 2, 'is_main' => 1, 'is_mandatary' => 1, 'company_id' => $supervisor_company->id]);
22 | }
23 |
24 | private function admin_company()
25 | {
26 | return Company::create([
27 | 'name' => 'Admin Root',
28 | 'is_tenant' => 0,
29 | 'email' => 'admin@familytree365.com',
30 | 'phone' => '+4412345678910',
31 | 'status' => Statuses::Active,
32 | ]);
33 | }
34 |
35 | private function supervisor_company()
36 | {
37 | return Company::create([
38 | 'name' => 'Supervisor',
39 | 'is_tenant' => 0,
40 | 'email' => 'supervisor@familytree365.com',
41 | 'phone' => '+4412345678910',
42 | 'status' => Statuses::Active,
43 | ]);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/database/seeders/CustomPermissionSeeder.php:
--------------------------------------------------------------------------------
1 | first();
60 | * $role_id = $c_role->id;
61 | * foreach ($this->link as $link) {
62 | * $permission = Permission::where('name', $link)->first();
63 | * if ($permission !== null) {
64 | * $permission->roles()->detach($role_id);
65 | * $permission->roles()->attach($role_id);
66 | * }
67 | * }
68 | * }
69 | *
70 | **/
71 | }
72 |
--------------------------------------------------------------------------------
/database/seeders/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | call([
20 | RoleSeeder::class,
21 | UserGroupSeeder::class,
22 | TypeSeeder::class,
23 | UserSeeder::class,
24 | LanguageSeeder::class,
25 | CountrySeeder::class,
26 | CompanySeeder::class,
27 | // CustomPermissionSeeder::class,
28 | ]);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/database/seeders/UserSeeder.php:
--------------------------------------------------------------------------------
1 | admin();
16 | $supervisor = $this->supervisor();
17 |
18 | User::factory()->create([
19 | 'person_id' => $admin->id,
20 | 'group_id' => UserGroup::whereName('Administrators')->first()->id,
21 | 'email' => $admin->email,
22 | 'password' => '$2y$10$06TrEefmqWBO7xghm2PUzeF/O0wcawFUv8TKYq.NF6Dsa0Pnmd/F2',
23 | 'role_id' => Role::whereName('admin')->first()->id,
24 | 'is_active' => true,
25 | ])->generateAvatar();
26 |
27 | User::factory()->create([
28 | 'person_id' => $supervisor->id,
29 | 'group_id' => UserGroup::whereName('Administrators')->first()->id,
30 | 'email' => $supervisor->email,
31 | 'password' => '$2y$10$06TrEefmqWBO7xghm2PUzeF/O0wcawFUv8TKYq.NF6Dsa0Pnmd/F2',
32 | 'role_id' => Role::whereName('supervisor')->first()->id,
33 | 'is_active' => true,
34 | ])->generateAvatar();
35 | }
36 |
37 | private function admin()
38 | {
39 | return Person::factory()->create([
40 | 'name' => 'Admin Root',
41 | 'appellative' => 'Admin',
42 | 'email' => 'admin@familytree365.com',
43 | 'birthday' => '1970-01-01',
44 | 'phone' => '+4412345678910',
45 | ]);
46 | }
47 |
48 | private function supervisor()
49 | {
50 | return Person::factory()->create([
51 | 'name' => 'Supervisor',
52 | 'appellative' => 'Supervisor',
53 | 'email' => 'supervisor@familytree365.com',
54 | 'birthday' => '1970-01-01',
55 | 'phone' => '+4412345678911',
56 | ]);
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/deployment/octane/.rr.prod.yaml:
--------------------------------------------------------------------------------
1 | version: '2.7'
2 | rpc:
3 | listen: 'tcp://127.0.0.1:6001'
4 | http:
5 | middleware: [ "static", "gzip", "headers" ]
6 | max_request_size: 20
7 | static:
8 | dir: "public"
9 | forbid: [ ".php", ".htaccess" ]
10 | uploads:
11 | forbid: [".php", ".exe", ".bat", ".sh"]
12 | pool:
13 | allocate_timeout: 10s
14 | destroy_timeout: 10s
15 | supervisor:
16 | max_worker_memory: 128
17 | exec_ttl: 60s
18 | logs:
19 | mode: production
20 | level: debug
21 | encoding: json
22 |
--------------------------------------------------------------------------------
/deployment/octane/entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | set -e
3 |
4 | container_mode=${CONTAINER_MODE:-app}
5 | octane_server=${OCTANE_SERVER:-swoole}
6 | echo "Container mode: $container_mode"
7 |
8 | php() {
9 | su octane -c "php $*"
10 | }
11 |
12 | initialStuff() {
13 | php artisan optimize:clear; \
14 | php artisan package:discover --ansi; \
15 | php artisan event:cache; \
16 | php artisan config:cache; \
17 | php artisan route:cache;
18 | }
19 |
20 | if [ "$1" != "" ]; then
21 | exec "$@"
22 | elif [ ${container_mode} = "app" ]; then
23 | echo "Octane server: $octane_server"
24 | initialStuff
25 | if [ ${octane_server} = "swoole" ]; then
26 | exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.app.conf
27 | elif [ ${octane_server} = "roadrunner" ]; then
28 | exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.app.roadrunner.conf
29 | else
30 | echo "Invalid Octane server supplied."
31 | exit 1
32 | fi
33 | elif [ ${container_mode} = "horizon" ]; then
34 | initialStuff
35 | exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.horizon.conf
36 | elif [ ${container_mode} = "scheduler" ]; then
37 | initialStuff
38 | exec supercronic /etc/supercronic/laravel
39 | else
40 | echo "Container mode mismatched."
41 | exit 1
42 | fi
43 |
--------------------------------------------------------------------------------
/deployment/octane/opcache.ini:
--------------------------------------------------------------------------------
1 | [Opcache]
2 | opcache.enable = 1
3 | opcache.enable_cli = 1
4 | opcache.memory_consumption = 256M
5 | opcache.use_cwd = 0
6 | opcache.max_file_size = 0
7 | opcache.max_accelerated_files = 32531
8 | opcache.validate_timestamps = 0
9 | opcache.revalidate_freq = 0
10 |
11 | [JIT]
12 | opcache.jit_buffer_size = 100M
13 | opcache.jit = function
--------------------------------------------------------------------------------
/deployment/octane/php.ini:
--------------------------------------------------------------------------------
1 | [PHP]
2 | post_max_size = 100M
3 | upload_max_filesize = 100M
4 | expose_php = 0
5 | variables_order = "GPCS"
6 |
--------------------------------------------------------------------------------
/deployment/octane/supervisord.app.conf:
--------------------------------------------------------------------------------
1 | [supervisord]
2 | nodaemon=true
3 | user=root
4 | logfile=/var/log/supervisor/supervisord.log
5 | pidfile=/var/run/supervisord.pid
6 |
7 | [program:octane]
8 | process_name=%(program_name)s_%(process_num)02d
9 | command=php /var/www/html/artisan octane:start --server=swoole --host=0.0.0.0 --port=9000 --workers=auto --task-workers=auto --max-requests=500
10 | user=octane
11 | autostart=true
12 | autorestart=true
13 | environment=LARAVEL_OCTANE="1"
14 | stdout_logfile=/dev/stdout
15 | stdout_logfile_maxbytes=0
16 | stderr_logfile=/dev/stderr
17 | stderr_logfile_maxbytes=0
18 |
19 | [program:horizon]
20 | process_name=%(program_name)s_%(process_num)02d
21 | command=php /var/www/html/artisan horizon
22 | user=octane
23 | autostart=%(ENV_APP_WITH_HORIZON)s
24 | autorestart=true
25 | stdout_logfile=/var/www/html/horizon.log
26 | stopwaitsecs=3600
27 |
28 | [program:scheduler]
29 | process_name=%(program_name)s_%(process_num)02d
30 | command=supercronic /etc/supercronic/laravel
31 | user=octane
32 | autostart=%(ENV_APP_WITH_SCHEDULER)s
33 | autorestart=true
34 | stdout_logfile=/var/www/html/scheduler.log
--------------------------------------------------------------------------------
/deployment/octane/supervisord.app.roadrunner.conf:
--------------------------------------------------------------------------------
1 | [supervisord]
2 | nodaemon=true
3 | user=root
4 | logfile=/var/log/supervisor/supervisord.log
5 | pidfile=/var/run/supervisord.pid
6 |
7 | [program:octane]
8 | process_name=%(program_name)s_%(process_num)02d
9 | command=php /var/www/html/artisan octane:start --server=roadrunner --host=0.0.0.0 --port=9000 --rpc-port=6001 --workers=auto --max-requests=500 --rr-config=/var/www/html/.rr.yaml
10 | user=octane
11 | autostart=true
12 | autorestart=true
13 | environment=LARAVEL_OCTANE="1"
14 | stdout_logfile=/dev/stdout
15 | stdout_logfile_maxbytes=0
16 | stderr_logfile=/dev/stderr
17 | stderr_logfile_maxbytes=0
18 |
19 | [program:horizon]
20 | process_name=%(program_name)s_%(process_num)02d
21 | command=php /var/www/html/artisan horizon
22 | user=octane
23 | autostart=%(ENV_APP_WITH_HORIZON)s
24 | autorestart=true
25 | stdout_logfile=/var/www/html/horizon.log
26 | stopwaitsecs=3600
27 |
28 | [program:scheduler]
29 | process_name=%(program_name)s_%(process_num)02d
30 | command=supercronic /etc/supercronic/laravel
31 | user=octane
32 | autostart=%(ENV_APP_WITH_SCHEDULER)s
33 | autorestart=true
34 | stdout_logfile=/var/www/html/scheduler.log
35 |
--------------------------------------------------------------------------------
/deployment/octane/supervisord.horizon.conf:
--------------------------------------------------------------------------------
1 | [supervisord]
2 | nodaemon=true
3 | user=root
4 | logfile=/var/log/supervisor/supervisord.log
5 | pidfile=/var/run/supervisord.pid
6 |
7 | [program:horizon]
8 | process_name=%(program_name)s_%(process_num)02d
9 | command=php /var/www/html/artisan horizon
10 | user=octane
11 | autostart=true
12 | autorestart=true
13 | stdout_logfile=/dev/stdout
14 | stdout_logfile_maxbytes=0
15 | stderr_logfile=/dev/stderr
16 | stderr_logfile_maxbytes=0
17 | stopwaitsecs=3600
18 |
--------------------------------------------------------------------------------
/deployment/octane/utilities.sh:
--------------------------------------------------------------------------------
1 | php() {
2 | echo "Running PHP as octane user ..."
3 | su octane -c "php $*"
4 | }
5 |
6 | tinker() {
7 | if [ -z "$1" ]; then
8 | php artisan tinker
9 | else
10 | php artisan tinker --execute="\"dd($1);\""
11 | fi
12 | }
13 |
14 | # Determine size of a file or total size of a directory
15 | fs() {
16 | if du -b /dev/null >/dev/null 2>&1; then
17 | local arg=-sbh
18 | else
19 | local arg=-sh
20 | fi
21 | if [[ -n "$@" ]]; then
22 | du $arg -- "$@"
23 | else
24 | du $arg .[^.]* ./*
25 | fi
26 | }
27 |
28 | # Commonly used aliases
29 | alias ..="cd .."
30 | alias ...="cd ../.."
31 | alias art="php artisan"
32 |
--------------------------------------------------------------------------------
/docker-compose.dev.yml:
--------------------------------------------------------------------------------
1 | version: '3'
2 | services:
3 |
4 | #PHP Service
5 | app:
6 | build:
7 | context: .
8 | dockerfile: ./.docker/dev/app/Dockerfile
9 | user: "www-data:www-data"
10 | container_name: app
11 | restart: unless-stopped
12 | tty: true
13 | environment:
14 | SERVICE_NAME: app
15 | SERVICE_TAGS: dev
16 | working_dir: /var/www
17 | volumes:
18 | - ./:/var/www
19 | - ./.docker/dev/app/php.ini:/usr/local/etc/php/conf.d/local.ini
20 | networks:
21 | - app-network
22 |
23 | #Nginx Service
24 | webserver:
25 | image: nginx:alpine
26 | container_name: webserver
27 | restart: unless-stopped
28 | tty: true
29 | ports:
30 | - "80:80"
31 | - "443:443"
32 | volumes:
33 | - ./:/var/www
34 | - ./.docker/dev/webserver/nginx:/etc/nginx/conf.d/
35 | networks:
36 | - app-network
37 | #command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
38 | #MySQL Service
39 | db:
40 | image: mysql:8.0
41 | container_name: db
42 | restart: unless-stopped
43 | tty: true
44 | ports:
45 | - "3306:3306"
46 | environment:
47 | MYSQL_DATABASE: ${DB_DATABASE}
48 | MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
49 | SERVICE_TAGS: dev
50 | SERVICE_NAME: mysql
51 | volumes:
52 | - ./.docker/dev/db/dbdata:/var/lib/mysql/
53 | - ./.docker/dev/db/mysql/my.cnf:/etc/mysql/my.cnf
54 | networks:
55 | - app-network
56 | command:
57 | - --sort_buffer_size=1073741824
58 | myadmin:
59 | image: 'phpmyadmin:latest'
60 | ports:
61 | - 8080:80
62 | environment:
63 | MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
64 | PMA_HOST: mysql
65 | links:
66 | - "db:mysql"
67 | depends_on:
68 | - db
69 | networks:
70 | - app-network
71 |
72 | #Docker Networks
73 | networks:
74 | app-network:
75 | driver: bridge
76 | #Volumes
77 | volumes:
78 | dbdata:
79 | driver: local
80 |
--------------------------------------------------------------------------------
/lang/app/ar.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/lang/app/br.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/lang/app/de.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/lang/app/es.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/lang/app/fr.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/lang/app/hu.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/lang/app/mn.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/lang/app/nl.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/lang/app/ro.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/lang/app/ru.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/lang/ar/auth.php:
--------------------------------------------------------------------------------
1 | 'بيانات الاعتماد هذه غير متطابقة مع البيانات المسجلة لدينا.',
16 | 'password' => 'كلمة المرور المستخدمة غير صحيحة.',
17 | 'throttle' => 'عدد كبير جدا من محاولات الدخول. يرجى المحاولة مرة أخرى بعد :seconds ثانية.',
18 | ];
19 |
--------------------------------------------------------------------------------
/lang/ar/pagination.php:
--------------------------------------------------------------------------------
1 | 'التالي »',
16 | 'previous' => '« السابق',
17 | ];
18 |
--------------------------------------------------------------------------------
/lang/ar/passwords.php:
--------------------------------------------------------------------------------
1 | 'يجب أن لا يقل طول كلمة المرور عن ستة أحرف، كما يجب أن تتطابق مع حقل التأكيد',
16 | 'reset' => 'تمت إعادة تعيين كلمة المرور!',
17 | 'sent' => 'تم إرسال تفاصيل استعادة كلمة المرور الخاصة بك إلى بريدك الإلكتروني!',
18 | 'throttled' => 'الرجاء الانتظار قبل إعادة المحاولة.',
19 | 'token' => 'رمز استعادة كلمة المرور الذي أدخلته غير صحيح.',
20 | 'user' => 'لم يتم العثور على أيّ حسابٍ بهذا العنوان الإلكتروني.',
21 | ];
22 |
--------------------------------------------------------------------------------
/lang/br/auth.php:
--------------------------------------------------------------------------------
1 | 'Estas credenciais não correspondem aos nossos registros.',
17 | 'throttle' => 'Muitas tentativas de login. Por favor, tente novamente em :seconds segundos.',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/lang/br/pagination.php:
--------------------------------------------------------------------------------
1 | '« Anterior',
17 | 'next' => 'Próxima »',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/lang/br/passwords.php:
--------------------------------------------------------------------------------
1 | 'Senhas devem ter pelo menos seis caracteres e sua confirmação deve ser equivalente.',
17 | 'reset' => 'Sua senha foi resetada!',
18 | 'sent' => 'Nós enviamos um e-mail com seu link de recuperação de senha!',
19 | 'token' => 'Este token para resetar sua senha é inválido.',
20 | 'user' => 'Nós não conseguimos achar um usuário com este endereço de e-mail.',
21 |
22 | ];
23 |
--------------------------------------------------------------------------------
/lang/de/auth.php:
--------------------------------------------------------------------------------
1 | 'Diese Kombination aus Zugangsdaten wurde nicht in unserer Datenbank gefunden.',
16 | 'password' => 'Das eingegebene Passwort ist nicht korrekt.',
17 | 'throttle' => 'Zu viele Loginversuche. Versuchen Sie es bitte in :seconds Sekunden nochmal.',
18 | ];
19 |
--------------------------------------------------------------------------------
/lang/de/pagination.php:
--------------------------------------------------------------------------------
1 | 'Weiter »',
16 | 'previous' => '« Zurück',
17 | ];
18 |
--------------------------------------------------------------------------------
/lang/de/passwords.php:
--------------------------------------------------------------------------------
1 | 'Das Passwort wurde zurückgesetzt!',
16 | 'sent' => 'Passworterinnerung wurde gesendet!',
17 | 'throttled' => 'Bitte warten Sie, bevor Sie es erneut versuchen.',
18 | 'token' => 'Der Passwort-Wiederherstellungs-Schlüssel ist ungültig oder abgelaufen.',
19 | 'user' => 'Es konnte leider kein Nutzer mit dieser E-Mail-Adresse gefunden werden.',
20 | ];
21 |
--------------------------------------------------------------------------------
/lang/en/auth.php:
--------------------------------------------------------------------------------
1 | 'These credentials do not match our records.',
17 | 'password' => 'The provided password is incorrect.',
18 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
19 |
20 | ];
21 |
--------------------------------------------------------------------------------
/lang/en/pagination.php:
--------------------------------------------------------------------------------
1 | '« Previous',
17 | 'next' => 'Next »',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/lang/en/passwords.php:
--------------------------------------------------------------------------------
1 | 'Your password has been reset!',
17 | 'sent' => 'We have emailed your password reset link!',
18 | 'throttled' => 'Please wait before retrying.',
19 | 'token' => 'This password reset token is invalid.',
20 | 'user' => "We can't find a user with that email address.",
21 |
22 | ];
23 |
--------------------------------------------------------------------------------
/lang/es/auth.php:
--------------------------------------------------------------------------------
1 | 'Estas credenciales no coinciden con nuestros registros.',
16 | 'password' => 'La contraseña ingresada no es correcta.',
17 | 'throttle' => 'Demasiados intentos de acceso. Por favor intente nuevamente en :seconds segundos.',
18 | ];
19 |
--------------------------------------------------------------------------------
/lang/es/pagination.php:
--------------------------------------------------------------------------------
1 | 'Siguiente »',
16 | 'previous' => '« Anterior',
17 | ];
18 |
--------------------------------------------------------------------------------
/lang/es/passwords.php:
--------------------------------------------------------------------------------
1 | '¡Su contraseña ha sido restablecida!',
16 | 'sent' => '¡Le hemos enviado por correo electrónico el enlace para restablecer su contraseña!',
17 | 'throttled' => 'Por favor espere antes de intentar de nuevo.',
18 | 'token' => 'El token de restablecimiento de contraseña es inválido.',
19 | 'user' => 'No encontramos ningún usuario con ese correo electrónico.',
20 | ];
21 |
--------------------------------------------------------------------------------
/lang/fr/auth.php:
--------------------------------------------------------------------------------
1 | 'Ces identifiants ne correspondent pas à nos enregistrements.',
16 | 'password' => 'Le mot de passe fourni est incorrect.',
17 | 'throttle' => 'Tentatives de connexion trop nombreuses. Veuillez essayer de nouveau dans :seconds secondes.',
18 | ];
19 |
--------------------------------------------------------------------------------
/lang/fr/pagination.php:
--------------------------------------------------------------------------------
1 | 'Suivant »',
16 | 'previous' => '« Précédent',
17 | ];
18 |
--------------------------------------------------------------------------------
/lang/fr/passwords.php:
--------------------------------------------------------------------------------
1 | 'Votre mot de passe a été réinitialisé !',
16 | 'sent' => 'Nous vous avons envoyé par email le lien de réinitialisation du mot de passe !',
17 | 'throttled' => 'Veuillez patienter avant de réessayer.',
18 | 'token' => 'Ce jeton de réinitialisation du mot de passe n\'est pas valide.',
19 | 'user' => 'Aucun utilisateur n\'a été trouvé avec cette adresse email.',
20 | ];
21 |
--------------------------------------------------------------------------------
/lang/hu/auth.php:
--------------------------------------------------------------------------------
1 | 'Rossz email-jelszó páros.',
16 | 'password' => 'A megadott jelszó helytelen.',
17 | 'throttle' => 'Túl sok próbálkozás. Kérjük próbálja újra :seconds másodperc múlva.',
18 | ];
19 |
--------------------------------------------------------------------------------
/lang/hu/pagination.php:
--------------------------------------------------------------------------------
1 | 'Következő »',
16 | 'previous' => '« Előző',
17 | ];
18 |
--------------------------------------------------------------------------------
/lang/hu/passwords.php:
--------------------------------------------------------------------------------
1 | 'Az új jelszó beállítva!',
16 | 'sent' => 'Jelszó-emlékeztető elküldve!',
17 | 'throttled' => 'Kérjük várjon, mielőtt újra megpróbálná.',
18 | 'token' => 'Ez az új jelszó generálásához tartozó token érvénytelen.',
19 | 'user' => 'Nem található felhasználó a megadott email címmel.',
20 | ];
21 |
--------------------------------------------------------------------------------
/lang/mn/auth.php:
--------------------------------------------------------------------------------
1 | 'Хэрэглэгчийн нэр эсвэл нууц үг буруу.',
16 | 'password' => 'The provided password is incorrect.',
17 | 'throttle' => 'Олон удаагийн буруу оролдого. :seconds секундийн дараа дахин оролдоно уу.',
18 | ];
19 |
--------------------------------------------------------------------------------
/lang/mn/pagination.php:
--------------------------------------------------------------------------------
1 | 'Дараах »',
16 | 'previous' => '« Өмнөх',
17 | ];
18 |
--------------------------------------------------------------------------------
/lang/mn/passwords.php:
--------------------------------------------------------------------------------
1 | 'Таний нууц үг шинэчлэгдсэн!',
16 | 'sent' => 'Нууц үг сэргээх холбоосийг таний и-мэйл хаяг уруу явуулсан!',
17 | 'throttled' => 'Татаж өмнө хүлээх уу.',
18 | 'token' => 'Алдаатай нууц үг сэргээх холбоос.',
19 | 'user' => 'Ийм и-мэйл хаягтай хэрэглэгч олдсонгүй.',
20 | ];
21 |
--------------------------------------------------------------------------------
/lang/nl/auth.php:
--------------------------------------------------------------------------------
1 | 'Deze combinatie van e-mailadres en wachtwoord is niet geldig.',
16 | 'password' => 'Het opgegeven wachtwoord is onjuist.',
17 | 'throttle' => 'Te veel mislukte loginpogingen. Probeer het over :seconds seconden nogmaals.',
18 | ];
19 |
--------------------------------------------------------------------------------
/lang/nl/pagination.php:
--------------------------------------------------------------------------------
1 | 'Volgende »',
16 | 'previous' => '« Vorige',
17 | ];
18 |
--------------------------------------------------------------------------------
/lang/nl/passwords.php:
--------------------------------------------------------------------------------
1 | 'Het wachtwoord van uw account is gewijzigd.',
16 | 'sent' => 'We hebben een e-mail verstuurd met instructies om een nieuw wachtwoord in te stellen.',
17 | 'throttled' => 'Gelieve even te wachten voor u het opnieuw probeert.',
18 | 'token' => 'Dit wachtwoordhersteltoken is niet geldig.',
19 | 'user' => 'Geen gebruiker bekend met het e-mailadres.',
20 | ];
21 |
--------------------------------------------------------------------------------
/lang/ro/auth.php:
--------------------------------------------------------------------------------
1 | 'Datele de identificare nu pot fi confirmate.',
16 | 'password' => 'Parola introdusă, nu este corectă.',
17 | 'throttle' => 'Prea multe încercări de intrare în cont. Puteți încerca din nou peste :seconds secunde.',
18 | ];
19 |
--------------------------------------------------------------------------------
/lang/ro/pagination.php:
--------------------------------------------------------------------------------
1 | 'Înainte »',
16 | 'previous' => '« Înapoi',
17 | ];
18 |
--------------------------------------------------------------------------------
/lang/ro/passwords.php:
--------------------------------------------------------------------------------
1 | 'Parola a fost resetată!',
16 | 'sent' => 'Am trimis un e-mail cu link-ul de resetare a parolei!',
17 | 'throttled' => 'Vă rugăm să așteptați înainte de a încerca din nou.',
18 | 'token' => 'Codul de resetare a parolei este greșit.',
19 | 'user' => 'Nu există niciun utilizator cu această adresă de e-mail.',
20 | ];
21 |
--------------------------------------------------------------------------------
/lang/ru/auth.php:
--------------------------------------------------------------------------------
1 | 'Неверное имя пользователя или пароль.',
16 | 'password' => 'Неверный пароль.',
17 | 'throttle' => 'Слишком много попыток входа. Пожалуйста, попробуйте еще раз через :seconds секунд.',
18 | ];
19 |
--------------------------------------------------------------------------------
/lang/ru/pagination.php:
--------------------------------------------------------------------------------
1 | 'Вперёд »',
16 | 'previous' => '« Назад',
17 | ];
18 |
--------------------------------------------------------------------------------
/lang/ru/passwords.php:
--------------------------------------------------------------------------------
1 | 'Ваш пароль был сброшен!',
16 | 'sent' => 'Ссылка на сброс пароля была отправлена!',
17 | 'throttled' => 'Пожалуйста, подождите перед повторной попыткой.',
18 | 'token' => 'Ошибочный код сброса пароля.',
19 | 'user' => 'Не удалось найти пользователя с указанным электронным адресом.',
20 | ];
21 |
--------------------------------------------------------------------------------
/laravel-echo-server.lock:
--------------------------------------------------------------------------------
1 | {
2 | "process": 21088
3 | }
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "genealogy_backend",
3 | "lockfileVersion": 2,
4 | "requires": true,
5 | "packages": {}
6 | }
7 |
--------------------------------------------------------------------------------
/public/.htaccess:
--------------------------------------------------------------------------------
1 |
6 |
7 | @if(config('liberu.config.facebook'))
8 |
9 | |
25 |