├── .env.dist ├── .env.testing.dist ├── .gitattributes ├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── .travis.yml ├── .travis └── php.ini ├── COPYRIGHT ├── LICENSE ├── README.md ├── app ├── Client │ ├── ClassifierExternalClient.php │ ├── GuzzleAdPayClient.php │ ├── GuzzleAdSelectClient.php │ ├── GuzzleAdUserClient.php │ ├── GuzzleAdsOperatorClient.php │ ├── GuzzleAdsRpcClient.php │ ├── GuzzleClassifierExternalClient.php │ ├── GuzzleDemandClient.php │ ├── GuzzleLicenseClient.php │ ├── GuzzlePublisherBannerClassifier.php │ ├── GuzzleSupplyClient.php │ ├── LocalPublisherBannerClassifier.php │ ├── Mapper │ │ ├── AbstractFilterMapper.php │ │ ├── AdPay │ │ │ ├── DemandBidStrategyMapper.php │ │ │ ├── DemandCampaignMapper.php │ │ │ └── DemandEventMapper.php │ │ ├── AdSelect │ │ │ ├── BoostPaymentMapper.php │ │ │ ├── CampaignMapper.php │ │ │ ├── CaseClickMapper.php │ │ │ ├── CaseMapper.php │ │ │ ├── CasePaymentMapper.php │ │ │ ├── EventMapper.php │ │ │ ├── EventPaymentMapper.php │ │ │ └── TargetingMapper.php │ │ └── JsonValueMapper.php │ └── MultipleExternalClassifierAdClassifyClient.php ├── Console │ ├── Commands │ │ ├── AdPayCampaignExportCommand.php │ │ ├── AdPayEventExportCommand.php │ │ ├── AdPayGetPayments.php │ │ ├── AdSelectCaseExportCommand.php │ │ ├── AdSelectCasePaymentsExportCommand.php │ │ ├── AdSelectInventoryExporterCommand.php │ │ ├── AdsBroadcastHost.php │ │ ├── AdsFetchHosts.php │ │ ├── AdsMe.php │ │ ├── AdsProcessTx.php │ │ ├── AggregateCaseStatisticsPublisherCommand.php │ │ ├── AggregateStatisticsAdvertiserCommand.php │ │ ├── BackupAdServerStatisticsCommand.php │ │ ├── BannerClassificationsCreateCommand.php │ │ ├── BannerClassificationsRequestCommand.php │ │ ├── BaseCommand.php │ │ ├── CdnResetBannersCommand.php │ │ ├── CdnUploadBannersCommand.php │ │ ├── ClearEvents.php │ │ ├── ClearReports.php │ │ ├── CreateAdminUserCommand.php │ │ ├── CreateOauthClientCommand.php │ │ ├── DeleteUserCommand.php │ │ ├── DemandBlockRequiredAmount.php │ │ ├── DemandPreparePayments.php │ │ ├── DemandProcessPayments.php │ │ ├── DemandSendPayments.php │ │ ├── EmailNotificationsSendCommand.php │ │ ├── ExpiredWithdrawalCancellationCommand.php │ │ ├── FetchExchangeRateCommand.php │ │ ├── FetchLicenseCommand.php │ │ ├── InventoryImporterCommand.php │ │ ├── ListAdministratorsCommand.php │ │ ├── SendEmailsCommand.php │ │ ├── SendJoiningFee.php │ │ ├── SiteAdsTxtCheckCommand.php │ │ ├── SiteClassificationUpdateCommand.php │ │ ├── SiteRankReassessRequestCommand.php │ │ ├── SiteRankUpdateCommand.php │ │ ├── SupplyDefaultPlaceholdersReloadCommand.php │ │ ├── SupplyProcessPayments.php │ │ ├── TargetingReachCompute.php │ │ ├── TargetingReachFetch.php │ │ ├── TransferMoneyToColdWalletCommand.php │ │ ├── UpdateFilteringOptions.php │ │ ├── UpdateServeDomainsCommand.php │ │ ├── UpdateTargetingOptions.php │ │ ├── UpsertConfigurationCommand.php │ │ ├── WalletAmountCheckCommand.php │ │ └── WalletWithdrawalCheckCommand.php │ ├── Kernel.php │ ├── LineFormatterTrait.php │ └── Locker.php ├── Events │ ├── CampaignCreating.php │ ├── CreativeSha1.php │ ├── GenerateUUID.php │ ├── ReportMetaDeleting.php │ ├── ServerEvent.php │ └── UserCreated.php ├── Exceptions │ ├── Advertiser │ │ └── MissingEventsException.php │ ├── ConsoleCommandException.php │ ├── Demand │ │ ├── AdPayReportMissingEventsException.php │ │ └── AdPayReportNotReadyException.php │ ├── Handler.php │ ├── JobException.php │ ├── MissingInitialConfigurationException.php │ └── Publisher │ │ └── MissingCasesException.php ├── Facades │ └── DB.php ├── Http │ ├── Controller.php │ ├── Controllers │ │ ├── ClassificationController.php │ │ ├── ClassifyController.php │ │ ├── ConversionController.php │ │ ├── DemandController.php │ │ ├── InfoController.php │ │ ├── Manager │ │ │ ├── AdminController.php │ │ │ ├── ApiCampaignsController.php │ │ │ ├── ApiTaxonomyController.php │ │ │ ├── AuthController.php │ │ │ ├── BidStrategyController.php │ │ │ ├── CampaignsController.php │ │ │ ├── ClassifierController.php │ │ │ ├── ConfigController.php │ │ │ ├── InvoicesController.php │ │ │ ├── NotificationsController.php │ │ │ ├── OAuthController.php │ │ │ ├── OptionsController.php │ │ │ ├── RefLinksController.php │ │ │ ├── ServerConfigurationController.php │ │ │ ├── ServerMonitoringController.php │ │ │ ├── SettingsController.php │ │ │ ├── Simulator.php │ │ │ ├── SitesController.php │ │ │ ├── StatisticsGlobalController.php │ │ │ ├── StatsController.php │ │ │ ├── SupplyBannerPlaceholderController.php │ │ │ ├── UsersController.php │ │ │ └── WalletController.php │ │ └── SupplyController.php │ ├── GzippedStreamedResponse.php │ ├── Kernel.php │ ├── Middleware │ │ ├── AddHeadersToResponse.php │ │ ├── CamelizeJsonResponse.php │ │ ├── CheckForMaintenanceMode.php │ │ ├── Impersonation.php │ │ ├── RequireAdminAccess.php │ │ ├── RequireAdvertiserAccess.php │ │ ├── RequireAgencyAccess.php │ │ ├── RequireGuestAccess.php │ │ ├── RequireModeratorAccess.php │ │ ├── RequirePublisherAccess.php │ │ ├── SnakizeRequest.php │ │ ├── StatisticsCollectorAccess.php │ │ ├── TrackUserActivity.php │ │ └── TrustProxies.php │ ├── Request │ │ └── Classifier │ │ │ └── NetworkBannerFilter.php │ ├── Requests │ │ ├── BidStrategyRequest.php │ │ ├── Campaign │ │ │ ├── BannerValidator.php │ │ │ ├── CampaignTargetingProcessor.php │ │ │ └── TargetingProcessor.php │ │ ├── Common │ │ │ └── LimitValidator.php │ │ ├── Filter │ │ │ ├── BoolFilter.php │ │ │ ├── DateFilter.php │ │ │ ├── Filter.php │ │ │ ├── FilterCollection.php │ │ │ ├── FilterType.php │ │ │ └── StringFilter.php │ │ ├── FormRequest.php │ │ ├── GetSiteCode.php │ │ ├── Order │ │ │ ├── OrderBy.php │ │ │ └── OrderByCollection.php │ │ ├── TargetingReachRequest.php │ │ └── UpdateRegulation.php │ ├── Resources │ │ ├── BannerResource.php │ │ ├── CampaignResource.php │ │ ├── GenericCollection.php │ │ ├── HostResource.php │ │ ├── SupplyBannerPlaceholderResource.php │ │ └── UserResource.php │ ├── Response │ │ ├── Classifier │ │ │ ├── ClassifierResponse.php │ │ │ └── Item.php │ │ ├── InfoResponse.php │ │ ├── LicenseResponse.php │ │ ├── Site │ │ │ └── SizesResponse.php │ │ └── Stats │ │ │ ├── AdvertiserReportResponse.php │ │ │ ├── BidStrategySpreadsheetResponse.php │ │ │ ├── PublisherReportResponse.php │ │ │ ├── ReportResponse.php │ │ │ └── ReportsListResponse.php │ └── Utils.php ├── Jobs │ ├── AdsSendOne.php │ └── ExecuteCommand.php ├── Listeners │ └── ServerEventListener.php ├── Logging │ └── CustomizeFormatter.php ├── Mail │ ├── AuthRecovery.php │ ├── BannerClassified.php │ ├── CampaignResume.php │ ├── Crm │ │ ├── CampaignCreated.php │ │ ├── SiteAdded.php │ │ └── UserRegistered.php │ ├── DepositProcessed.php │ ├── InvoiceCreated.php │ ├── Newsletter.php │ ├── Notifications │ │ ├── CampaignAccepted.php │ │ ├── CampaignDraft.php │ │ ├── CampaignEnded.php │ │ ├── CampaignEndedExtend.php │ │ ├── CampaignEnds.php │ │ ├── FundsEnded.php │ │ ├── FundsEnds.php │ │ ├── InactiveAdvertiser.php │ │ ├── InactivePublisher.php │ │ ├── InactiveUser.php │ │ ├── InactiveUserExtend.php │ │ ├── InactiveUserWhoDeposit.php │ │ ├── SiteAccepted.php │ │ └── SiteDraft.php │ ├── PanelPlaceholdersChange.php │ ├── SiteAdsTxtInvalid.php │ ├── SiteAdsTxtValid.php │ ├── SiteApprovalPending.php │ ├── TechnicalError.php │ ├── UserBanned.php │ ├── UserConfirmed.php │ ├── UserEmailActivate.php │ ├── UserEmailChangeConfirm1Old.php │ ├── UserEmailChangeConfirm2New.php │ ├── UserPasswordChange.php │ ├── UserPasswordChangeConfirm.php │ ├── WalletConnectConfirm.php │ ├── WalletConnected.php │ ├── WalletFundsEmail.php │ ├── WithdrawalApproval.php │ └── WithdrawalSuccess.php ├── Manager │ └── EloquentTransactionManager.php ├── Models │ ├── AdsPayment.php │ ├── AdsPaymentMeta.php │ ├── AdvertiserBudget.php │ ├── Banner.php │ ├── BannerClassification.php │ ├── BidStrategy.php │ ├── BidStrategyDetail.php │ ├── Campaign.php │ ├── Classification.php │ ├── Config.php │ ├── Conversion.php │ ├── ConversionDefinition.php │ ├── Email.php │ ├── EventBoostLog.php │ ├── EventConversionLog.php │ ├── EventLog.php │ ├── EventLogsHourlyMeta.php │ ├── ExchangeRate.php │ ├── Invoice.php │ ├── JoiningFee.php │ ├── JoiningFeeLog.php │ ├── NetworkBanner.php │ ├── NetworkBoostPayment.php │ ├── NetworkCampaign.php │ ├── NetworkCase.php │ ├── NetworkCaseClick.php │ ├── NetworkCaseLogsHourlyMeta.php │ ├── NetworkCasePayment.php │ ├── NetworkHost.php │ ├── NetworkImpression.php │ ├── NetworkMissedCase.php │ ├── NetworkPayment.php │ ├── NetworkVectorsMeta.php │ ├── Notification.php │ ├── NotificationEmailLog.php │ ├── NowPaymentsLog.php │ ├── PanelPlaceholder.php │ ├── Payment.php │ ├── PaymentReport.php │ ├── PublisherBoostLedgerEntry.php │ ├── RefLink.php │ ├── ReportMeta.php │ ├── ServeDomain.php │ ├── ServerEventLog.php │ ├── Site.php │ ├── SiteRejectReason.php │ ├── SitesRejectedDomain.php │ ├── SspHost.php │ ├── SupplyBannerPlaceholder.php │ ├── Token.php │ ├── Traits │ │ ├── AccountAddress.php │ │ ├── AddressWithNetwork.php │ │ ├── AutomateMutators.php │ │ ├── BinHex.php │ │ ├── DateAtom.php │ │ ├── JsonValue.php │ │ ├── Ownership.php │ │ ├── OwnershipScope.php │ │ ├── Serialize.php │ │ └── TransactionId.php │ ├── TurnoverEntry.php │ ├── UploadedFile.php │ ├── User.php │ ├── UserLedgerEntry.php │ ├── UserSettings.php │ └── Zone.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BuilderMacros │ │ └── TokenPaginate.php │ ├── CloudflareIpServiceProvider.php │ ├── Common │ │ ├── ClientProvider.php │ │ ├── OptionsProvider.php │ │ └── PassportServiceProvider.php │ ├── EventServiceProvider.php │ ├── MacrosProvider.php │ ├── RepositoryServiceProvider.php │ ├── RouteServiceProvider.php │ ├── Supply │ │ ├── ClassifyProvider.php │ │ ├── InventoryImporterProvider.php │ │ └── PaymentDetailsVerifyProvider.php │ └── WalletUserProvider.php ├── Repository │ ├── Advertiser │ │ ├── MySqlAggregatedStatsQueryBuilder.php │ │ ├── MySqlLiveStatsQueryBuilder.php │ │ └── MySqlStatsRepository.php │ ├── CampaignRepository.php │ ├── Common │ │ ├── AccessTokenRepository.php │ │ ├── ClassifierExternalRepository.php │ │ ├── Dto │ │ │ └── ClassifierExternal.php │ │ ├── EloquentExchangeRateRepository.php │ │ ├── EloquentServerEventLogRepository.php │ │ ├── EloquentUserRepository.php │ │ ├── MySqlQueryBuilder.php │ │ ├── MySqlServerStatisticsRepository.php │ │ ├── ServerEventLogRepository.php │ │ ├── TotalFeeReader.php │ │ └── UserRepository.php │ ├── Demand │ │ └── MySqlDemandServerStatisticsRepository.php │ ├── FileConfigurationRepository.php │ ├── Publisher │ │ ├── MySqlAggregatedStatsQueryBuilder.php │ │ ├── MySqlLiveStatsQueryBuilder.php │ │ └── MySqlStatsRepository.php │ └── Supply │ │ ├── MySqlSupplyServerStatisticsRepository.php │ │ ├── NetworkCampaignRepository.php │ │ └── NetworkHostRepository.php ├── Rules │ ├── AccountIdRule.php │ └── PayoutAddressRule.php ├── Services │ ├── AdsExchange.php │ ├── Advertiser │ │ ├── Dto │ │ │ ├── TargetingReach.php │ │ │ └── TargetingReachVector.php │ │ ├── NetworkVectorComputer.php │ │ └── TargetingReachComputer.php │ ├── Cdn │ │ ├── CdnProvider.php │ │ ├── CdnProviderFactory.php │ │ └── SkynetCdn.php │ ├── Common │ │ ├── AdsLogReader.php │ │ ├── AdsTxtCrawler.php │ │ ├── ClassifierExternalSignatureVerifier.php │ │ ├── CrmNotifier.php │ │ ├── Dto │ │ │ └── EmailData.php │ │ ├── EmailJobsQueuing.php │ │ ├── Exception │ │ │ └── UserDeletionException.php │ │ ├── MetaverseAddressValidator.php │ │ ├── ReportsStorage.php │ │ └── UserDelete.php │ ├── ConversionValidator.php │ ├── Demand │ │ ├── AdPayPaymentReportProcessor.php │ │ ├── BannerClassificationCreator.php │ │ ├── BannerCreator.php │ │ └── CampaignCreator.php │ ├── Dto │ │ └── PaymentProcessingResult.php │ ├── EventCaseFinder.php │ ├── LicenseFeeSender.php │ ├── NowPayments.php │ ├── PaymentDetailsFeeCalculator.php │ ├── PaymentDetailsProcessor.php │ ├── Publisher │ │ ├── SiteCategoriesValidator.php │ │ ├── SiteCodeConfig.php │ │ ├── SiteCodeConfigPops.php │ │ └── SiteCodeGenerator.php │ └── Supply │ │ ├── AdSelectCaseExporter.php │ │ ├── BannerPlaceholderConverter.php │ │ ├── BannerPlaceholderProvider.php │ │ ├── DefaultBannerPlaceholderGenerator.php │ │ ├── NetworkImpressionUpdater.php │ │ ├── SiteFilteringMatcher.php │ │ └── SiteFilteringUpdater.php ├── Uploader │ ├── DirectLink │ │ ├── DirectLinkUploader.php │ │ └── UploadedDirectLink.php │ ├── Factory.php │ ├── Html │ │ ├── HtmlUploader.php │ │ └── UploadedHtml.php │ ├── Image │ │ ├── ImageUploader.php │ │ └── UploadedImage.php │ ├── Model │ │ ├── ModelUploader.php │ │ └── UploadedModel.php │ ├── PlaceholderUploader.php │ ├── UploadedFile.php │ ├── Uploader.php │ └── Video │ │ ├── UploadedVideo.php │ │ └── VideoUploader.php ├── Utilities │ ├── AdPanelUrlBuilder.php │ ├── AdsAuthenticator.php │ ├── AdsUtils.php │ ├── ArrayUtils.php │ ├── BinaryStringUtils.php │ ├── ClassifierExternalKeywordsSerializer.php │ ├── ConfigTypes.php │ ├── CssUtils.php │ ├── DatabaseConfigReader.php │ ├── DateUtils.php │ ├── DomainReader.php │ ├── EthUtils.php │ ├── InvoiceUtils.php │ ├── NonceGenerator.php │ ├── Pagination │ │ └── TokenPaginator.php │ ├── PercentileComputer.php │ ├── SiteUtils.php │ ├── SiteValidator.php │ ├── SqlUtils.php │ ├── UniqueId.php │ ├── UniqueIdentifierFactory.php │ └── UuidStringGenerator.php └── ViewModel │ ├── AccessToken.php │ ├── BannerStatus.php │ ├── CampaignStatus.php │ ├── ClickConversionType.php │ ├── MediumName.php │ ├── MetaverseVendor.php │ ├── NotificationEmailCategory.php │ ├── OptionsSelector.php │ ├── Role.php │ ├── ScopeType.php │ ├── ServerEventType.php │ └── ZoneSize.php ├── artisan ├── bin ├── artisan.sh ├── composer.sh ├── init.sh └── php.sh ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── activitylog.php ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── cors.php ├── database.php ├── filesystems.php ├── hashing.php ├── jwt │ └── .gitignore ├── logging.php ├── mail.php ├── passport.php ├── queue.php ├── services.php ├── session.php └── view.php ├── database ├── factories │ ├── AdsPaymentFactory.php │ ├── AdsPaymentMetaFactory.php │ ├── BannerFactory.php │ ├── BidStrategyFactory.php │ ├── CampaignFactory.php │ ├── ClassificationFactory.php │ ├── ConfigFactory.php │ ├── ConversionDefinitionFactory.php │ ├── ConversionFactory.php │ ├── EventBoostLogFactory.php │ ├── EventConversionLogFactory.php │ ├── EventLogFactory.php │ ├── InvoiceFactory.php │ ├── JoiningFeeFactory.php │ ├── JoiningFeeLogFactory.php │ ├── NetworkBannerFactory.php │ ├── NetworkBoostPaymentFactory.php │ ├── NetworkCampaignFactory.php │ ├── NetworkCaseFactory.php │ ├── NetworkCasePaymentFactory.php │ ├── NetworkHostFactory.php │ ├── NetworkImpressionFactory.php │ ├── NetworkMissedCaseFactory.php │ ├── NetworkVectorsMetaFactory.php │ ├── NotificationEmailLogFactory.php │ ├── PaymentFactory.php │ ├── PublisherBoostLedgerEntryFactory.php │ ├── RefLinkFactory.php │ ├── ServeDomainFactory.php │ ├── ServerEventLogFactory.php │ ├── SiteFactory.php │ ├── SiteRejectReasonFactory.php │ ├── SitesRejectedDomainFactory.php │ ├── SspHostFactory.php │ ├── SupplyBannerPlaceholderFactory.php │ ├── TurnoverEntryFactory.php │ ├── UploadedFileFactory.php │ ├── UserFactory.php │ ├── UserLedgerEntryFactory.php │ └── ZoneFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2016_06_01_000001_create_oauth_auth_codes_table.php │ ├── 2016_06_01_000002_create_oauth_access_tokens_table.php │ ├── 2016_06_01_000003_create_oauth_refresh_tokens_table.php │ ├── 2016_06_01_000004_create_oauth_clients_table.php │ ├── 2016_06_01_000005_create_oauth_personal_access_clients_table.php │ ├── 2018_04_06_103846_create_campaigns_table.php │ ├── 2018_04_06_103848_create_banners_table.php │ ├── 2018_04_06_103900_create_event_logs_table.php │ ├── 2018_04_06_103900_create_network_campaigns_table.php │ ├── 2018_04_06_103900_create_network_event_logs_table.php │ ├── 2018_04_06_103902_create_network_banners_table.php │ ├── 2018_04_06_103910_create_network_hosts_table.php │ ├── 2018_04_06_103920_create_network_payments_table.php │ ├── 2018_04_06_103920_create_payments_table.php │ ├── 2018_04_06_103928_create_sites_table.php │ ├── 2018_04_06_103930_create_zones_table.php │ ├── 2018_06_15_055026_create_jobs_table.php │ ├── 2018_07_04_220157_create_failed_jobs_table.php │ ├── 2018_07_04_220436_create_tokens_table.php │ ├── 2018_07_23_121101_create_notifications_table.php │ ├── 2018_07_23_121623_create_users_settings_table.php │ ├── 2018_10_15_130030_create_ads_payments_table.php │ ├── 2018_10_15_153907_create_configs_table.php │ ├── 2018_10_16_112832_create_user_ledgers_table.php │ ├── 2019_01_21_090259_add_error_code_to_network_hosts_table.php │ ├── 2019_02_14_120900_add_classification_to_network_banners_table.php │ ├── 2019_02_18_080158_create_classification_table.php │ ├── 2019_02_20_102741_change_classification_to_classifications_table.php │ ├── 2019_02_21_113307_change_classifications_signature_field.php │ ├── 2019_02_27_143641_add_classified_booleans_to_sites.php │ ├── 2019_03_01_102146_add_info_field_to_network_hosts_table.php │ ├── 2019_03_04_091037_replace_js_enabled_key.php │ ├── 2019_03_06_071921_change_event_logs_human_score_to_decimal.php │ ├── 2019_03_06_072002_change_network_event_logs_human_score_to_decimal.php │ ├── 2019_03_12_135004_insert_config_settings.php │ ├── 2019_03_13_143325_create_regulations_table.php │ ├── 2019_03_20_180000_insert_config_wallet_disable.php │ ├── 2019_03_28_111356_change_event_logs_add_domain_column.php │ ├── 2019_03_28_111405_change_network_event_logs_add_domain_column.php │ ├── 2019_03_29_142707_update_license_config.php │ ├── 2019_04_05_072801_insert_config_adpay_event_last_exported_id.php │ ├── 2019_04_08_125259_change_network_campaigns_publisher_id_null.php │ ├── 2019_04_08_134251_change_network_banners_add_demand_banner_id.php │ ├── 2019_04_08_142523_create_exchange_rates_table.php │ ├── 2019_04_11_084433_update_config_entry_name_for_cold_wallet.php │ ├── 2019_04_12_123957_bonus_config.php │ ├── 2019_04_19_123103_change_event_logs_add_currency.php │ ├── 2019_04_19_140059_even_tracking_id.php │ ├── 2019_04_24_110427_delete_overwritten_classification.php │ ├── 2019_04_25_111529_ipv6.php │ ├── 2019_05_14_123157_create_statistics_aggregates.php │ ├── 2019_05_21_093919_add_index_to_statistics_aggregates.php │ ├── 2019_05_22_103648_change_config_entry_for_adselect_export.php │ ├── 2019_05_23_103023_change_network_event_logs.php │ ├── 2019_05_23_131345_change_network_banners_uuid_index.php │ ├── 2019_05_24_114206_network_event_logs_tracking_id.php │ ├── 2019_05_29_072338_delete_event_export_data_from_config.php │ ├── 2019_05_29_164544_add_referrer_user_id_to_users_table.php │ ├── 2019_06_13_131014_change_config_add_adselect_export_event_id.php │ ├── 2019_06_18_112315_add_processed_transaction_offset.php │ ├── 2019_06_24_144849_add_index_to_created_at_for_events.php │ ├── 2019_07_02_053653_add_conversion_to_campaign.php │ ├── 2019_07_04_141336_add_indexes_to_user_ledger_entries.php │ ├── 2019_07_09_112042_create_event_conversion_logs.php │ ├── 2019_07_10_074151_create_conversion_definitions_table.php │ ├── 2019_07_10_074254_create_conversion_groups_table.php │ ├── 2019_07_11_074437_create_serve_domains_table.php │ ├── 2019_07_15_121337_create_banner_classifications_table.php │ ├── 2019_07_19_123737_change_classifications_drop_signature.php │ ├── 2019_07_30_102337_create_supply_blacklisted_domains_table.php │ ├── 2019_07_31_082859_drop_headers_column_from_events.php │ ├── 2019_07_31_114933_create_emails_table.php │ ├── 2019_08_07_104346_split_network_event_logs.php │ ├── 2019_08_09_081121_add_subscribe_to_users.php │ ├── 2019_08_23_134439_drop_headers_column_from_conversion_events.php │ ├── 2019_09_06_131424_add_type_index_to_user_ledger_entries_table.php │ ├── 2019_09_28_141618_drop_network_event_logs_table.php │ ├── 2019_10_02_143013_change_config_adpay_last_exported_event.php │ ├── 2019_10_03_140647_delete_adselect_export_data_from_config.php │ ├── 2019_10_04_131737_change_conversion_definitions_budget_type.php │ ├── 2019_10_10_074254_create_conversions_table.php │ ├── 2019_10_14_074221_change_event_logs_rename_column_reason.php │ ├── 2019_10_22_120833_create_payment_reports_table.php │ ├── 2019_10_25_121904_drop_conversion_groups_table.php │ ├── 2019_10_30_130103_add_transaction_time_to_ads_payments_table.php │ ├── 2019_11_04_123530_create_network_case_logs_hourly_meta_table.php │ ├── 2019_11_06_104633_add_page_rank_column.php │ ├── 2019_11_08_110215_add_unique_views_for_campaign.php │ ├── 2019_11_13_161923_change_width_and_height_into_size.php │ ├── 2019_11_21_131425_add_domain_to_sites.php │ ├── 2019_12_02_135435_drop_limit_from_conversion_definition.php │ ├── 2019_12_05_130532_create_event_logs_hourly_meta_table.php │ ├── 2019_12_09_115102_add_cost_payment_to_event_logs_hourly.php │ ├── 2020_01_07_154048_create_stats_aggregates_tables.php │ ├── 2020_01_10_115128_create_now_payments_logs_table.php │ ├── 2020_01_14_102704_create_conversions_hourly_table.php │ ├── 2020_02_03_141305_create_network_vectors_tables.php │ ├── 2020_02_18_105555_add_currency_to_user_ledger.php │ ├── 2020_02_19_171824_create_report_metas_table.php │ ├── 2020_04_09_095423_add_rank_to_sites.php │ ├── 2020_04_27_165418_rename_regulations_table.php │ ├── 2020_05_04_125910_create_bid_strategy_tables.php │ ├── 2020_05_23_131631_create_sites_rejected_domains_table.php │ ├── 2020_05_27_183954_add_reassess_to_sites.php │ ├── 2020_06_08_121239_add_categories_to_sites.php │ ├── 2020_06_17_094723_add_categories_by_user_to_sites.php │ ├── 2020_06_25_111021_add_soft_delete_to_bid_strategies.php │ ├── 2021_03_13_103813_add_country_to_network_impressions.php │ ├── 2021_06_11_115932_add_status_index_to_user_ledger_entries_table.php │ ├── 2021_06_18_115912_add_cdn_url_to_banners.php │ ├── 2021_07_19_124220_create_ref_links_table.php │ ├── 2021_07_19_124300_add_ref_link_id_to_users_table.php │ ├── 2021_07_19_143137_referral_refund_config.php │ ├── 2021_07_28_131939_registration_mode_config.php │ ├── 2021_08_02_113449_add_admin_confirmed_at_to_users.php │ ├── 2021_08_19_091247_create_invoices_table.php │ ├── 2021_12_07_141635_add_moderator_and_agency_roles.php │ ├── 2021_12_13_115444_add_wallet_address_to_user.php │ ├── 2021_12_21_134749_add_auto_registration_setting.php │ ├── 2022_01_05_140456_add_email_verification_required_setting.php │ ├── 2022_01_17_165804_add_only_accepted_banners_to_site.php │ ├── 2022_01_18_145238_allow_auto_cpm.php │ ├── 2022_01_20_115956_add_mime_to_banners.php │ ├── 2022_03_01_113942_add_medium_name.php │ ├── 2022_04_07_085106_alter_banners_creative_contents.php │ ├── 2022_04_26_173410_site_settings_config.php │ ├── 2022_05_04_15494103_add_medium_to_bid_strategy.php │ ├── 2022_05_06_143357_add_ban_to_users.php │ ├── 2022_05_18_125033_fix_metaverse_site_name.php │ ├── 2022_07_07_161203_add_medium_to_network_campaigns.php │ ├── 2022_07_20_101041_move_env_to_config.php │ ├── 2022_08_04_100616_add_logs_tables_clearing_procedures.php │ ├── 2022_09_20_112411_add_user_roles_to_ref_links.php │ ├── 2022_09_30_065846_add_status_to_network_hosts.php │ ├── 2022_10_12_070755_create_server_event_logs_table.php │ ├── 2022_10_24_053805_add_last_active_at_to_users.php │ ├── 2022_10_28_092618_create_activity_log_table.php │ ├── 2022_11_17_150343_drop_campaigns_legacy_columns.php │ ├── 2022_11_28_095119_fix_config_case.php │ ├── 2022_12_13_140411_metaverse_zone_consolidation.php │ ├── 2022_12_21_081628_create_uploaded_files_table.php │ ├── 2023_01_02_144509_change_network_hosts_extend_status.php │ ├── 2023_01_13_142418_add_approval_to_sites.php │ ├── 2023_01_17_155259_add_last_synchronization_attempt_to_network_hosts.php │ ├── 2023_01_30_120227_set_sites_accepted_at.php │ ├── 2023_02_08_092608_add_community_fee_to_event_logs.php │ ├── 2023_03_15_093732_create_site_reject_reasons.php │ ├── 2023_04_06_090327_add_ads_txt_to_sites.php │ ├── 2023_04_17_100747_create_turnover_entries_table.php │ ├── 2023_05_25_075458_create_supply_banner_placeholders_table.php │ ├── 2023_06_30_113758_create_notification_email_logs_table.php │ ├── 2023_07_05_104501_add_signed_at_to_network_banners.php │ ├── 2023_07_25_133942_add_only_direct_deals_to_sites.php │ └── 2024_02_09_132520_paid_experiments.php ├── mock-data │ ├── campaigns-advertisers.json │ ├── sites-publishers.json │ ├── user-ledger.json │ └── users.json └── seeders │ ├── DatabaseSeeder.php │ ├── MockDataCampaignsSeeder.php │ ├── MockDataNetworkHostsSeeder.php │ ├── MockDataPaymentsAndEventLogsSeeder.php │ ├── MockDataSeeder.php │ ├── MockDataSitesSeeder.php │ ├── MockDataUserLedgerSeeder.php │ ├── MockDataUsersSeeder.php │ └── assets │ ├── ads │ ├── ads_160x600.png │ ├── ads_320x50.png │ ├── ads_468x60.png │ └── ads_970x90.png │ ├── ads2 │ ├── ads1_230x600.png │ ├── ads1_728x90.png │ ├── ads1_750x300.png │ ├── ads2_230x600.png │ ├── ads2_750x300.png │ ├── adshares_160x600.png │ ├── esc_728x90.png │ ├── slide16-750x200.png │ └── startup3_750x200.png │ ├── cats │ ├── cats_160x600.png │ ├── cats_320x50.png │ ├── cats_468x60.png │ └── cats_970x90.png │ ├── tea │ ├── tea_160x600.png │ ├── tea_320x50.png │ ├── tea_468x60.png │ └── tea_970x90.png │ ├── travel │ ├── travel_160x600.png │ ├── travel_320x50.png │ ├── travel_468x60.png │ └── travel_970x90.png │ └── usterka.png ├── deploy ├── build.sh ├── crontablist.sh ├── migrate.sh ├── nginx-server.conf ├── reload.sh ├── supervisor.conf ├── supervisor_ads.conf ├── v0.5 │ ├── README.md │ └── update_domain.php ├── v0.8.2 │ └── update_network_event_logs_campaign_id.sql ├── v0.8 │ ├── README.md │ ├── insert_stats_aggregates_advertiser.sql │ └── insert_stats_aggregates_publisher.sql ├── v1.2.0 │ └── README.md └── v1.2.3 │ └── README.md ├── dev-router.php ├── docker ├── bin │ ├── append_to_hosts.sh │ ├── docker-php-entrypoint.sh │ ├── php-fpm.sh │ ├── set_config_from_env.sh │ └── wait_for_database.sh ├── cron │ ├── adpay-export.sh │ ├── ads-broadcast-host.sh │ ├── ads-fetch-hosts.sh │ ├── ads-scanner.sh │ ├── adselect-export.sh │ ├── crontab │ ├── crontab-demo │ ├── crontab-docker │ ├── crontab-test │ ├── ops-inventory.sh │ ├── ops-payments.sh │ └── ops-wallet.sh ├── dockerfile ├── nginx.conf ├── overrides.conf └── skel │ ├── .bash_logout │ ├── .bashrc │ ├── .config │ └── mc │ │ ├── ini │ │ └── panels.ini │ ├── .profile │ └── .ssh │ └── authorized_keys ├── docs ├── CONTRIBUTING.md ├── banner-sizes.md ├── conversion_diagram.puml ├── conversion_flow.puml ├── examples │ ├── adselect01.banner_select.json │ ├── adselect01.campaign_update.json │ ├── adselect02.banner_select.json │ └── adselect02.campaign_update.json ├── publisher-flow.puml └── schemas │ ├── context │ └── v0.1 │ │ ├── example.json │ │ └── schema.json │ ├── info │ └── v0.1 │ │ ├── example.json │ │ └── schema.json │ ├── schema.json │ └── taxonomy │ └── v0.1 │ ├── schema.json │ └── targeting-example.json ├── lib ├── DOMDocumentSafe.php └── ZipToHtml.php ├── mocks ├── mappings │ ├── ad_unit_sizes_get.json │ ├── admin_settings__get.json │ ├── admin_settings__patch.json │ ├── admin_settings_get.json │ ├── adshares_address_get.json │ ├── all_get.json │ ├── auth_check__get.json │ ├── auth_login_admin__post.json │ ├── auth_login_failed__post.json │ ├── auth_login_user_post.json │ ├── auth_logout_get.json │ ├── auth_recovery__post.json │ ├── billing_history_get.json │ ├── campaign_183297987312_get.json │ ├── campaign_377892908378478_get.json │ ├── campaign_targeting_get.json │ ├── campaigns_0_banner_0__delete.json │ ├── campaigns_0_banner__post.json │ ├── campaigns_183297987312__get.json │ ├── campaigns_377892908378478__get.json │ ├── campaigns__post.json │ ├── campaigns_count__get.json │ ├── campaigns_post.json │ ├── campaigns_targeting__get.json │ ├── campaigns_totals_post.json │ ├── change_automatic_withdraw__post.json │ ├── change_automatic_withdraw_post.json │ ├── change_email_post.json │ ├── change_password_post.json │ ├── change_withdraw_address_post.json │ ├── chart__post.json │ ├── chart_post.json │ ├── config.json │ ├── config_adshares_address__get.json │ ├── config_banners__get.json │ ├── delete_ad_post.json │ ├── dismiss_notification_post.json │ ├── notifications_1__delete.json │ ├── notifications__get.json │ ├── notifications_list_get.json │ ├── notifications_settings__get.json │ ├── notifications_settings_get.json │ ├── notifications_settings_patch.json │ ├── options.json │ ├── publisher_chart__post.json │ ├── publisher_chart_post.json │ ├── register_user_post.json │ ├── remind_password_post.json │ ├── save_ad__post.json │ ├── save_ad_post.json │ ├── save_campaign_post.json │ ├── save_site_post.json │ ├── send_activation_email_post.json │ ├── site_1111_get.json │ ├── site_222222222222_get.json │ ├── site_targeting_get.json │ ├── sites_1111__get.json │ ├── sites_222222222222__get.json │ ├── sites__post.json │ ├── sites_count__get.json │ ├── sites_get.json │ ├── sites_post.json │ ├── sites_targeting__get.json │ ├── sites_totals__post.json │ ├── sites_totals_post.json │ ├── update_admin_settings_post.json │ ├── update_notifications_settings_post.json │ ├── upload_ad_0_put.json │ ├── users___get.json │ ├── users___patch.json │ ├── users_email__post.json │ ├── users_email_activate_resend__post.json │ ├── users_user_1_password__patch.json │ ├── users_users__get.json │ ├── users_users__post.json │ ├── users_users_get.json │ ├── wallet_history__get.json │ ├── wallet_settings__patch.json │ ├── wallet_withdraw__post.json │ └── withdraw_funds_post.json ├── readme.md ├── sites.json └── wallet-history_get.json ├── package.json ├── phpcs.xml.dist ├── phpunit.xml.dist ├── public ├── css │ └── why.css ├── index.php ├── panel-assets-default │ └── favicon.ico ├── robots.txt └── web.config ├── resources ├── fonts │ └── mock-font.ttf ├── img │ ├── empty.gif │ └── placeholder_seed.png ├── js │ ├── app.js │ ├── base │ │ ├── base64.js │ │ ├── compat.js │ │ ├── domready.js │ │ └── utils.js │ ├── bootstrap.js │ ├── components │ │ └── ExampleComponent.vue │ ├── cryptovoxels │ │ ├── cryptovoxels.js │ │ └── template.js │ ├── demand │ │ ├── banner.js │ │ ├── view.js │ │ └── ziptohtml │ │ │ ├── createjs_fix.js │ │ │ └── fixscript.js │ ├── footer │ │ └── footer.js │ ├── header │ │ └── header.js │ └── supply │ │ ├── find │ │ ├── backfill.js │ │ ├── block_detect.js │ │ └── find.js │ │ ├── inv.js │ │ ├── main │ │ └── head.js │ │ ├── pops │ │ ├── 1_store.js │ │ └── 2_pops.js │ │ ├── sha1.js │ │ └── sha1_compat.js ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ ├── validation.php │ │ └── why-this-ad.php ├── sass │ ├── _variables.scss │ └── app.scss └── views │ ├── common │ └── newsletter-unsubscribe.blade.php │ ├── demand │ ├── view-event-legacy.blade.php │ └── view-event.blade.php │ ├── emails │ ├── auth-recovery.blade.php │ ├── banner-classified.blade.php │ ├── campaign-resume.blade.php │ ├── crm │ │ ├── campaign-created.blade.php │ │ ├── site-added.blade.php │ │ └── user-registered.blade.php │ ├── deposit-processed.blade.php │ ├── invoice-created.blade.php │ ├── newsletter.blade.php │ ├── notifications │ │ ├── campaign-accepted.blade.php │ │ ├── campaign-draft.blade.php │ │ ├── campaign-ended-extend.blade.php │ │ ├── campaign-ended.blade.php │ │ ├── campaign-ends.blade.php │ │ ├── funds-ended.blade.php │ │ ├── funds-ends.blade.php │ │ ├── inactive-advertiser.blade.php │ │ ├── inactive-publisher.blade.php │ │ ├── inactive-user-extend.blade.php │ │ ├── inactive-user-who-deposit.blade.php │ │ ├── inactive-user.blade.php │ │ ├── site-accepted.blade.php │ │ └── site-draft.blade.php │ ├── panel-placeholders-change.blade.php │ ├── site-ads-txt-invalid.blade.php │ ├── site-ads-txt-valid.blade.php │ ├── site-approval-pending.blade.php │ ├── technical-error.blade.php │ ├── user-banned.blade.php │ ├── user-confirmed.blade.php │ ├── user-email-activate.blade.php │ ├── user-email-change-confirm-1-old.blade.php │ ├── user-email-change-confirm-2-new.blade.php │ ├── user-password-change-confirm.blade.php │ ├── user-password-change.blade.php │ ├── wallet-connect-confirm.blade.php │ ├── wallet-connected.blade.php │ ├── wallet-funds-email.blade.php │ ├── withdrawal-approval.blade.php │ └── withdrawal-success.blade.php │ ├── info │ └── policy.blade.php │ ├── invoices │ └── proforma-en.blade.php │ └── supply │ └── why.blade.php ├── routes ├── admin.php ├── auth.php ├── config.php ├── demand.php ├── main.php ├── manager.php └── supply.php ├── scripts ├── build.sh ├── install.sh ├── pre-build.sh └── pre-install.sh ├── server.php ├── sonar-project.properties ├── src ├── Advertiser │ ├── Dto │ │ ├── Input │ │ │ ├── ChartInput.php │ │ │ ├── ConversionDataInput.php │ │ │ ├── InvalidInputException.php │ │ │ └── StatsInput.php │ │ └── Result │ │ │ ├── ChartResult.php │ │ │ ├── Stats │ │ │ ├── Calculation.php │ │ │ ├── ConversionDataCollection.php │ │ │ ├── ConversionDataEntry.php │ │ │ ├── DataCollection.php │ │ │ ├── DataEntry.php │ │ │ ├── ReportCalculation.php │ │ │ └── Total.php │ │ │ └── StatsResult.php │ ├── Repository │ │ └── StatsRepository.php │ └── Service │ │ ├── ChartDataProvider.php │ │ └── StatsDataProvider.php ├── Classify │ ├── Application │ │ ├── Exception │ │ │ └── BannerNotVerifiedException.php │ │ └── Service │ │ │ └── ClassifierInterface.php │ ├── Domain │ │ └── Model │ │ │ ├── Classification.php │ │ │ └── ClassificationCollection.php │ └── Infrastructure │ │ └── Service │ │ ├── DummyClassifier.php │ │ └── LocalClassifier.php ├── Common │ ├── Application │ │ ├── Dto │ │ │ ├── CommunityFee.php │ │ │ ├── EncodedLicense.php │ │ │ ├── ExchangeRate.php │ │ │ ├── Gateway.php │ │ │ ├── Media.php │ │ │ ├── PageRank.php │ │ │ ├── TaxonomyV1.php │ │ │ ├── TaxonomyV1 │ │ │ │ ├── Item.php │ │ │ │ └── Item │ │ │ │ │ ├── Type.php │ │ │ │ │ └── Value.php │ │ │ ├── TaxonomyV2.php │ │ │ └── TaxonomyV2 │ │ │ │ ├── DictionaryTargetingItem.php │ │ │ │ ├── Format.php │ │ │ │ ├── InputTargetingItem.php │ │ │ │ ├── Medium.php │ │ │ │ ├── Meta.php │ │ │ │ ├── Targeting.php │ │ │ │ └── TargetingItem.php │ │ ├── Factory │ │ │ ├── MediaFactory.php │ │ │ ├── TaxonomyV1Factory.php │ │ │ ├── TaxonomyV1ItemFactory.php │ │ │ ├── TaxonomyV2 │ │ │ │ └── TargetingItemFactory.php │ │ │ └── TaxonomyV2Factory.php │ │ ├── Format │ │ │ └── Json │ │ │ │ └── JsonDataRequest.php │ │ ├── Model │ │ │ ├── Currency.php │ │ │ ├── Selector.php │ │ │ └── Selector │ │ │ │ ├── Option.php │ │ │ │ └── OptionValue.php │ │ ├── Service │ │ │ ├── AdClassify.php │ │ │ ├── AdUser.php │ │ │ ├── Ads.php │ │ │ ├── AdsRpcClient.php │ │ │ ├── ConfigurationRepository.php │ │ │ ├── Exception │ │ │ │ ├── AdsException.php │ │ │ │ ├── ExchangeRateNotAvailableException.php │ │ │ │ └── SignatureVerifierException.php │ │ │ ├── ExchangeRateRepository.php │ │ │ ├── LicenseDecoder.php │ │ │ ├── LicenseProvider.php │ │ │ ├── LicenseVault.php │ │ │ └── SignatureVerifier.php │ │ └── TransactionManager.php │ ├── Comparable.php │ ├── Domain │ │ ├── Adapter │ │ │ ├── ArrayCollection.php │ │ │ └── ArrayableItemCollection.php │ │ ├── Collection.php │ │ ├── Id.php │ │ ├── Model │ │ │ ├── Account.php │ │ │ └── Transaction.php │ │ ├── ValueObject.php │ │ └── ValueObject │ │ │ ├── AccountId.php │ │ │ ├── ChartResolution.php │ │ │ ├── Commission.php │ │ │ ├── Email.php │ │ │ ├── EmptyAccountId.php │ │ │ ├── Exception │ │ │ ├── InvalidStringException.php │ │ │ └── InvalidUuidException.php │ │ │ ├── License.php │ │ │ ├── NullUrl.php │ │ │ ├── SecureUrl.php │ │ │ ├── SemVer.php │ │ │ ├── Taxonomy │ │ │ └── Schema.php │ │ │ ├── TransactionId.php │ │ │ ├── Url.php │ │ │ ├── Uuid.php │ │ │ └── WalletAddress.php │ ├── Exception │ │ ├── Exception.php │ │ ├── InvalidArgumentException.php │ │ └── RuntimeException.php │ ├── Identifiable.php │ ├── Infrastructure │ │ └── Service │ │ │ ├── CommunityFeeReader.php │ │ │ ├── ExchangeRateReader.php │ │ │ ├── LicenseDecoderV1.php │ │ │ ├── LicenseReader.php │ │ │ ├── LicenseVaultFilesystem.php │ │ │ ├── PhpAdsClient.php │ │ │ ├── Sodium.php │ │ │ ├── SodiumCompatSignatureVerifier.php │ │ │ └── Web3.php │ └── UrlInterface.php ├── Config │ ├── AppMode.php │ ├── RegistrationMode.php │ └── UserRole.php ├── Demand │ └── Application │ │ ├── Dto │ │ ├── AdPayEvents.php │ │ └── TransferMoneyResponse.php │ │ ├── Exception │ │ └── TransferMoneyException.php │ │ └── Service │ │ ├── AdPay.php │ │ ├── PaymentDetailsVerify.php │ │ ├── TargetingOptionsImporter.php │ │ ├── TransferMoneyToColdWallet.php │ │ └── WalletFundsChecker.php ├── Network │ ├── Broadcast.php │ ├── Broadcastable.php │ └── BroadcastableUrl.php ├── Publisher │ ├── Dto │ │ ├── Input │ │ │ ├── ChartInput.php │ │ │ ├── InvalidInputException.php │ │ │ └── StatsInput.php │ │ └── Result │ │ │ ├── ChartResult.php │ │ │ ├── Stats │ │ │ ├── Calculation.php │ │ │ ├── DataCollection.php │ │ │ ├── DataEntry.php │ │ │ ├── ReportCalculation.php │ │ │ └── Total.php │ │ │ └── StatsResult.php │ ├── Repository │ │ └── StatsRepository.php │ └── Service │ │ ├── ChartDataProvider.php │ │ └── StatsDataProvider.php └── Supply │ ├── Application │ ├── Dto │ │ ├── Classification │ │ │ └── Collection.php │ │ ├── FoundBanners.php │ │ ├── FoundBanners │ │ │ └── Banner.php │ │ ├── ImpressionContext.php │ │ ├── Info.php │ │ ├── InfoStatistics.php │ │ └── UserContext.php │ └── Service │ │ ├── AdSelect.php │ │ ├── AdSelectInventoryExporter.php │ │ ├── BannerClassifier.php │ │ ├── DemandClient.php │ │ ├── Exception │ │ ├── EmptyInventoryException.php │ │ ├── NoBannersForGivenCampaign.php │ │ └── UnexpectedClientResponseException.php │ │ ├── FilteringOptionsImporter.php │ │ ├── InventoryImporter.php │ │ ├── MarkedCampaignsAsDeleted.php │ │ └── SupplyClient.php │ └── Domain │ ├── Factory │ ├── CampaignFactory.php │ └── Exception │ │ └── InvalidCampaignArgumentException.php │ ├── Model │ ├── Banner.php │ ├── Campaign.php │ ├── CampaignCollection.php │ └── Exception │ │ ├── InvalidBudgetValueException.php │ │ ├── UnsupportedBannerTypeException.php │ │ └── UnsupportedStatusTypeException.php │ ├── Repository │ ├── CampaignRepository.php │ └── Exception │ │ └── CampaignRepositoryException.php │ └── ValueObject │ ├── BannerUrl.php │ ├── Budget.php │ ├── CampaignDate.php │ ├── Classification.php │ ├── Exception │ ├── InvalidBudgetValueException.php │ ├── InvalidCampaignDateException.php │ ├── InvalidUrlException.php │ └── UnsupportedBannerTypeException.php │ ├── HostStatus.php │ ├── Size.php │ ├── SourceCampaign.php │ ├── Status.php │ └── TurnoverEntryType.php ├── tests ├── app │ ├── Client │ │ ├── GuzzleAdPayClientTest.php │ │ ├── GuzzleAdSelectClientTest.php │ │ ├── GuzzleAdUserClientTest.php │ │ ├── GuzzleAdsOperatorClientTest.php │ │ ├── GuzzleDemandClientTest.php │ │ └── Mapper │ │ │ ├── AbstractFilterMapperTest.php │ │ │ ├── AdPay │ │ │ ├── DemandBidStrategyMapperTest.php │ │ │ ├── DemandCampaignMapperTest.php │ │ │ └── DemandEventMapperTest.php │ │ │ └── AdSelect │ │ │ ├── CampaignMapperTest.php │ │ │ ├── CaseMapperTest.php │ │ │ ├── CreditPaymentMapperTest.php │ │ │ └── TargetingMapperTest.php │ ├── Console │ │ ├── Commands │ │ │ ├── AdPayCampaignExportCommandTest.php │ │ │ ├── AdPayEventExportCommandTest.php │ │ │ ├── AdPayGetPaymentsTest.php │ │ │ ├── AdSelectCaseExportCommandTest.php │ │ │ ├── AdSelectCasePaymentsExportCommandTest.php │ │ │ ├── AdSelectInventoryExporterCommandTest.php │ │ │ ├── AdsBroadcastHostTest.php │ │ │ ├── AdsFetchHostsTest.php │ │ │ ├── AdsMeTest.php │ │ │ ├── AdsProcessTxTest.php │ │ │ ├── AggregateCaseStatisticsPublisherCommandTest.php │ │ │ ├── BannerClassificationsCreateCommandTest.php │ │ │ ├── BannerClassificationsRequestCommandTest.php │ │ │ ├── CdnUploadBannersCommandTest.php │ │ │ ├── CreateOauthClientCommandTest.php │ │ │ ├── DemandBlockRequiredAmountTest.php │ │ │ ├── DemandPreparePaymentsTest.php │ │ │ ├── DemandProcessPaymentsTest.php │ │ │ ├── DemandSendPaymentsTest.php │ │ │ ├── EmailNotificationsSendCommandTest.php │ │ │ ├── ExpiredWithdrawalCancellationCommandTest.php │ │ │ ├── FetchExchangeRateCommandTest.php │ │ │ ├── InventoryImporterCommandTest.php │ │ │ ├── ListAdministratorsCommandTest.php │ │ │ ├── SendJoiningFeeTest.php │ │ │ ├── SiteAdsTxtCheckCommandTest.php │ │ │ ├── SiteRankReassessRequestCommandTest.php │ │ │ ├── SiteRankUpdateCommandTest.php │ │ │ ├── SupplyDefaultPlaceholdersReloadCommandTest.php │ │ │ ├── SupplyProcessPaymentsTest.php │ │ │ ├── TargetingReachFetchTest.php │ │ │ ├── TransferMoneyToColdWalletCommandTest.php │ │ │ ├── UpdateFilteringOptionsTest.php │ │ │ ├── UpdateTargetingOptionsTest.php │ │ │ ├── UpsertConfigurationCommandTest.php │ │ │ ├── WalletAmountCheckCommandTest.php │ │ │ └── WalletWithdrawalCheckCommandTest.php │ │ └── ConsoleTestCase.php │ ├── CreatesApplication.php │ ├── Http │ │ ├── ClassifierControllerTest.php │ │ ├── Controllers │ │ │ ├── ClassificationControllerTest.php │ │ │ ├── ConversionControllerTest.php │ │ │ ├── DemandControllerTest.php │ │ │ ├── InfoControllerTest.php │ │ │ ├── Manager │ │ │ │ ├── AdminControllerTest.php │ │ │ │ ├── ApiCampaignsControllerTest.php │ │ │ │ ├── ApiTaxonomyControllerTest.php │ │ │ │ ├── AuthControllerTest.php │ │ │ │ ├── BidStrategyControllerTest.php │ │ │ │ ├── CampaignsControllerTest.php │ │ │ │ ├── InvoicesControllerTest.php │ │ │ │ ├── OAuthControllerTest.php │ │ │ │ ├── OptionsControllerTest.php │ │ │ │ ├── RefLinksControllerTest.php │ │ │ │ ├── ServerConfigurationControllerTest.php │ │ │ │ ├── ServerMonitoringControllerTest.php │ │ │ │ ├── SitesControllerTest.php │ │ │ │ ├── StatisticsGlobalControllerTest.php │ │ │ │ └── SupplyBannerPlaceholderControllerTest.php │ │ │ ├── SettingsControllerTest.php │ │ │ ├── SupplyControllerTest.php │ │ │ └── WalletControllerTest.php │ │ ├── Middleware │ │ │ ├── CheckForMaintenanceModeTest.php │ │ │ └── StatisticsCollectorAccessTest.php │ │ ├── Requests │ │ │ ├── Campaign │ │ │ │ ├── BannerValidatorTest.php │ │ │ │ ├── CampaignTargetingProcessorTest.php │ │ │ │ └── TargetingProcessorTest.php │ │ │ ├── Common │ │ │ │ └── LimitValidatorTest.php │ │ │ ├── Filter │ │ │ │ ├── BoolFilterTest.php │ │ │ │ ├── DateFilterTest.php │ │ │ │ ├── FilterCollectionTest.php │ │ │ │ └── StringFilterTest.php │ │ │ └── NetworkBannerFilterTest.php │ │ ├── Response │ │ │ ├── LicenseResponseTest.php │ │ │ └── Site │ │ │ │ └── SizesResponseTest.php │ │ ├── StatsControllerTest.php │ │ └── UtilsTest.php │ ├── Jobs │ │ ├── AdsSendOneTest.php │ │ └── ExecuteCommandTest.php │ ├── Listener │ │ └── ServerEventListenerTest.php │ ├── Mail │ │ ├── Crm │ │ │ └── CampaignCreatedTest.php │ │ ├── DepositProcessedTest.php │ │ ├── MailTestCase.php │ │ ├── Notifications │ │ │ ├── CampaignAcceptedTest.php │ │ │ ├── CampaignDraftTest.php │ │ │ ├── CampaignEndedExtendTest.php │ │ │ ├── CampaignEndedTest.php │ │ │ ├── CampaignEndsTest.php │ │ │ ├── FundsEndedTest.php │ │ │ ├── FundsEndsTest.php │ │ │ ├── InactiveAdvertiserTest.php │ │ │ ├── InactivePublisherTest.php │ │ │ ├── InactiveUserExtendTest.php │ │ │ ├── InactiveUserTest.php │ │ │ ├── InactiveUserWhoDepositTest.php │ │ │ ├── SiteAcceptedTest.php │ │ │ └── SiteDraftTest.php │ │ ├── SiteAdsTxtInvalidTest.php │ │ ├── SiteAdsTxtValidTest.php │ │ ├── SiteApprovalPendingTest.php │ │ └── TechnicalErrorTest.php │ ├── Models │ │ ├── AdsPaymentMetaTest.php │ │ ├── BannerTest.php │ │ ├── CampaignTest.php │ │ ├── ConfigTest.php │ │ ├── EventBoostLogTest.php │ │ ├── EventLogTest.php │ │ ├── InvoiceTest.php │ │ ├── JoiningFeeLogTest.php │ │ ├── JoiningFeeTest.php │ │ ├── NetworkBannerTest.php │ │ ├── NetworkCampaignTest.php │ │ ├── NetworkHostTest.php │ │ ├── NetworkMissedCaseTest.php │ │ ├── NotificationEmailLogTest.php │ │ ├── PaymentReportTest.php │ │ ├── PublisherBoostLedgerEntryTest.php │ │ ├── RefLinkTest.php │ │ ├── ServeDomainTest.php │ │ ├── SiteTest.php │ │ ├── SitesRejectedDomainTest.php │ │ ├── SspHostTest.php │ │ ├── TurnoverEntryTest.php │ │ ├── UserLedgerEntryTest.php │ │ ├── UserTest.php │ │ └── ZoneTest.php │ ├── RefreshDatabase.php │ ├── Repository │ │ ├── Advertiser │ │ │ └── MySqlStatsRepositoryTest.php │ │ ├── CampaignRepositoryTest.php │ │ ├── Common │ │ │ ├── AccessTokenRepositoryTest.php │ │ │ ├── EloquentExchangeRateRepositoryTest.php │ │ │ ├── MySqlServerStatisticsRepositoryTest.php │ │ │ ├── MysqlQueryBuilderTest.php │ │ │ └── TotalFeeReaderTest.php │ │ ├── FileConfigurationRepositoryTest.php │ │ ├── Publisher │ │ │ └── MySqlStatsRepositoryTest.php │ │ └── Supply │ │ │ ├── MySqlSupplyServerStatisticsRepositoryTest.php │ │ │ └── NetworkCampaignRepositoryTest.php │ ├── Services │ │ ├── Advertiser │ │ │ └── Dto │ │ │ │ └── TargetingReachVectorTest.php │ │ ├── Common │ │ │ ├── AdsLogReaderTest.php │ │ │ ├── AdsTxtCrawlerTest.php │ │ │ ├── CrmNotifierTest.php │ │ │ └── UserDeleteTest.php │ │ ├── ConversionValidatorTest.php │ │ ├── Demand │ │ │ ├── BannerCreatorTest.php │ │ │ └── CampaignCreatorTest.php │ │ ├── NowPaymentsTest.php │ │ ├── PaymentDetailsProcessorTest.php │ │ ├── Publisher │ │ │ └── SiteCategoriesValidatorTest.php │ │ └── Supply │ │ │ ├── AdSelectCaseExporterTest.php │ │ │ ├── BannerPlaceholderConverterTest.php │ │ │ ├── BannerPlaceholderProviderTest.php │ │ │ ├── DefaultBannerPlaceholderGeneratorTest.php │ │ │ ├── SiteFilteringMatcherTest.php │ │ │ └── SiteFilteringUpdaterTest.php │ ├── TestCase.php │ ├── Uploader │ │ ├── DirectLink │ │ │ ├── DirectLinkUploaderTest.php │ │ │ └── UploadedDirectLinkTest.php │ │ ├── FactoryTest.php │ │ ├── Html │ │ │ ├── HtmlUploaderTest.php │ │ │ └── UploadedHtmlTest.php │ │ ├── Image │ │ │ └── ImageUploaderTest.php │ │ ├── Model │ │ │ └── ModelUploaderTest.php │ │ ├── PlaceholderUploaderTest.php │ │ └── Video │ │ │ └── VideoUploaderTest.php │ ├── Utilities │ │ ├── AdsAuthenticatorTest.php │ │ ├── AdsUtilsTest.php │ │ ├── ArrayUtilsTest.php │ │ ├── BinaryStringUtilsTest.php │ │ ├── ClassifierExternalKeywordsSerializerTest.php │ │ ├── CssUtilsTest.php │ │ ├── DatabaseConfigReaderTest.php │ │ ├── DateUtilsTest.php │ │ ├── DomainReaderTest.php │ │ ├── InvoiceUtilsTest.php │ │ ├── SiteUtilsTest.php │ │ ├── SiteValidatorTest.php │ │ ├── UniqueIdTest.php │ │ └── UuidStringGeneratorTest.php │ └── ViewModel │ │ ├── AccessTokenTest.php │ │ ├── BannerStatusTest.php │ │ ├── CampaignStatusTest.php │ │ ├── ClickConversionTypeTest.php │ │ └── ZoneSizeTest.php ├── lib │ └── ZipToHtmlTest.php ├── mock │ ├── Client │ │ ├── DummyAdClassifyClient.php │ │ ├── DummyAdPayClient.php │ │ ├── DummyAdSelectClient.php │ │ ├── DummyAdUserClient.php │ │ ├── DummyAdsClient.php │ │ ├── DummyAdsRpcClient.php │ │ ├── DummyClassifierExternalClient.php │ │ ├── DummyDemandClient.php │ │ ├── DummyExchangeRateRepository.php │ │ └── DummySupplyClient.php │ ├── Console │ │ └── Kernel.php │ ├── Files │ │ ├── Banners │ │ │ ├── 2xhtml.zip │ │ │ ├── 300x250.png │ │ │ ├── 300x250.zip │ │ │ ├── 980x120.png │ │ │ ├── adshares.mp4 │ │ │ ├── empty.zip │ │ │ ├── model.vox │ │ │ ├── too_big_unzipped.zip │ │ │ └── too_big_zipped.zip │ │ └── OAuth │ │ │ ├── oauth-private.key │ │ │ └── oauth-public.key │ ├── Repository │ │ └── DummyConfigurationRepository.php │ ├── ToStringClass.php │ ├── filtering_schema.json │ ├── info.json │ ├── network.json │ ├── targeting_schema_v2.json │ └── targeting_schema_v2_smart_link.json └── src │ ├── Advertiser │ ├── Dto │ │ └── Input │ │ │ ├── ChartInputTest.php │ │ │ └── StatsInputTest.php │ └── Repository │ │ └── DummyStatsRepository.php │ ├── Classify │ └── Model │ │ └── ClassificationTest.php │ ├── Common │ ├── Application │ │ ├── Dto │ │ │ ├── CommunityFeeTest.php │ │ │ ├── TaxonomyV2 │ │ │ │ ├── DictionaryTargetingItemTest.php │ │ │ │ ├── FormatTest.php │ │ │ │ ├── InputTargetingItemTest.php │ │ │ │ ├── MediumTest.php │ │ │ │ ├── MetaTest.php │ │ │ │ └── TargetingTest.php │ │ │ └── TaxonomyV2Test.php │ │ └── Factory │ │ │ ├── TaxonomyV2 │ │ │ └── TargetingItemFactoryTest.php │ │ │ └── TaxonomyV2FactoryTest.php │ ├── Domain │ │ ├── Adapter │ │ │ └── ArrayableItemCollectionTest.php │ │ └── ValueObject │ │ │ ├── AccountIdTest.php │ │ │ ├── BroadcastableUrlTest.php │ │ │ ├── CommissionTest.php │ │ │ ├── EmailTest.php │ │ │ ├── EmptyAccountIdTest.php │ │ │ ├── SecureUrlTest.php │ │ │ ├── SemVerTest.php │ │ │ ├── TransactionIdTest.php │ │ │ ├── UrlTest.php │ │ │ ├── UuidTest.php │ │ │ └── WalletAddressTest.php │ └── Infrastructure │ │ └── Service │ │ ├── CommunityFeeReaderTest.php │ │ ├── ExchangeRateReaderTest.php │ │ ├── LicenseReaderTest.php │ │ └── SodiumCompatSignatureVerifierTest.php │ ├── Config │ ├── AppModeTest.php │ └── UserRoleTest.php │ ├── Demand │ └── Application │ │ ├── Dto │ │ └── AdPayEventsTest.php │ │ └── Service │ │ ├── PaymentDetailsVerifyTest.php │ │ ├── TargetingOptionsImporterTest.php │ │ ├── TransferMoneyToColdWalletTest.php │ │ └── WalletFundsCheckerTest.php │ ├── Publisher │ ├── Dto │ │ ├── Input │ │ │ ├── ChartInputTest.php │ │ │ └── StatsInputTest.php │ │ └── Result │ │ │ └── Stats │ │ │ └── CalculationTest.php │ └── Repository │ │ └── DummyStatsRepository.php │ └── Supply │ ├── Application │ ├── Dto │ │ ├── Classification │ │ │ └── CollectionTest.php │ │ ├── ImpressionContextTest.php │ │ └── InfoTest.php │ └── Service │ │ ├── AdSelectInventoryExporterTest.php │ │ ├── AdSelectTest.php │ │ └── InventoryImporterTest.php │ └── Domain │ ├── Factory │ └── CampaignFactoryTest.php │ ├── Model │ ├── BannerTest.php │ └── CampaignTest.php │ └── ValueObject │ ├── BannerUrlTest.php │ ├── BudgetTest.php │ ├── CampaignDateTest.php │ ├── ClassificationTest.php │ ├── SizeTest.php │ ├── SourceCampaignTest.php │ └── StatusTest.php ├── webpack.mix.js └── yarn.lock /.env.dist: -------------------------------------------------------------------------------- 1 | APP_NAME=AdServer 2 | APP_ENV=production 3 | APP_KEY= 4 | APP_DEBUG=false 5 | APP_HOST=localhost 6 | APP_PORT=80 7 | APP_URL=http://localhost 8 | APP_ID= 9 | 10 | DB_HOST=localhost 11 | DB_PORT=3306 12 | DB_DATABASE= 13 | DB_USERNAME= 14 | DB_PASSWORD= 15 | DB_PERSISTENT=0 16 | 17 | BROADCAST_DRIVER=log 18 | CACHE_DRIVER=file 19 | SESSION_DRIVER=file 20 | SESSION_LIFETIME=120 21 | QUEUE_DRIVER=database 22 | 23 | ADSHARES_COMMAND=/usr/bin/ads 24 | ADSHARES_WORKINGDIR=/adserver/var/cache/ads 25 | BRAND_ASSETS_DIR= 26 | 27 | LOG_LEVEL=error 28 | LOG_CHANNEL=single 29 | LOG_FILE_PATH=/var/log/adshares/adserver.log 30 | -------------------------------------------------------------------------------- /.env.testing.dist: -------------------------------------------------------------------------------- 1 | APP_NAME=AdServer 2 | APP_ENV=testing 3 | APP_KEY=base64:tXpDvyJEiP9SMSzJ/wKmWMMGiw2mCN5q38MQHL5C4ZU= 4 | APP_DEBUG=false 5 | APP_HOST= 6 | APP_PORT=80 7 | APP_URL=https://example.com 8 | APP_ID= 9 | 10 | DB_HOST=localhost 11 | DB_PORT=3306 12 | DB_DATABASE=adserver_test 13 | DB_USERNAME= 14 | DB_PASSWORD= 15 | DB_PERSISTENT=0 16 | 17 | BROADCAST_DRIVER=log 18 | CACHE_DRIVER=array 19 | SESSION_DRIVER=array 20 | SESSION_LIFETIME=120 21 | QUEUE_DRIVER=sync 22 | 23 | ADSHARES_COMMAND=/usr/bin/ads 24 | ADSHARES_WORKINGDIR=/tmp/ads/cache 25 | 26 | LOG_LEVEL=warning 27 | LOG_CHANNEL=single 28 | LOG_FILE_PATH=adserver.log 29 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | --- 5 | 6 | **Describe the bug** 7 | 8 | A clear and concise description of what the bug is. 9 | 10 | **To Reproduce** 11 | 12 | Steps to reproduce the behavior: 13 | 1. Go to '...' 14 | 2. Click on '....' 15 | 3. Scroll down to '....' 16 | 4. See error 17 | 18 | **Expected behavior** 19 | 20 | A clear and concise description of what you expected to happen. 21 | 22 | **Screenshots** 23 | 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Environment (please complete the following information):** 27 | 28 | - OS name and version: [e.g. Ububtu 18.04 x64] 29 | 30 | **Additional context** 31 | 32 | Add any other context about the problem here. 33 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | --- 5 | 6 | **Is your feature request related to a problem? Please describe.** 7 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 8 | 9 | **Describe the solution you'd like** 10 | A clear and concise description of what you want to happen. 11 | 12 | **Describe alternatives you've considered** 13 | A clear and concise description of any alternative solutions or features you've considered. 14 | 15 | **Additional context** 16 | Add any other context or screenshots about the feature request here. 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | 3 | /node_modules 4 | 5 | /public/- 6 | /public/hot 7 | /public/storage 8 | /public/mix-manifest.json 9 | /public/favicon.ico 10 | 11 | var 12 | /vendor/ 13 | 14 | /.vscode 15 | /.vagrant 16 | 17 | Homestead.json 18 | Homestead.yaml 19 | npm-debug.log 20 | yarn-error.log 21 | /.scannerwork 22 | _ide_helper.php 23 | public/img/ 24 | public/info.json 25 | 26 | /storage/phpunit 27 | phpunit.xml 28 | 29 | *.env 30 | *.env.testing 31 | *.override.* 32 | !*.dist 33 | 34 | # temporary files 35 | *_in_progress 36 | 37 | /storage/ 38 | /.phpunit.result.cache 39 | 40 | ###> squizlabs/php_codesniffer ### 41 | /.phpcs-cache 42 | /phpcs.xml 43 | ###< squizlabs/php_codesniffer ### 44 | -------------------------------------------------------------------------------- /.travis/php.ini: -------------------------------------------------------------------------------- 1 | extension = apcu.so 2 | xdebug.mode = coverage 3 | -------------------------------------------------------------------------------- /COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 Adshares sp. z o.o. 2 | 3 | This file is part of AdServer 4 | 5 | AdServer is free software: you can redistribute and/or modify it 6 | under the terms of the GNU General Public License as published 7 | by the Free Software Foundation, either version 3 of the License, 8 | or (at your option) any later version. 9 | 10 | AdServer is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty 12 | of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with AdServer. If not, see 17 | -------------------------------------------------------------------------------- /app/Exceptions/Advertiser/MissingEventsException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Adserver\Exceptions\Advertiser; 23 | 24 | use Adshares\Common\Exception\RuntimeException; 25 | 26 | class MissingEventsException extends RuntimeException 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /app/Exceptions/ConsoleCommandException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Adserver\Exceptions; 23 | 24 | use Exception; 25 | 26 | class ConsoleCommandException extends Exception 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /app/Exceptions/Demand/AdPayReportMissingEventsException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Adserver\Exceptions\Demand; 23 | 24 | use Adshares\Common\Exception\RuntimeException; 25 | 26 | class AdPayReportMissingEventsException extends RuntimeException 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /app/Exceptions/Demand/AdPayReportNotReadyException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Adserver\Exceptions\Demand; 23 | 24 | use Adshares\Common\Exception\RuntimeException; 25 | 26 | class AdPayReportNotReadyException extends RuntimeException 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /app/Exceptions/JobException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Adserver\Exceptions; 23 | 24 | use Exception; 25 | 26 | class JobException extends Exception 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /app/Exceptions/MissingInitialConfigurationException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Adserver\Exceptions; 23 | 24 | use Exception; 25 | 26 | class MissingInitialConfigurationException extends Exception 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /app/Exceptions/Publisher/MissingCasesException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Adserver\Exceptions\Publisher; 23 | 24 | use Adshares\Common\Exception\RuntimeException; 25 | 26 | class MissingCasesException extends RuntimeException 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrackUserActivity.php: -------------------------------------------------------------------------------- 1 | user(); 18 | if (!$user) { 19 | return $next($request); 20 | } 21 | if (null === $user->last_active_at || $user->last_active_at < new DateTimeImmutable('-5 minutes')) { 22 | $user->last_active_at = now(); 23 | $user->save(); 24 | NotificationEmailLog::fetch($user->id, NotificationEmailCategory::InactiveUserExtend)?->invalidate(); 25 | } 26 | return $next($request); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Requests/Filter/Filter.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Adserver\Http\Requests\Filter; 25 | 26 | interface Filter 27 | { 28 | public function getName(): string; 29 | 30 | public function getValues(): array; 31 | } 32 | -------------------------------------------------------------------------------- /app/Http/Requests/Filter/FilterType.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Adserver\Http\Requests\Filter; 25 | 26 | enum FilterType 27 | { 28 | case Bool; 29 | case Date; 30 | case String; 31 | } 32 | -------------------------------------------------------------------------------- /app/Http/Resources/BannerResource.php: -------------------------------------------------------------------------------- 1 | Uuid::fromString($this->uuid)->toString(), 18 | 'createdAt' => $this->created_at->format(DateTimeInterface::ATOM), 19 | 'updatedAt' => $this->updated_at->format(DateTimeInterface::ATOM), 20 | 'type' => $this->creative_type, 21 | 'mime' => $this->creative_mime, 22 | 'hash' => $this->creative_sha1, 23 | 'scope' => $this->creative_size, 24 | 'name' => $this->name, 25 | 'status' => BannerStatus::from($this->status)->toString(), 26 | 'cdnUrl' => $this->cdn_url, 27 | 'url' => $this->url, 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Resources/GenericCollection.php: -------------------------------------------------------------------------------- 1 | resource->toArray(), 13 | fn($key) => in_array($key, ['data', 'links', 'meta'], true), 14 | ARRAY_FILTER_USE_KEY, 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Models/ExchangeRate.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Adserver\Models; 23 | 24 | use Illuminate\Database\Eloquent\Builder; 25 | use Illuminate\Database\Eloquent\Model; 26 | 27 | /** 28 | * @mixin Builder 29 | */ 30 | class ExchangeRate extends Model 31 | { 32 | protected $fillable = [ 33 | 'valid_at', 34 | 'value', 35 | 'currency', 36 | ]; 37 | } 38 | -------------------------------------------------------------------------------- /app/Providers/MacrosProvider.php: -------------------------------------------------------------------------------- 1 | map(function ($path) { 21 | return pathinfo($path, PATHINFO_FILENAME); 22 | }) 23 | ->reject(function ($macro) { 24 | return Builder::hasGlobalMacro($macro); 25 | }) 26 | ->each(function ($macro) { 27 | $macroClass = 'Adshares\\Adserver\\Providers\\BuilderMacros\\' . $macro; 28 | Builder::macro(Str::camel($macro), app($macroClass)()); 29 | }); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Repository/Supply/NetworkHostRepository.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Adserver\Repository\Supply; 23 | 24 | use Adshares\Adserver\Models\NetworkHost; 25 | 26 | class NetworkHostRepository 27 | { 28 | public function find() 29 | { 30 | return (new NetworkHost())->get(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Rules/PayoutAddressRule.php: -------------------------------------------------------------------------------- 1 | message = 'The :attribute must be valid PayoutAddress.'; 28 | 29 | return false; 30 | } 31 | 32 | return true; 33 | } 34 | 35 | /** 36 | * Get the validation error message. 37 | * 38 | * @return string 39 | */ 40 | public function message(): ?string 41 | { 42 | return $this->message; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/Services/Cdn/CdnProvider.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Adserver\Services\Cdn; 23 | 24 | use Adshares\Adserver\Models\Banner; 25 | 26 | abstract class CdnProvider 27 | { 28 | abstract public function uploadBanner(Banner $banner): string; 29 | } 30 | -------------------------------------------------------------------------------- /app/Services/Common/Exception/UserDeletionException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Adserver\Services\Common\Exception; 23 | 24 | use Adshares\Common\Exception\RuntimeException; 25 | 26 | class UserDeletionException extends RuntimeException 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /app/Uploader/UploadedFile.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Adserver\Uploader; 23 | 24 | use Illuminate\Contracts\Support\Arrayable; 25 | 26 | interface UploadedFile extends Arrayable 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /app/Utilities/ConfigTypes.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Adserver\Utilities; 23 | 24 | enum ConfigTypes 25 | { 26 | case Array; 27 | case Bool; 28 | case Float; 29 | case Integer; 30 | case Json; 31 | case String; 32 | } 33 | -------------------------------------------------------------------------------- /app/Utilities/EthUtils.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Adserver\Utilities; 23 | 24 | final class EthUtils 25 | { 26 | public static function verifyMessage(string $signature, string $message, string $accountAddress): bool 27 | { 28 | return personal_ecRecover($message, $signature) === strtolower($accountAddress); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Utilities/NonceGenerator.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Adserver\Utilities; 25 | 26 | final class NonceGenerator 27 | { 28 | public static function get(int $length = 32): string 29 | { 30 | return random_bytes($length); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/ViewModel/ClickConversionType.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Adserver\ViewModel; 25 | 26 | enum ClickConversionType: int 27 | { 28 | case None = 0; 29 | case Basic = 1; 30 | case Advanced = 2; 31 | 32 | public function toString(): string 33 | { 34 | return strtolower($this->name); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/ViewModel/MediumName.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Adserver\ViewModel; 25 | 26 | enum MediumName: string 27 | { 28 | case Web = 'web'; 29 | case Metaverse = 'metaverse'; 30 | } 31 | -------------------------------------------------------------------------------- /app/ViewModel/Role.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Adserver\ViewModel; 25 | 26 | enum Role: string 27 | { 28 | case Admin = 'admin'; 29 | case Advertiser = 'advertiser'; 30 | case Agency = 'agency'; 31 | case Moderator = 'moderator'; 32 | case Publisher = 'publisher'; 33 | } 34 | -------------------------------------------------------------------------------- /bin/artisan.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | exec docker-compose exec worker php artisan "$@" 4 | -------------------------------------------------------------------------------- /bin/composer.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | exec docker-compose run --rm worker composer "$@" 4 | -------------------------------------------------------------------------------- /bin/php.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | exec docker-compose exec -T -u dev application php \ 4 | -dxdebug.remote_port="9001" \ 5 | -dxdebug.remote_enable="true" \ 6 | -dxdebug.remote_autostart="true" \ 7 | -dxdebug.remote_connect_back="true" \ 8 | -dxdebug.remote_mode="req" \ 9 | -dxdebug.idekey="PHPSTORM" \ 10 | -dxdebug.max_nesting_level="512" \ 11 | -dxdebug.cli_color="1" \ 12 | -dxdebug.auto_trace="1" \ 13 | -dxdebug.extended_info="1" \ 14 | "$@" 15 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /config/jwt/.gitignore: -------------------------------------------------------------------------------- 1 | *.key 2 | -------------------------------------------------------------------------------- /database/factories/NotificationEmailLogFactory.php: -------------------------------------------------------------------------------- 1 | 12 | */ 13 | class NotificationEmailLogFactory extends Factory 14 | { 15 | private const MAXIMAL_TIMESTAMP = '@2147483647'; 16 | 17 | /** 18 | * @return array 19 | */ 20 | public function definition(): array 21 | { 22 | return [ 23 | 'category' => '', 24 | 'created_at' => new DateTimeImmutable(), 25 | 'properties' => [], 26 | 'user_id' => User::factory()->create(), 27 | 'valid_until' => new DateTimeImmutable(self::MAXIMAL_TIMESTAMP), 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /database/factories/ServerEventLogFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class ServerEventLogFactory extends Factory 13 | { 14 | /** 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | 'properties' => [], 21 | 'type' => $this->faker->randomElement(ServerEventType::cases()), 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/migrations/2016_06_01_000001_create_oauth_auth_codes_table.php: -------------------------------------------------------------------------------- 1 | string('id', 100)->primary(); 13 | $table->unsignedBigInteger('user_id')->index(); 14 | $table->uuid('client_id'); 15 | $table->text('scopes')->nullable(); 16 | $table->boolean('revoked'); 17 | $table->dateTime('expires_at')->nullable(); 18 | }); 19 | } 20 | 21 | public function down(): void 22 | { 23 | Schema::dropIfExists('oauth_auth_codes'); 24 | } 25 | }; 26 | -------------------------------------------------------------------------------- /database/migrations/2016_06_01_000002_create_oauth_access_tokens_table.php: -------------------------------------------------------------------------------- 1 | string('id', 100)->primary(); 13 | $table->unsignedBigInteger('user_id')->nullable()->index(); 14 | $table->uuid('client_id'); 15 | $table->string('name')->nullable(); 16 | $table->text('scopes')->nullable(); 17 | $table->boolean('revoked'); 18 | $table->timestamps(); 19 | $table->dateTime('expires_at')->nullable(); 20 | }); 21 | } 22 | 23 | public function down(): void 24 | { 25 | Schema::dropIfExists('oauth_access_tokens'); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /database/migrations/2016_06_01_000003_create_oauth_refresh_tokens_table.php: -------------------------------------------------------------------------------- 1 | string('id', 100)->primary(); 13 | $table->string('access_token_id', 100)->index(); 14 | $table->boolean('revoked'); 15 | $table->dateTime('expires_at')->nullable(); 16 | }); 17 | } 18 | 19 | public function down(): void 20 | { 21 | Schema::dropIfExists('oauth_refresh_tokens'); 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /database/migrations/2016_06_01_000004_create_oauth_clients_table.php: -------------------------------------------------------------------------------- 1 | uuid('id')->primary(); 13 | $table->unsignedBigInteger('user_id')->nullable()->index(); 14 | $table->string('name'); 15 | $table->string('secret', 100)->nullable(); 16 | $table->string('provider')->nullable(); 17 | $table->text('redirect'); 18 | $table->boolean('personal_access_client'); 19 | $table->boolean('password_client'); 20 | $table->boolean('revoked'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('oauth_clients'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /database/migrations/2016_06_01_000005_create_oauth_personal_access_clients_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 13 | $table->uuid('client_id'); 14 | $table->timestamps(); 15 | }); 16 | } 17 | 18 | public function down(): void 19 | { 20 | Schema::dropIfExists('oauth_personal_access_clients'); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2019_03_13_143325_create_regulations_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 13 | $table->timestamps(); 14 | $table->softDeletes(); 15 | 16 | $table->string('type', 25); 17 | $table->mediumText('content'); 18 | }); 19 | } 20 | 21 | public function down(): void 22 | { 23 | Schema::dropIfExists('regulations'); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /database/migrations/2019_03_28_111356_change_event_logs_add_domain_column.php: -------------------------------------------------------------------------------- 1 | string('domain', 255)->nullable(); 20 | } 21 | ); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::table( 32 | 'event_logs', 33 | function (Blueprint $table) { 34 | $table->dropColumn('domain'); 35 | } 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2019_03_28_111405_change_network_event_logs_add_domain_column.php: -------------------------------------------------------------------------------- 1 | string('domain', 255)->nullable(); 20 | } 21 | ); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::table( 32 | 'network_event_logs', 33 | function (Blueprint $table) { 34 | $table->dropColumn('domain'); 35 | } 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2019_05_23_103023_change_network_event_logs.php: -------------------------------------------------------------------------------- 1 | binary('campaign_id', 16)->after('zone_id')->nullable(); 20 | } 21 | ); 22 | 23 | if (DB::isMySql()) { 24 | DB::statement('ALTER TABLE network_event_logs MODIFY campaign_id varbinary(16)'); 25 | } 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::table( 36 | 'network_event_logs', 37 | static function (Blueprint $table) { 38 | $table->dropColumn('campaign_id'); 39 | } 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /database/migrations/2019_05_23_131345_change_network_banners_uuid_index.php: -------------------------------------------------------------------------------- 1 | index('uuid'); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table( 29 | 'network_banners', 30 | static function (Blueprint $table) { 31 | $table->dropIndex('network_banners_uuid_index'); 32 | } 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2019_05_29_072338_delete_event_export_data_from_config.php: -------------------------------------------------------------------------------- 1 | where('key', 'adselect-event-export')->delete(); 15 | DB::table('configs')->where('key', 'adselect-payment-export')->delete(); 16 | } 17 | 18 | /** 19 | * Reverse the migrations. 20 | * 21 | * @return void 22 | */ 23 | public function down() 24 | { 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /database/migrations/2019_07_04_141336_add_indexes_to_user_ledger_entries.php: -------------------------------------------------------------------------------- 1 | index('user_id', UserLedgerEntry::INDEX_USER_ID); 19 | $table->index('created_at', UserLedgerEntry::INDEX_CREATED_AT); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::table('user_ledger_entries', function (Blueprint $table) { 31 | $table->dropIndex(UserLedgerEntry::INDEX_USER_ID); 32 | $table->dropIndex(UserLedgerEntry::INDEX_CREATED_AT); 33 | }); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2019_09_06_131424_add_type_index_to_user_ledger_entries_table.php: -------------------------------------------------------------------------------- 1 | index('type', self::INDEX_FOR_COLUMN_TYPE); 15 | }); 16 | } 17 | 18 | public function down(): void 19 | { 20 | Schema::table('user_ledger_entries', function (Blueprint $table) { 21 | $table->dropIndex(self::INDEX_FOR_COLUMN_TYPE); 22 | }); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/migrations/2019_10_03_140647_delete_adselect_export_data_from_config.php: -------------------------------------------------------------------------------- 1 | whereIn('key', self::ADSELECT_EXPORT_DATA_KEYS)->delete(); 16 | } 17 | 18 | public function down(): void 19 | { 20 | foreach (self::ADSELECT_EXPORT_DATA_KEYS as $key) { 21 | if (null !== ($config = DB::table('configs')->where('key', $key)->first())) { 22 | continue; 23 | } 24 | 25 | DB::table('configs')->insert( 26 | [ 27 | 'key' => $key, 28 | 'value' => 0, 29 | 'created_at' => new DateTime(), 30 | ] 31 | ); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2022_11_17_150343_drop_campaigns_legacy_columns.php: -------------------------------------------------------------------------------- 1 | dropColumn(['classification_status', 'classification_tags']); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('campaigns', function (Blueprint $table) { 19 | $table->unsignedTinyInteger('classification_status')->after('targeting_requires')->nullable(false)->default(0); 20 | $table->string('classification_tags')->after('classification_status')->nullable(); 21 | }); 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /database/migrations/2022_11_28_095119_fix_config_case.php: -------------------------------------------------------------------------------- 1 | self::LEGACY_ALLOW_ZONE_IN_IFRAME, 12 | Config::NETWORK_DATA_CACHE_TTL => self::LEGACY_NETWORK_DATA_CACHE_TTL, 13 | ]; 14 | 15 | public function up(): void 16 | { 17 | foreach (self::CONFIG_KEY_MAP as $currentKey => $legacyKey) { 18 | DB::update(sprintf("UPDATE configs SET `key`='%s' where `key`='%s'", $currentKey, $legacyKey)); 19 | } 20 | } 21 | 22 | public function down(): void 23 | { 24 | foreach (self::CONFIG_KEY_MAP as $currentKey => $legacyKey) { 25 | DB::update(sprintf("UPDATE configs SET `key`='%s' where `key`='%s'", $legacyKey, $currentKey)); 26 | } 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /database/seeders/assets/ads/ads_160x600.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/ads/ads_160x600.png -------------------------------------------------------------------------------- /database/seeders/assets/ads/ads_320x50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/ads/ads_320x50.png -------------------------------------------------------------------------------- /database/seeders/assets/ads/ads_468x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/ads/ads_468x60.png -------------------------------------------------------------------------------- /database/seeders/assets/ads/ads_970x90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/ads/ads_970x90.png -------------------------------------------------------------------------------- /database/seeders/assets/ads2/ads1_230x600.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/ads2/ads1_230x600.png -------------------------------------------------------------------------------- /database/seeders/assets/ads2/ads1_728x90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/ads2/ads1_728x90.png -------------------------------------------------------------------------------- /database/seeders/assets/ads2/ads1_750x300.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/ads2/ads1_750x300.png -------------------------------------------------------------------------------- /database/seeders/assets/ads2/ads2_230x600.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/ads2/ads2_230x600.png -------------------------------------------------------------------------------- /database/seeders/assets/ads2/ads2_750x300.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/ads2/ads2_750x300.png -------------------------------------------------------------------------------- /database/seeders/assets/ads2/adshares_160x600.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/ads2/adshares_160x600.png -------------------------------------------------------------------------------- /database/seeders/assets/ads2/esc_728x90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/ads2/esc_728x90.png -------------------------------------------------------------------------------- /database/seeders/assets/ads2/slide16-750x200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/ads2/slide16-750x200.png -------------------------------------------------------------------------------- /database/seeders/assets/ads2/startup3_750x200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/ads2/startup3_750x200.png -------------------------------------------------------------------------------- /database/seeders/assets/cats/cats_160x600.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/cats/cats_160x600.png -------------------------------------------------------------------------------- /database/seeders/assets/cats/cats_320x50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/cats/cats_320x50.png -------------------------------------------------------------------------------- /database/seeders/assets/cats/cats_468x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/cats/cats_468x60.png -------------------------------------------------------------------------------- /database/seeders/assets/cats/cats_970x90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/cats/cats_970x90.png -------------------------------------------------------------------------------- /database/seeders/assets/tea/tea_160x600.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/tea/tea_160x600.png -------------------------------------------------------------------------------- /database/seeders/assets/tea/tea_320x50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/tea/tea_320x50.png -------------------------------------------------------------------------------- /database/seeders/assets/tea/tea_468x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/tea/tea_468x60.png -------------------------------------------------------------------------------- /database/seeders/assets/tea/tea_970x90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/tea/tea_970x90.png -------------------------------------------------------------------------------- /database/seeders/assets/travel/travel_160x600.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/travel/travel_160x600.png -------------------------------------------------------------------------------- /database/seeders/assets/travel/travel_320x50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/travel/travel_320x50.png -------------------------------------------------------------------------------- /database/seeders/assets/travel/travel_468x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/travel/travel_468x60.png -------------------------------------------------------------------------------- /database/seeders/assets/travel/travel_970x90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/travel/travel_970x90.png -------------------------------------------------------------------------------- /database/seeders/assets/usterka.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/database/seeders/assets/usterka.png -------------------------------------------------------------------------------- /deploy/nginx-server.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80 default_server; 3 | server_name ${APP_HOST} ${_APP_HOST_SERVE} ${_APP_HOST_MAIN_JS}; 4 | 5 | client_max_body_size 64M; 6 | 7 | access_log ${LOG_DIR}/${SERVICE_NAME}-nginx-access.log; 8 | error_log ${LOG_DIR}/${SERVICE_NAME}-nginx-error.log; 9 | 10 | root ${VENDOR_DIR}/${SERVICE_NAME}/public; 11 | index index.php index.html /index.php; 12 | 13 | location / { 14 | try_files $uri $uri/ /index.php?$query_string; 15 | } 16 | 17 | location ~ \.php$ { 18 | fastcgi_pass unix:${PHP_FPM_SOCK}; 19 | fastcgi_param SCRIPT_FILENAME $document_root/index.php; 20 | fastcgi_buffers 16 16k; 21 | fastcgi_buffer_size 32k; 22 | fastcgi_read_timeout 512; 23 | include fastcgi_params; 24 | } 25 | 26 | location ~ ^\/\..* { 27 | return 404; 28 | } 29 | 30 | location /favicon { 31 | log_not_found off; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /deploy/reload.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | WORK_DIR=${1:-"."} 4 | cd "$WORK_DIR" || exit 1 5 | 6 | source .env.dist 7 | source .env 8 | 9 | DEFAULT_FAVICON=public/panel-assets-default/favicon.ico 10 | CURRENT_FAVICON=public/favicon.ico 11 | 12 | cp $DEFAULT_FAVICON $CURRENT_FAVICON 13 | 14 | if [[ -n ${BRAND_ASSETS_DIR:-""} ]] 15 | then 16 | if [[ -d ${BRAND_ASSETS_DIR} ]] 17 | then 18 | echo "Copying brand assets from ${BRAND_ASSETS_DIR}" 19 | NEW_FAVICON=$(find ${BRAND_ASSETS_DIR} -type f -name "favicon-*" | sort -t '\0' -n | tail -1) 20 | if [[ -n $NEW_FAVICON ]] 21 | then 22 | cp $NEW_FAVICON $CURRENT_FAVICON 23 | fi 24 | else 25 | echo "Brand assets directory ${BRAND_ASSETS_DIR} doesn't exist." 26 | fi 27 | fi 28 | -------------------------------------------------------------------------------- /deploy/supervisor.conf: -------------------------------------------------------------------------------- 1 | [program:${VENDOR_NAME}_${SERVICE_NAME}_worker] 2 | directory=${VENDOR_DIR}/${SERVICE_NAME} 3 | command=php artisan queue:work --queue=default --tries=200 --delay=600 4 | pidfile=/var/run/${VENDOR_NAME}/${SERVICE_NAME}_worker.pid 5 | 6 | user=${VENDOR_USER} 7 | 8 | autorestart=true 9 | startretries=20 10 | 11 | stdout_logfile=${LOG_DIR}/${SERVICE_NAME}_worker.log 12 | stdout_logfile_maxbytes=5000000 13 | 14 | stderr_logfile=${LOG_DIR}/${SERVICE_NAME}_worker.log 15 | stderr_logfile_maxbytes=5000000 16 | 17 | environment= 18 | -------------------------------------------------------------------------------- /deploy/supervisor_ads.conf: -------------------------------------------------------------------------------- 1 | [program:${VENDOR_NAME}_${SERVICE_NAME}_worker_ads] 2 | directory=${VENDOR_DIR}/${SERVICE_NAME} 3 | command=php artisan queue:work --queue=ads --tries=200 --delay=600 4 | pidfile=/var/run/${VENDOR_NAME}/${SERVICE_NAME}_worker_ads.pid 5 | 6 | user=${VENDOR_USER} 7 | 8 | autorestart=true 9 | startretries=20 10 | 11 | stdout_logfile=${LOG_DIR}/${SERVICE_NAME}_worker_ads.log 12 | stdout_logfile_maxbytes=5000000 13 | 14 | stderr_logfile=${LOG_DIR}/${SERVICE_NAME}_worker_ads.log 15 | stderr_logfile_maxbytes=5000000 16 | 17 | environment= 18 | -------------------------------------------------------------------------------- /deploy/v0.5/README.md: -------------------------------------------------------------------------------- 1 | To run the migration script please set the following environments' variables: 2 | - DB_HOST 3 | - DB_PORT 4 | - DB_USERNAME 5 | - DB_PASSWORD 6 | 7 | Use above variables and run the script: 8 | ``` 9 | DB_HOST=DB_HOST DB_PORT=DB_PORT DB_DATABASE=database DB_USERNAME=DB_USERNAME DB_PASSWORD=DB_PASSWORD php update_domain.php 10 | ``` 11 | -------------------------------------------------------------------------------- /deploy/v0.8.2/update_network_event_logs_campaign_id.sql: -------------------------------------------------------------------------------- 1 | update network_event_logs nel set campaign_id=( 2 | select nc.uuid from network_banners nb join network_campaigns nc on nc.id=nb.network_campaign_id where nb.uuid=nel.banner_id 3 | ); 4 | -------------------------------------------------------------------------------- /deploy/v0.8/README.md: -------------------------------------------------------------------------------- 1 | In this version two tables were added to store statistics aggregated per hour. 2 | 3 | New events will be processed on-line by command executed by cron. 4 | Data stored to the time **must be** processed manually. 5 | To ease this task two scripts were prepared. 6 | Each of them fills one of the new tables with aggregated statistics data: 7 | - script `insert_stats_aggregates_advertiser.sql` inserts data for advertiser. 8 | - script `insert_stats_aggregates_publisher.sql` inserts data for publisher. 9 | -------------------------------------------------------------------------------- /deploy/v1.2.0/README.md: -------------------------------------------------------------------------------- 1 | Create store (file) for reported ads 2 | ``` 3 | echo 'user_id;network_banner_uuid' > storage/app/reported-ads.txt 4 | chmod 664 storage/app/reported-ads.txt 5 | ``` 6 | -------------------------------------------------------------------------------- /deploy/v1.2.3/README.md: -------------------------------------------------------------------------------- 1 | If version 1.2.2 is running on the server, execute following commands: 2 | ``` 3 | ALTER TABLE network_case_payments 4 | CHANGE COLUMN pay_time pay_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP; 5 | 6 | ALTER TABLE network_case_payments 7 | ADD COLUMN created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 8 | AFTER network_case_id; 9 | 10 | UPDATE network_case_payments SET created_at = pay_time WHERE 1=1; 11 | ``` 12 | -------------------------------------------------------------------------------- /dev-router.php: -------------------------------------------------------------------------------- 1 | 19 | */ 20 | 21 | declare(strict_types=1); 22 | 23 | $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); 24 | 25 | if (file_exists($_SERVER['DOCUMENT_ROOT'] . $path)) { 26 | return false; 27 | } else { 28 | $_SERVER['SCRIPT_FILENAME'] = './public/index.php'; 29 | include './public/index.php'; 30 | } 31 | -------------------------------------------------------------------------------- /docker/bin/append_to_hosts.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | RESPONSE=$(host -t A $1);CODE=$? 6 | if [ ${CODE} -eq 0 ] 7 | then 8 | echo -e "`echo ${RESPONSE} | awk -F' ' '{print$4}'`\t$2" | tee --append /etc/hosts; 9 | else 10 | echo "Could not find IP for '$1' to set as '$2'" 11 | fi 12 | -------------------------------------------------------------------------------- /docker/bin/php-fpm.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | /usr/sbin/php-fpm7.2 -F -O 2>&1 | sed -u 's,.*: \"\(.*\)$,\1,'| sed -u 's,"$,,' 1>&1 3 | -------------------------------------------------------------------------------- /docker/bin/set_config_from_env.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Credit: https://github.com/alterway/docker-php/blob/master/7.1-fpm/docker-entrypoint.sh 4 | 5 | set -e 6 | 7 | IFS_BACKUP=$IFS 8 | 9 | echo -e "\n___ $2 ___\n" 10 | 11 | #echo "$4" | tee "$2" 12 | 13 | IFS=$(echo -en "\n\b") 14 | for c in `printenv|grep $1` 15 | do 16 | echo "`echo $c|cut -d "=" -f1|awk -F"$1" '{print $2}'` $3 `echo $c|cut -d "=" -f2`" | tee --append "$2" 17 | done 18 | 19 | echo -e "\n--- $2 ---\n" 20 | 21 | IFS=$IFS_BACKUP 22 | -------------------------------------------------------------------------------- /docker/bin/wait_for_database.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | maxcounter=45 6 | counter=1 7 | 8 | source .env 9 | 10 | while ! mysql -h"$DB_HOST" -p"$DB_PORT" -u"$DB_USERNAME" -p"$DB_PASSWORD" -e "show databases;" > /dev/null 2>&1 11 | do 12 | >&2 echo "DB not ready yet... sleep #$counter/$maxcounter" 13 | 14 | sleep 1 15 | 16 | counter=`expr $counter + 1` 17 | 18 | if [ $counter -gt $maxcounter ]; then 19 | >&2 echo "Database ($DB_HOST) down; Failing." 20 | exit 1 21 | fi 22 | done 23 | -------------------------------------------------------------------------------- /docker/cron/adpay-export.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ ! -e /tmp/adpay_export_in_progress ]; then 4 | touch /tmp/adpay_export_in_progress 5 | 6 | ./artisan ops:adpay:campaign:export 7 | ./artisan ops:adpay:event:export 8 | 9 | rm -f /tmp/adpay_export_in_progress 10 | fi 11 | -------------------------------------------------------------------------------- /docker/cron/ads-broadcast-host.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ ! -e /tmp/ads_broadcast_host_in_progress ]; then 4 | touch /tmp/ads_broadcast_host_in_progress 5 | 6 | ./artisan ads:broadcast-host 7 | 8 | rm -f /tmp/ads_broadcast_host_in_progress 9 | fi 10 | -------------------------------------------------------------------------------- /docker/cron/ads-fetch-hosts.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ ! -e /tmp/ads_fetch_hosts_in_progress ]; then 4 | touch /tmp/ads_fetch_hosts_in_progress 5 | 6 | ./artisan ads:fetch-hosts --quiet 7 | 8 | rm -f /tmp/ads_fetch_hosts_in_progress 9 | fi 10 | -------------------------------------------------------------------------------- /docker/cron/ads-scanner.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ ! -e /tmp/ads_scanner_in_progress ]; then 4 | touch /tmp/ads_scanner_in_progress 5 | 6 | ./artisan ads:process-tx 7 | ./artisan ops:supply:payments:process 8 | ./artisan ops:adselect:case-payments:export 9 | ./artisan ops:stats:aggregate:publisher 10 | 11 | rm -f /tmp/ads_scanner_in_progress 12 | fi 13 | -------------------------------------------------------------------------------- /docker/cron/adselect-export.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ ! -e /tmp/adselect_export_in_progress ]; then 4 | touch /tmp/adselect_export_in_progress 5 | 6 | ./artisan ops:adselect:case:export 7 | 8 | rm -f /tmp/adselect_export_in_progress 9 | fi 10 | -------------------------------------------------------------------------------- /docker/cron/crontab: -------------------------------------------------------------------------------- 1 | 0 */12 * * * cd /var/www/adserver && bash docker/cron/ads-broadcast-host.sh >> /dev/null 2>&1 2 | 3 | 30 */6 * * * cd /var/www/adserver && bash docker/cron/ads-fetch-hosts.sh >> /dev/null 2>&1 4 | 5 | * * * * * cd /var/www/adserver && bash docker/cron/ops-inventory.sh >> /dev/null 2>&1 6 | 7 | * * * * * cd /var/www/adserver && bash docker/cron/adselect-export.sh >> /dev/null 2>&1 8 | 9 | * * * * * cd /var/www/adserver && bash docker/cron/adpay-export.sh >> /dev/null 2>&1 10 | 11 | 59 * * * * /var/www/adserver/artisan ops:demand:payments:block >> /dev/null 2>&1 12 | 13 | 15 * * * * cd /var/www/adserver && bash docker/cron/ops-payments.sh >> /dev/null 2>&1 14 | 15 | */8 * * * * cd /var/www/adserver && bash docker/cron/ads-scanner.sh >> /dev/null 2>&1 16 | 17 | */30 * * * * cd /opt/adshares/adserver && bash docker/cron/ops-wallet.sh >> /dev/null 2>&1 18 | -------------------------------------------------------------------------------- /docker/cron/crontab-demo: -------------------------------------------------------------------------------- 1 | 0 */12 * * * cd /opt/adshares/adserver && bash docker/cron/ads-broadcast-host.sh >> /dev/null 2>&1 2 | 3 | 30 */6 * * * cd /opt/adshares/adserver && bash docker/cron/ads-fetch-hosts.sh >> /dev/null 2>&1 4 | 5 | * * * * * cd /opt/adshares/adserver && bash docker/cron/ops-inventory.sh >> /dev/null 2>&1 6 | 7 | * * * * * cd /opt/adshares/adserver && bash docker/cron/adselect-export.sh >> /dev/null 2>&1 8 | 9 | * * * * * cd /opt/adshares/adserver && bash docker/cron/adpay-export.sh >> /dev/null 2>&1 10 | 11 | 59 * * * * /opt/adshares/adserver/artisan ops:demand:payments:block >> /dev/null 2>&1 12 | 13 | 15 * * * * cd /opt/adshares/adserver && bash docker/cron/ops-payments.sh >> /dev/null 2>&1 14 | 15 | */8 * * * * cd /opt/adshares/adserver && bash docker/cron/ads-scanner.sh >> /dev/null 2>&1 16 | 17 | */30 * * * * cd /opt/adshares/adserver && bash docker/cron/ops-wallet.sh >> /dev/null 2>&1 18 | -------------------------------------------------------------------------------- /docker/cron/crontab-docker: -------------------------------------------------------------------------------- 1 | #0 */12 * * * cd /adserver && bash docker/cron/ads-broadcast-host.sh > /proc/1/fd/1 2>/proc/1/fd/2 2 | 3 | #30 */6 * * * cd /adserver && bash docker/cron/ads-fetch-hosts.sh > /proc/1/fd/1 2>/proc/1/fd/2 4 | 5 | #* * * * * cd /adserver && bash docker/cron/ops-inventory.sh > /proc/1/fd/1 2>/proc/1/fd/2 6 | 7 | #* * * * * cd /adserver && bash docker/cron/adselect-export.sh > /proc/1/fd/1 2>/proc/1/fd/2 8 | 9 | #* * * * * cd /adserver && bash docker/cron/adpay-export.sh > /proc/1/fd/1 2>/proc/1/fd/2 10 | 11 | #30 * * * * cd /adserver && bash docker/cron/ops-payments.sh > /proc/1/fd/1 2>/proc/1/fd/2 12 | 13 | #*/8 * * * * cd /adserver && bash docker/cron/ads-scanner.sh > /proc/1/fd/1 2>/proc/1/fd/2 14 | 15 | #*/30 * * * * cd /opt/adshares/adserver && bash docker/cron/ops-wallet.sh >> /dev/null 2>&1 16 | -------------------------------------------------------------------------------- /docker/cron/crontab-test: -------------------------------------------------------------------------------- 1 | #0 */12 * * * cd /opt/adshares/adserver && bash docker/cron/ads-broadcast-host.sh >> /dev/null 2>&1 2 | 3 | #30 */6 * * * cd /opt/adshares/adserver && bash docker/cron/ads-fetch-hosts.sh >> /dev/null 2>&1 4 | 5 | * * * * * cd /opt/adshares/adserver && bash docker/cron/ops-inventory.sh >> /dev/null 2>&1 6 | 7 | * * * * * cd /opt/adshares/adserver && bash docker/cron/adpay-export.sh >> /dev/null 2>&1 8 | 9 | 59 * * * * /opt/adshares/adserver/artisan ops:demand:payments:block >> /dev/null 2>&1 10 | 11 | 15 * * * * cd /opt/adshares/adserver && bash docker/cron/ops-payments.sh >> /dev/null 2>&1 12 | 13 | */8 * * * * cd /opt/adshares/adserver && bash docker/cron/ads-scanner.sh >> /dev/null 2>&1 14 | 15 | */30 * * * * cd /opt/adshares/adserver && bash docker/cron/ops-wallet.sh >> /dev/null 2>&1 16 | -------------------------------------------------------------------------------- /docker/cron/ops-inventory.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ ! -e /tmp/ops_inventory_in_progress ]; then 4 | touch /tmp/ops_inventory_in_progress 5 | 6 | ./artisan ops:demand:inventory:import 7 | ./artisan ops:adselect:inventory:export 8 | 9 | rm -f /tmp/ops_inventory_in_progress 10 | fi 11 | -------------------------------------------------------------------------------- /docker/cron/ops-payments.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ ! -e /tmp/ops_payments_in_progress ]; then 4 | touch /tmp/ops_payments_in_progress 5 | 6 | ./artisan ops:demand:payments:process 7 | 8 | rm -f /tmp/ops_payments_in_progress 9 | fi 10 | -------------------------------------------------------------------------------- /docker/cron/ops-wallet.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | PIDFILE=/tmp/ops_wallet_in_progress.pid 3 | 4 | if [ ! -f $PIDFILE ] 5 | then 6 | touch $PIDFILE 7 | 8 | ./artisan ops:wallet:transfer:cold 9 | ./artisan ops:wallet:transfer:check 10 | 11 | rm -f $PIDFILE 12 | fi 13 | -------------------------------------------------------------------------------- /docker/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80 default; 3 | 4 | client_max_body_size 64M; 5 | 6 | access_log /dev/stdout; 7 | error_log /var/log/nginx/error.log debug; 8 | 9 | root /adserver/public; 10 | index index.php; 11 | 12 | if (!-e $request_filename) { 13 | rewrite ^.*$ /index.php last; 14 | } 15 | 16 | location / { 17 | try_files $uri $uri/ /index.php?$args; 18 | } 19 | 20 | location /. { 21 | return 404; 22 | } 23 | 24 | location ~ \.php$ { 25 | fastcgi_pass application:9000; 26 | fastcgi_index index.php; 27 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 28 | fastcgi_param PHP_VALUE "error_log=/var/log/nginx/adserver_php_errors.log"; 29 | fastcgi_buffers 16 16k; 30 | fastcgi_buffer_size 32k; 31 | fastcgi_read_timeout 512; 32 | include fastcgi_params; 33 | } 34 | 35 | location ~ /\.ht { 36 | deny all; 37 | } 38 | 39 | location ~ \.png$ { 40 | add_header 'Access-Control-Allow-Origin' $http_origin; 41 | add_header 'Access-Control-Allow-Credentials' 'true'; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /docker/overrides.conf: -------------------------------------------------------------------------------- 1 | ; Credit: PHPDocker.io 2 | [global] 3 | ; Override default pid file 4 | pid = /run/php-fpm.pid 5 | 6 | ; Avoid logs being sent to syslog 7 | error_log = /proc/self/fd/2 8 | 9 | [www] 10 | ; Access from webserver container is via network, not socket file 11 | listen = [::]:9000 12 | 13 | ; Redirect logs to stdout - FPM closes /dev/std* on startup 14 | access.log = /proc/self/fd/2 15 | catch_workers_output = yes 16 | 17 | ; Required to allow config-by-environment 18 | clear_env = no 19 | -------------------------------------------------------------------------------- /docker/skel/.bash_logout: -------------------------------------------------------------------------------- 1 | if [ "$SHLVL" = 1 ] 2 | then 3 | [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q 4 | fi 5 | -------------------------------------------------------------------------------- /docker/skel/.config/mc/panels.ini: -------------------------------------------------------------------------------- 1 | [New Left Panel] 2 | display=listing 3 | reverse=0 4 | case_sensitive=1 5 | exec_first=0 6 | sort_order=name 7 | list_mode=user 8 | brief_cols=2 9 | user_format=half type name | size | perm | owner|group|mtime 10 | user_status0=half type name | size | perm 11 | user_status1=half type name | size | perm 12 | user_status2=half type name | size | perm 13 | user_status3=half type name | size | perm 14 | user_mini_status=0 15 | 16 | [New Right Panel] 17 | display=listing 18 | reverse=0 19 | case_sensitive=1 20 | exec_first=0 21 | sort_order=name 22 | list_mode=user 23 | brief_cols=2 24 | user_format=half type name | size | perm| owner|group|mtime 25 | user_status0=half type name | size | perm 26 | user_status1=half type name | size | perm 27 | user_status2=half type name | size | perm 28 | user_status3=half type name | size | perm 29 | user_mini_status=0 30 | 31 | [Dirs] 32 | current_is_left=true 33 | other_dir=~ 34 | -------------------------------------------------------------------------------- /docker/skel/.profile: -------------------------------------------------------------------------------- 1 | umask 022 2 | 3 | if [ -n "$BASH_VERSION" ] 4 | then 5 | if [ -f "$HOME/.bashrc" ] 6 | then 7 | source "$HOME/.bashrc" 8 | fi 9 | fi 10 | 11 | if [ -n "$ZSH_VERSION" ] 12 | then 13 | if [ -f "$HOME/.zshrc" ] 14 | then 15 | source "$HOME/.zshrc" 16 | fi 17 | fi 18 | 19 | if [ -d "$HOME/bin" ] 20 | then 21 | PATH="$HOME/bin:$PATH" 22 | fi 23 | -------------------------------------------------------------------------------- /docker/skel/.ssh/authorized_keys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/docker/skel/.ssh/authorized_keys -------------------------------------------------------------------------------- /docs/banner-sizes.md: -------------------------------------------------------------------------------- 1 | # Typical banner sizes 2 | - 300x250 3 | - 336x280 4 | - 728x90 5 | - 300x600 6 | - 320x100 7 | 8 | https://support.google.com/adsense/answer/6002621 9 | -------------------------------------------------------------------------------- /docs/conversion_diagram.puml: -------------------------------------------------------------------------------- 1 | @startuml 2 | 3 | class Conversion 4 | { 5 | +id 6 | +campaign_id 7 | +{field} limit_type (in_budget, out_of_budget) 8 | +{field} event_type (click, register, buy) 9 | +type 10 | +value 11 | +limit 12 | +date 13 | } 14 | 15 | 16 | class Event 17 | { 18 | +conversion_id 19 | +event_type - click,view,conversion 20 | } 21 | 22 | @enduml 23 | -------------------------------------------------------------------------------- /docs/conversion_flow.puml: -------------------------------------------------------------------------------- 1 | @startuml 2 | 3 | header Adshares Conversion Flow 4 | title Conversion 5 | 6 | actor User << browser >> 7 | participant Publisher << Site >> 8 | participant Supply 9 | participant Demand 10 | participant Advertiser << Adidas >> 11 | 12 | ... 13 | Advertiser -> Advertiser: Generate advanced pixel urls \ngenerate_urls() 14 | ... 15 | 16 | User -> Publisher: GET index.html 17 | User <-- Publisher: index.html 18 | 19 | Publisher -> Supply: GET find.js 20 | Publisher <-- Supply: find.js 21 | 22 | 23 | autonumber 24 | User -> Publisher: CLICK on a banner 25 | 26 | Publisher -> Supply: Register click event 27 | Supply -> Demand: Register click event 28 | 29 | 30 | alt Conversion flow 31 | User -> Advertiser: Open advertiser page (Adidas) 32 | 33 | Advertiser -> Advertiser: Parse request query params (cid) 34 | Advertiser -> Advertiser: use query params to build a pixel url \n based on previously generated urls\ngenerate_urls() 35 | Advertiser -> Demand: send a pixel request 36 | 37 | Demand -> Demand: Save Conversion event 38 | end 39 | @enduml 40 | -------------------------------------------------------------------------------- /docs/examples/adselect01.banner_select.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "get1", 3 | "jsonrpc": "2.0", 4 | "method": "banner_select", 5 | "params": [ 6 | { 7 | "keywords": { 8 | "color": [ 9 | "red" 10 | ] 11 | }, 12 | "banner_size": "150x150", 13 | "publisher_id": "pid1", 14 | "request_id": 1, 15 | "user_id": "uid1" 16 | }, 17 | { 18 | "keywords": { 19 | "color": [ 20 | "green" 21 | ] 22 | }, 23 | "banner_size": "200x200", 24 | "publisher_id": "pid1", 25 | "request_id": 2, 26 | "user_id": "uid1" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /docs/examples/adselect01.campaign_update.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "upsert1", 3 | "jsonrpc": "2.0", 4 | "method": "campaign_update", 5 | "params": [ 6 | { 7 | "banners": [ 8 | { 9 | "banner_id": "a", 10 | "banner_size": "150x150", 11 | "keywords": { 12 | "type": "image" 13 | } 14 | }, 15 | { 16 | "banner_id": "b", 17 | "banner_size": "200x200", 18 | "keywords": { 19 | "type": "html" 20 | } 21 | } 22 | ], 23 | "campaign_id": "zibi-test-1", 24 | "filters": { 25 | "require": { 26 | "color": [ 27 | "red","green" 28 | ] 29 | }, 30 | "exclude": {} 31 | }, 32 | "keywords": { 33 | "source_host": "http://webserver", 34 | "adshares_address": "0001-00000003-AB0C" 35 | }, 36 | "time_start":0, 37 | "time_end": 1643504441 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /docs/publisher-flow.puml: -------------------------------------------------------------------------------- 1 | @startuml 2 | participant Publisher << web server >> 3 | actor User << browser >> 4 | participant Supply as Supply << AdServer >> 5 | participant Supply as SupplyU << AdUser >> 6 | 7 | User -> Publisher: GET index.html 8 | User <-- Publisher: index.html 9 | 10 | User -> Supply: GET find.js 11 | User <-- Supply: find.js (cacheable) 12 | 13 | ... 14 | 15 | User ->> Supply : {impressionId} 16 | User <<-- Supply : (set cookie & redirect) 17 | User ->> SupplyU: (follow redirect) 18 | User <<-- SupplyU: (set cookie & redirect) 19 | User ->>] : (follow redirect) 20 | 21 | ... 22 | 23 | 24 | @enduml 25 | -------------------------------------------------------------------------------- /docs/schemas/context/v0.1/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "urn:x-adshares:context:0.1", 3 | "data": [ 4 | { 5 | "key": "human_score", 6 | "label": "Human Score", 7 | "value": "0.4" 8 | }, 9 | { 10 | "key": "uid", 11 | "label": "Use Identifier", 12 | "value": "my_uid" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /docs/schemas/context/v0.1/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema#", 3 | "$id": "urn:x-adshares:context:0.1", 4 | "required": [ 5 | "data" 6 | ], 7 | "properties": { 8 | "data": { 9 | "type": "array", 10 | "items": { 11 | "type": "object", 12 | "properties": { 13 | "key": { 14 | "type": "string" 15 | }, 16 | "label": { 17 | "type": "string" 18 | }, 19 | "value": { 20 | "type": "string" 21 | } 22 | } 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /docs/schemas/info/v0.1/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "urn:x-adshares:info:0.1", 3 | "service": { 4 | "host": "http://example.com", 5 | "role": "AdUser", 6 | "endpoints": [ 7 | { 8 | "path": "/info", 9 | "output": "urn:x-adshares:info:0.1" 10 | }, 11 | { 12 | "path": "/getTaxonomy", 13 | "output": "urn:x-adshares:taxonomy:0.1" 14 | }, 15 | { 16 | "path": "/getData", 17 | "output": "urn:x-adshares:context:0.1" 18 | } 19 | ] 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /docs/schemas/info/v0.1/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema#", 3 | "$id": "urn:x-adshares:info:0.1", 4 | "type": "object", 5 | "title": "Service Information Schema", 6 | "readOnly": true, 7 | "required": [ 8 | "service" 9 | ], 10 | "properties": { 11 | "service": { 12 | "$ref": "urn:x-adshares#service" 13 | }, 14 | "endpoints": { 15 | "type": "array", 16 | "items": { 17 | "$ref": "urn:x-adshares#endpoint" 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /docs/schemas/taxonomy/v0.1/targeting-example.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "urn:x-adshares:taxonomy", 3 | "version": "0.0.0", 4 | "data": [ 5 | { 6 | "key": "country", 7 | "label": "Country", 8 | "type": "dict", 9 | "list": [ 10 | { 11 | "value": "AF", 12 | "label": "Afghanistan" 13 | } 14 | ] 15 | }, 16 | { 17 | "key": "device_type", 18 | "label": "Device type", 19 | "type": "dict", 20 | "list": [ 21 | { 22 | "value": "car_entertainment_system", 23 | "label": "Car Entertainment System" 24 | } 25 | ] 26 | }, 27 | { 28 | "key": "javascript", 29 | "label": "JavaScript", 30 | "type": "bool" 31 | }, 32 | { 33 | "key": "browser", 34 | "label": "Browser", 35 | "type": "dict", 36 | "list": [ 37 | { 38 | "value": "115_browser", 39 | "label": "115 Browser" 40 | } 41 | ] 42 | }, 43 | { 44 | "key": "keywords", 45 | "label": "Site Keywords", 46 | "type": "input" 47 | } 48 | ] 49 | } 50 | -------------------------------------------------------------------------------- /mocks/mappings/admin_settings__get.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/admin/settings" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "earnings": 0.12 15 | } 16 | }, 17 | "priority": 0 18 | } 19 | -------------------------------------------------------------------------------- /mocks/mappings/admin_settings__patch.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "PATCH", 4 | "url": "/admin/settings" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "earnings": 0.44 15 | } 16 | }, 17 | "priority": 0 18 | } 19 | -------------------------------------------------------------------------------- /mocks/mappings/admin_settings_get.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/admin_settings" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "earnings": 0.12 15 | } 16 | }, 17 | "priority": 0 18 | } 19 | -------------------------------------------------------------------------------- /mocks/mappings/adshares_address_get.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/adshares_address" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "adsharesAddress": "0001-0000001F-34FC" 15 | } 16 | }, 17 | "priority": 0 18 | } 19 | -------------------------------------------------------------------------------- /mocks/mappings/all_get.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/.*/" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "description": "Catch-all scenario", 15 | "delayMillis": 3000 16 | } 17 | 18 | }, 19 | "priority" : 0 20 | } 21 | -------------------------------------------------------------------------------- /mocks/mappings/auth_check__get.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/auth/check" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "id": 1, 15 | "email": "user1@example.com", 16 | "isAdvertiser": true, 17 | "isPublisher": true, 18 | "isAdmin": false, 19 | "isEmailConfirmed": true, 20 | "authToken": "someauthtokenvalue", 21 | "adserverWallet": { 22 | "adsharesAddress": "0001-0000001F-34FC", 23 | "paymentMemo": "User 0291", 24 | "autoWithdrawPeriod": 1, 25 | "autoWithdrawAmount": 300, 26 | "totalFunds": 1276.60, 27 | "totalFundsInCurrency": 4336.23, 28 | "totalFundsChange": 20.30, 29 | "lastPayment": "Tue Feb 20 2018 12:24:00 GMT" 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /mocks/mappings/auth_login_failed__post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/auth/login" 5 | }, 6 | "response": { 7 | "status": 401, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "description": "Invalid username or password" 15 | } 16 | }, 17 | "priority": 999 18 | } 19 | -------------------------------------------------------------------------------- /mocks/mappings/auth_logout_get.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/auth/logout" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | } 15 | }, 16 | "priority": 10 17 | } 18 | -------------------------------------------------------------------------------- /mocks/mappings/auth_recovery__post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/auth/recovery" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { "status": 200 } 14 | }, 15 | "priority": 0 16 | } 17 | -------------------------------------------------------------------------------- /mocks/mappings/campaigns_0_banner_0__delete.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "DELETE", 4 | "url": "/campaigns/0/banner/0" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { "status": 200 } 14 | }, 15 | "priority": 0 16 | } 17 | -------------------------------------------------------------------------------- /mocks/mappings/campaigns_0_banner__post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/campaigns/0/banner" 5 | 6 | }, 7 | "response": { 8 | "status": 200, 9 | "headers": { 10 | "Content-Type": "application/json", 11 | "Access-Control-Allow-Origin": "http://panel.ads", 12 | "Access-Control-Allow-Credentials": "true" 13 | }, 14 | "jsonBody": { 15 | "name": "file-name.png", 16 | "imageUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSP3l58naYcoyqfxstOVPyZdlC4gwNCw89YZts9ThIrUZVrbA8i3g", 17 | "size": "222 KB" 18 | } 19 | }, 20 | "priority": 0 21 | } 22 | -------------------------------------------------------------------------------- /mocks/mappings/campaigns_count__get.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/campaigns/count" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "totalBudget": 903, 15 | "totalClicks": 4263, 16 | "totalImpressions": 248667, 17 | "averageCTR": 0.0315, 18 | "averageCPC": 2.115, 19 | "totalCost": 4866.46 20 | } 21 | }, 22 | "priority": 0 23 | } 24 | -------------------------------------------------------------------------------- /mocks/mappings/campaigns_totals_post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/campaigns_totals" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "totalBudget": 903, 15 | "totalClicks": 4263, 16 | "totalImpressions": 248667, 17 | "averageCTR": 0.0315, 18 | "averageCPC": 2.115, 19 | "totalCost": 4866.46 20 | } 21 | }, 22 | "priority": 0 23 | } 24 | -------------------------------------------------------------------------------- /mocks/mappings/change_automatic_withdraw__post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/change_automatic_withdraw" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { "status": 200 } 14 | }, 15 | "priority": 0 16 | } 17 | -------------------------------------------------------------------------------- /mocks/mappings/change_automatic_withdraw_post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/change_automatic_withdraw" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { "status": 200 } 14 | }, 15 | "priority": 0 16 | } 17 | -------------------------------------------------------------------------------- /mocks/mappings/change_email_post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/change_email" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { "status": 200 } 14 | }, 15 | "priority": 0 16 | } 17 | -------------------------------------------------------------------------------- /mocks/mappings/change_password_post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/change_password" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { "status": 200 } 14 | }, 15 | "priority": 0 16 | } 17 | -------------------------------------------------------------------------------- /mocks/mappings/change_withdraw_address_post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/change_withdraw_address" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { "status": 200 } 14 | }, 15 | "priority": 0 16 | } 17 | -------------------------------------------------------------------------------- /mocks/mappings/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/config" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "cors": true, 15 | "jsonp": true, 16 | "simulated-lag": 500 17 | } 18 | }, 19 | "priority": 0 20 | } 21 | -------------------------------------------------------------------------------- /mocks/mappings/config_adshares_address__get.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/config/adshares-address" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "adsharesAddress": "0001-0000001F-34FC" 15 | } 16 | }, 17 | "priority": 0 18 | } 19 | -------------------------------------------------------------------------------- /mocks/mappings/delete_ad_post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/delete_ad" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { "status": 200 } 14 | }, 15 | "priority": 0 16 | } 17 | -------------------------------------------------------------------------------- /mocks/mappings/dismiss_notification_post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/dismiss_notification" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "id": 879132879132312, 15 | "type": 0, 16 | "message": "Your campaign changed status for 'Inactive'" 17 | } 18 | }, 19 | "priority": 0 20 | } 21 | -------------------------------------------------------------------------------- /mocks/mappings/notifications_1__delete.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "DELETE", 4 | "url": "/notifications/1" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "id": 879132879132312, 15 | "type": 0, 16 | "message": "Your campaign changed status for 'Inactive'" 17 | } 18 | }, 19 | "priority": 0 20 | } 21 | -------------------------------------------------------------------------------- /mocks/mappings/notifications__get.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/notifications" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": [ 14 | { 15 | "id": 8897312, 16 | "userRole": "all", 17 | "type": "account", 18 | "title": "Welcome", 19 | "message": "Your account has been created" 20 | } 21 | ] 22 | }, 23 | "priority": 0 24 | } 25 | -------------------------------------------------------------------------------- /mocks/mappings/notifications_settings__get.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/notifications_settings" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": [ 14 | { 15 | "name": "Billing Alerts", 16 | "notification": true, 17 | "email": false 18 | }, 19 | { 20 | "name": "Campaign Maintenance Alerts", 21 | "notification": true, 22 | "email": true 23 | }, 24 | { 25 | "name": "Newsletter", 26 | "notification": false, 27 | "email": false 28 | }, 29 | { 30 | "name": "Performance Suggestions", 31 | "notification": true, 32 | "email": true 33 | }, 34 | { 35 | "name": "Special Offers", 36 | "notification": true, 37 | "email": false 38 | } 39 | ] 40 | }, 41 | "priority": 0 42 | } 43 | -------------------------------------------------------------------------------- /mocks/mappings/notifications_settings_get.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/notifications_settings" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": [ 14 | { 15 | "name": "Billing Alerts", 16 | "notification": true, 17 | "email": false 18 | }, 19 | { 20 | "name": "Campaign Maintenance Alerts", 21 | "notification": true, 22 | "email": true 23 | }, 24 | { 25 | "name": "Newsletter", 26 | "notification": false, 27 | "email": false 28 | }, 29 | { 30 | "name": "Performance Suggestions", 31 | "notification": true, 32 | "email": true 33 | }, 34 | { 35 | "name": "Special Offers", 36 | "notification": true, 37 | "email": false 38 | } 39 | ] 40 | }, 41 | "priority": 0 42 | } 43 | -------------------------------------------------------------------------------- /mocks/mappings/notifications_settings_patch.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "PATCH", 4 | "url": "/notifications/settings" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "earnings": 0.44 15 | } 16 | }, 17 | "priority": 0 18 | } 19 | -------------------------------------------------------------------------------- /mocks/mappings/options.json: -------------------------------------------------------------------------------- 1 | { 2 | "priority":10, 3 | "request": { 4 | "method": "OPTIONS", 5 | "urlPattern": ".*" 6 | }, 7 | "response": { 8 | "status": 200, 9 | "headers": { 10 | "Content-Type": "application/json", 11 | "Access-Control-Allow-Origin": "http://panel.ads", 12 | "Access-Control-Allow-Credentials": "true", 13 | "Access-Control-Allow-Methods" : "GET, POST, PUT, PATCH, DELETE, OPTIONS", 14 | "Access-Control-Allow-Headers": "Accept, Content-Type, Content-Encoding, Server, Transfer-Encoding, X-Requested-With, X-Authorization, Authorization", 15 | "X-Content-Type-Options" : "nosniff", 16 | "x-frame-options" : "DENY", 17 | "x-xss-protection" : "1; mode=block" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /mocks/mappings/register_user_post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/register_user" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "id": 0, 15 | "email": "sth@sth.sth", 16 | "isAdvertiser": true, 17 | "isPublisher": true, 18 | "isAdmin": false 19 | } 20 | }, 21 | "priority": 0 22 | } 23 | -------------------------------------------------------------------------------- /mocks/mappings/remind_password_post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/remind_password" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { "status": 200 } 14 | }, 15 | "priority": 0 16 | } 17 | -------------------------------------------------------------------------------- /mocks/mappings/save_ad__post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/save_ad" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "id": 1, 15 | "status": 0, 16 | "shortHeadline": "Adshares Dashboard Advertisement", 17 | "type": "image", 18 | 19 | "budget": 20, 20 | "clicks": 100, 21 | "impressions": 1233422132, 22 | "CTR": 0.00001233, 23 | "averageCPC": 1.2, 24 | "cost": 2435.23 25 | } 26 | }, 27 | "priority": 0 28 | } 29 | -------------------------------------------------------------------------------- /mocks/mappings/save_ad_post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/save_ad" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "id": 1, 15 | "status": 0, 16 | "shortHeadline": "Adshares Dashboard Advertisement", 17 | "type": "image", 18 | 19 | "budget": 20, 20 | "clicks": 100, 21 | "impressions": 1233422132, 22 | "CTR": 0.00001233, 23 | "averageCPC": 1.2, 24 | "cost": 2435.23 25 | } 26 | }, 27 | "priority": 0 28 | } 29 | -------------------------------------------------------------------------------- /mocks/mappings/send_activation_email_post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/send_activation_email" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { "status": 200 } 14 | }, 15 | "priority": 0 16 | } 17 | -------------------------------------------------------------------------------- /mocks/mappings/sites_count__get.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/sites/count" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "totalEarnings": 1364, 15 | "totalClicks": 224, 16 | "totalImpressions": 12546, 17 | "averagePageRPM": 0.0515, 18 | "averageCPC": 2.05 19 | } 20 | }, 21 | "priority": 0 22 | } 23 | -------------------------------------------------------------------------------- /mocks/mappings/sites_totals__post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/sites_totals" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "totalEarnings": 1364, 15 | "totalClicks": 224, 16 | "totalImpressions": 12546, 17 | "averagePageRPM": 0.0515, 18 | "averageCPC": 2.05 19 | } 20 | }, 21 | "priority": 0 22 | } 23 | -------------------------------------------------------------------------------- /mocks/mappings/sites_totals_post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/sites_totals" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "totalEarnings": 1364, 15 | "totalClicks": 224, 16 | "totalImpressions": 12546, 17 | "averagePageRPM": 0.0515, 18 | "averageCPC": 2.05 19 | } 20 | }, 21 | "priority": 0 22 | } 23 | -------------------------------------------------------------------------------- /mocks/mappings/update_admin_settings_post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/update_admin_settings" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "earnings": 0.44 15 | } 16 | }, 17 | "priority": 0 18 | } 19 | -------------------------------------------------------------------------------- /mocks/mappings/update_notifications_settings_post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/update_notifications_settings" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": [ 14 | { 15 | "name": "Billing Alerts", 16 | "notification": true, 17 | "email": false 18 | }, 19 | { 20 | "name": "Campaign Maintenance Alerts", 21 | "notification": true, 22 | "email": true 23 | }, 24 | { 25 | "name": "Newsletter", 26 | "notification": false, 27 | "email": false 28 | }, 29 | { 30 | "name": "Performance Suggestions", 31 | "notification": true, 32 | "email": true 33 | }, 34 | { 35 | "name": "Special Offers", 36 | "notification": true, 37 | "email": false 38 | } 39 | ] 40 | }, 41 | "priority": 0 42 | } 43 | -------------------------------------------------------------------------------- /mocks/mappings/upload_ad_0_put.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "PUT", 4 | "url": "/upload/ad/0" 5 | 6 | }, 7 | "response": { 8 | "status": 200, 9 | "headers": { 10 | "Content-Type": "application/json", 11 | "Access-Control-Allow-Origin": "http://panel.ads", 12 | "Access-Control-Allow-Credentials": "true" 13 | }, 14 | "jsonBody": { 15 | "name": "file-name.png", 16 | "imageUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSP3l58naYcoyqfxstOVPyZdlC4gwNCw89YZts9ThIrUZVrbA8i3g", 17 | "size": "222 KB" 18 | } 19 | }, 20 | "priority": 0 21 | } 22 | -------------------------------------------------------------------------------- /mocks/mappings/users___get.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/users" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "id": 1, 15 | "email": "user@e11.click", 16 | "isAdvertiser": true, 17 | "isPublisher": true, 18 | "isAdmin": false, 19 | "isEmailConfirmed": true, 20 | "authToken": "someauthtokenvalue", 21 | "financialData": { 22 | "userAddress": "0001-0000001F-34FC", 23 | "userMemo": "User f325626f35f6485c84cf90eb7011f1f7", 24 | "userAutomaticWithdrawPeriod": 1, 25 | "userAutomaticWithdrawAmount": 300, 26 | "totalFunds": 1276.60, 27 | "totalFundsInCurrency": 4336.23, 28 | "totalFundsChange": 20.30, 29 | "lastPayment": "Tue Feb 20 2018 12:24:00 GMT" 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /mocks/mappings/users___patch.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "PATCH", 4 | "url": "/users" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "isAdvertiser": true, 15 | "isPublisher": false 16 | } 17 | }, 18 | "priority": 0 19 | } 20 | -------------------------------------------------------------------------------- /mocks/mappings/users_email__post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/users/email" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { "status": 200 } 14 | }, 15 | "priority": 0 16 | } 17 | -------------------------------------------------------------------------------- /mocks/mappings/users_email_activate_resend__post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/users/email/activate/resend" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { "status": 200 } 14 | }, 15 | "priority": 0 16 | } 17 | -------------------------------------------------------------------------------- /mocks/mappings/users_user_1_password__patch.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "PATCH", 4 | "url": "/user/1/password" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { "status": 200 } 14 | }, 15 | "priority": 0 16 | } 17 | -------------------------------------------------------------------------------- /mocks/mappings/users_users__post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/users" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { 14 | "id": 0, 15 | "email": "sth@sth.sth", 16 | "isAdvertiser": true, 17 | "isPublisher": true, 18 | "isAdmin": false 19 | } 20 | }, 21 | "priority": 0 22 | } 23 | -------------------------------------------------------------------------------- /mocks/mappings/wallet_settings__patch.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "PATCH", 4 | "url": "/wallet/settings" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { "status": 200 } 14 | }, 15 | "priority": 0 16 | } 17 | -------------------------------------------------------------------------------- /mocks/mappings/wallet_withdraw__post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/wallet/withdraw" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { "status": 200 } 14 | }, 15 | "priority": 0 16 | } 17 | -------------------------------------------------------------------------------- /mocks/mappings/withdraw_funds_post.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "POST", 4 | "url": "/withdraw_funds" 5 | }, 6 | "response": { 7 | "status": 200, 8 | "headers": { 9 | "Content-Type": "application/json", 10 | "Access-Control-Allow-Origin": "http://panel.ads", 11 | "Access-Control-Allow-Credentials": "true" 12 | }, 13 | "jsonBody": { "status": 200 } 14 | }, 15 | "priority": 0 16 | } 17 | -------------------------------------------------------------------------------- /mocks/readme.md: -------------------------------------------------------------------------------- 1 | # Mocking json responses 2 | 3 | If a route is not found, the mock will be looked for in `mocks/mappings/_.json`.`response`.`jsonBody` 4 | 5 | > see: [\Adshares\Adserver\Http\Controllers\App\AppController::mock](/app/Http/Controllers/App/AppController.php#L69) 6 | 7 | -------------------------------------------------------------------------------- /mocks/wallet-history_get.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "status": "349.80", 4 | "date": "Sat Feb 23 2018 12:24:00 GMT", 5 | "address": "0001-0000001F-34FC", 6 | "link": "https://etherscan.io/address/0001-0000001F-34FC" 7 | }, 8 | { 9 | "status": "320.80", 10 | "date": "Fri Feb 23 2018 12:24:00 GMT", 11 | "address": "0001-0000001F-34FC", 12 | "link": "https://etherscan.io/address/0001-0000001F-34FC" 13 | }, 14 | { 15 | "status": "622.80", 16 | "date": "Thu Feb 22 2018 12:24:00 GMT", 17 | "address": "0001-0000001F-34FC", 18 | "link": "https://etherscan.io/address/0001-0000001F-34FC" 19 | }, 20 | { 21 | "status": "432.80", 22 | "date": "Wed Feb 21 2018 12:24:00 GMT", 23 | "address": "0001-0000001F-34FC", 24 | "link": "https://etherscan.io/address/0001-0000001F-34FC" 25 | } 26 | ] 27 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "testing": "yarn run development", 5 | "test": "yarn run development", 6 | "local": "yarn run development", 7 | "demo": "yarn run development", 8 | "dev": "yarn run development", 9 | "prod": "yarn run production", 10 | "development": "mix", 11 | "production": "mix --production", 12 | "watch": "mix watch", 13 | "hot": "mix watch --hot", 14 | "watch-poll": "mix watch -- --watch-options-poll=1000" 15 | }, 16 | "devDependencies": { 17 | "axios": "^0.21", 18 | "bootstrap": "^4.3", 19 | "cross-env": "^7.0.3", 20 | "jquery": "^3.4", 21 | "laravel-mix": "^6.0.49", 22 | "lodash": "^4.17.13", 23 | "popper.js": "^1.14" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /phpcs.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 18 | 19 | app/ 20 | src/ 21 | tests/ 22 | lib/ 23 | 24 | 25 | -------------------------------------------------------------------------------- /public/panel-assets-default/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/public/panel-assets-default/favicon.ico -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: / 3 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /resources/fonts/mock-font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/resources/fonts/mock-font.ttf -------------------------------------------------------------------------------- /resources/img/empty.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/resources/img/empty.gif -------------------------------------------------------------------------------- /resources/img/placeholder_seed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/resources/img/placeholder_seed.png -------------------------------------------------------------------------------- /resources/js/cryptovoxels/template.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2022 Adshares sp. z o.o. 3 | * 4 | * This file is part of AdServer 5 | * 6 | * AdServer is free software: you can redistribute and/or modify it 7 | * under the terms of the GNU General Public License as published 8 | * by the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AdServer is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty 13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | * See the GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with AdServer. If not, see 18 | */ 19 | 20 | let config = { 21 | 'payout_network': '{PAYOUT_NETWORK}', 22 | 'payout_address': '{PAYOUT_ADDRESS}', 23 | 'adserver': '{SERVER_URL}', 24 | } 25 | 26 | fetch(config.adserver + '/supply/cryptovoxels.js').then(function (response) { 27 | response.text().then(function (text) { 28 | eval(text) 29 | }) 30 | }) 31 | -------------------------------------------------------------------------------- /resources/js/header/header.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Adshares sp. z o.o. 3 | * 4 | * This file is part of AdServer 5 | * 6 | * AdServer is free software: you can redistribute and/or modify it 7 | * under the terms of the GNU General Public License as published 8 | * by the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AdServer is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty 13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | * See the GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with AdServer. If not, see 18 | */ 19 | 20 | (function(window, document){ 21 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least six characters and match the confirmation.', 17 | 'reset' => 'Your password has been reset!', 18 | 'sent' => 'We have e-mailed your password reset link!', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that e-mail address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/lang/en/why-this-ad.php: -------------------------------------------------------------------------------- 1 | 19 | */ 20 | 21 | return [ 22 | 23 | ]; 24 | -------------------------------------------------------------------------------- /resources/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright (c) 2018 Adshares sp. z o.o. 3 | * 4 | * This file is part of AdServer 5 | * 6 | * AdServer is free software: you can redistribute and/or modify it 7 | * under the terms of the GNU General Public License as published 8 | * by the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AdServer is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty 13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | * See the GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with AdServer. If not, see 18 | */ 19 | 20 | 21 | // Body 22 | $body-bg: #f5f8fa; 23 | 24 | // Typography 25 | $font-family-sans-serif: "Raleway", sans-serif; 26 | $font-size-base: 0.9rem; 27 | $line-height-base: 1.6; 28 | -------------------------------------------------------------------------------- /resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright (c) 2018 Adshares sp. z o.o. 3 | * 4 | * This file is part of AdServer 5 | * 6 | * AdServer is free software: you can redistribute and/or modify it 7 | * under the terms of the GNU General Public License as published 8 | * by the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * AdServer is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty 13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | * See the GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with AdServer. If not, see 18 | */ 19 | 20 | 21 | // Fonts 22 | @import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600"); 23 | 24 | // Variables 25 | @import "variables"; 26 | 27 | // Bootstrap 28 | @import '~bootstrap/scss/bootstrap'; 29 | 30 | .navbar-laravel { 31 | background-color: #fff; 32 | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04); 33 | } 34 | -------------------------------------------------------------------------------- /resources/views/common/newsletter-unsubscribe.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Unsubscribed 6 | 7 | 8 | 9 | @if (isset($success) && $success) 10 |

11 | You have been unsubscribed successfully. 12 |

13 |

14 | If you want to subscribe again, log in to your account and change the newsletter setting. 15 |

16 | @else 17 |

18 | We were not able to unsubscribe you. Please try again later or log in to your account and unsubscribe using 19 | newsletter settings. 20 |

21 | @endif 22 | 23 | 24 | -------------------------------------------------------------------------------- /resources/views/demand/view-event-legacy.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /resources/views/demand/view-event.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /resources/views/emails/auth-recovery.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | # Password Recovery 3 | 4 | Please use button below to set up your new password 5 | 6 | @component('mail::button', ['url' => config('app.adpanel_url').$uri.$token]) 7 | Set up new password 8 | @endcomponent 9 | 10 | Thanks, 11 | 12 | {{ config('app.adserver_name') }} Team 13 | @endcomponent 14 | -------------------------------------------------------------------------------- /resources/views/emails/banner-classified.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Hello, 3 | 4 | Your advertisement was classified. 5 | 6 | Thanks, 7 | 8 | {{ config('app.adserver_name') }} Team 9 | @endcomponent 10 | -------------------------------------------------------------------------------- /resources/views/emails/campaign-resume.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Hello, 3 | 4 | Funds have been successfully deposited into your account and your campaigns have been automatically resumed. 5 | In order to check your balance, please log in to the platform and select “Billing & Payments” from the dropdown menu in the upper right corner. 6 | 7 | Thanks, 8 | 9 | {{ config('app.adserver_name') }} Team 10 | @endcomponent 11 | -------------------------------------------------------------------------------- /resources/views/emails/crm/campaign-created.blade.php: -------------------------------------------------------------------------------- 1 | userId={{ $userUuid }} 2 | email={{ $email }} 3 | adserverName={{ config('app.adserver_name') }} 4 | adserverId={{ config('app.adserver_id') }} 5 | campaignName={{ $campaign->name }} 6 | targetUrl={{ $campaign->landing_url }} 7 | budget={{ $budget }} 8 | startDate={{ $startDate }} 9 | endDate={{ $endDate }} 10 | advertiser=true 11 | -------------------------------------------------------------------------------- /resources/views/emails/crm/site-added.blade.php: -------------------------------------------------------------------------------- 1 | userId={{ $userUuid }} 2 | email={{ $email }} 3 | adserverName={{ config('app.adserver_name') }} 4 | adserverId={{ config('app.adserver_id') }} 5 | publisher=true 6 | websiteUrl={{ $site->url }} 7 | websiteName={{ $site->name }} 8 | category={{ $categories }} 9 | contentLanguage={{ $site->primary_language }} 10 | -------------------------------------------------------------------------------- /resources/views/emails/crm/user-registered.blade.php: -------------------------------------------------------------------------------- 1 | userId={{ $uuid }} 2 | email={{ $email }} 3 | refToken={{ $refToken }} 4 | registrationDate={{ $registrationDate }} 5 | adserverName={{ config('app.adserver_name') }} 6 | adserverId={{ config('app.adserver_id') }} 7 | -------------------------------------------------------------------------------- /resources/views/emails/deposit-processed.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Hello, 3 | 4 | We would like to inform you that {{ $amount }} {{ $currency }} has been deposited into your account. 5 | In order to check your account, please log in to the platform, select “Billing & payments” from the dropdown menu in the upper right corner. 6 | 7 | 8 | Thanks, 9 | 10 | {{ config('app.adserver_name') }} Team 11 | @endcomponent 12 | -------------------------------------------------------------------------------- /resources/views/emails/invoice-created.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Hello, 3 | 4 | Your invoice has been attached to the message. You can also download it from this link: 5 | {{ $invoice->downloadUrl }} 6 | 7 | Thanks, 8 | 9 | {{ config('app.adserver_name') }} Team 10 | @endcomponent 11 | -------------------------------------------------------------------------------- /resources/views/emails/newsletter.blade.php: -------------------------------------------------------------------------------- 1 | {!! $body !!} 2 | 3 | @isset($unsubscribe_url) 4 |
5 | This is notification from {{ config('app.adserver_name') }} Team. 6 | Unsubscribe 7 |
8 | @endisset 9 | -------------------------------------------------------------------------------- /resources/views/emails/notifications/campaign-accepted.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Dear Advertiser, 3 | 4 | Your campaign, "{{ $campaignName }}", has been verified and accepted. 5 | @if(!$allBannersAccepted) 6 | However, certain banners didn't meet our guidelines due to quality and thematic issues. 7 | @endif 8 | 9 | Log in [here]{{ $campaignUrl }} to view your campaign details, make any final adjustments, or monitor its progress. 10 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }}) 11 | @if($bookingUrl) 12 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }}) 13 | @endif 14 | 15 | Best regards, 16 | {{ config('app.adserver_name') }} Team 17 | @endcomponent 18 | -------------------------------------------------------------------------------- /resources/views/emails/notifications/campaign-draft.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Dear Advertiser, 3 | 4 | We noticed that your campaign, "{{ $campaignName }}" is currently saved as a draft. 5 | 6 | To publish your campaign and start reaching your target audience, click [here]({{ $campaignUrl }}). 7 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }}) 8 | @if($bookingUrl) 9 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }}) 10 | @endif 11 | 12 | Best regards, 13 | {{ config('app.adserver_name') }} Team 14 | @endcomponent 15 | -------------------------------------------------------------------------------- /resources/views/emails/notifications/campaign-ended-extend.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Dear Advertiser, 3 | 4 | We've noticed it's been a few weeks since your last campaign and we haven't seen you around. 5 | 6 | Your audience is waiting, and there are new opportunities to reach them! 7 | Log back in [here]({{ $dashboardUrl }}) to start your next successful campaign. 8 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }}) 9 | @if($bookingUrl) 10 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }}) 11 | @endif 12 | 13 | We look forward to your return! 14 | 15 | Best regards, 16 | {{ config('app.adserver_name') }} Team 17 | @endcomponent 18 | -------------------------------------------------------------------------------- /resources/views/emails/notifications/campaign-ended.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Dear Advertiser, 3 | 4 | Your campaign, "{{ $campaignName }}" has successfully concluded. 5 | 6 | Log in [here]({{ $campaignUrl }}) to review its performance, download your report, or start planning your next campaign. 7 | If you have any questions or need assistance, please don't hesitate to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }}) 8 | @if($bookingUrl) 9 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }}) 10 | @endif 11 | 12 | Thank you for choosing **{{ config('app.adserver_name') }}** for your advertising needs! 13 | 14 | Best regards, 15 | {{ config('app.adserver_name') }} Team 16 | @endcomponent 17 | -------------------------------------------------------------------------------- /resources/views/emails/notifications/campaign-ends.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Dear Advertiser, 3 | 4 | Your campaign, "{{ $campaignName }}" will conclude in three days. 5 | 6 | Review campaign results or download your report [here]({{ $campaignUrl }}). 7 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }}) 8 | @if($bookingUrl) 9 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }}) 10 | @endif 11 | 12 | Best regards, 13 | {{ config('app.adserver_name') }} Team 14 | @endcomponent 15 | -------------------------------------------------------------------------------- /resources/views/emails/notifications/funds-ended.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Dear Advertiser, 3 | 4 | We've noticed your account balance has been depleted. 5 | 6 | To avoid disruption to your campaigns, please top up your account [here]({{ $depositUrl }}). 7 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }}) 8 | @if($bookingUrl) 9 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }}) 10 | @endif 11 | 12 | Best regards, 13 | {{ config('app.adserver_name') }} Team 14 | @endcomponent 15 | -------------------------------------------------------------------------------- /resources/views/emails/notifications/funds-ends.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Dear Advertiser, 3 | 4 | We've noticed your account balance is nearing depletion. 5 | 6 | To avoid interruption to your campaigns, consider adding funds to your account [here]({{ $depositUrl }}). 7 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }}) 8 | @if($bookingUrl) 9 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }}) 10 | @endif 11 | 12 | Best regards, 13 | {{ config('app.adserver_name') }} Team 14 | @endcomponent 15 | -------------------------------------------------------------------------------- /resources/views/emails/notifications/inactive-advertiser.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Dear Advertiser, 3 | 4 | Welcome to {{ config('app.adserver_name') }}! We noticed you haven't created your first campaign yet. 5 | 6 | Click [here]({{ $dashboardUrl }}) to start setting up your campaign. 7 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }}) 8 | @if($bookingUrl) 9 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }}) 10 | @endif 11 | 12 | We're excited to help you reach your advertising goals! 13 | 14 | Best regards, 15 | {{ config('app.adserver_name') }} Team 16 | @endcomponent 17 | -------------------------------------------------------------------------------- /resources/views/emails/notifications/inactive-publisher.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Dear Publisher, 3 | 4 | Welcome to {{ config('app.adserver_name') }}! We noticed that you haven't added your website yet. 5 | 6 | Click [here]({{ $dashboardUrl }}) to add your website and start monetizing your content with our advertising solutions. 7 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }}) 8 | @if($bookingUrl) 9 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }}) 10 | @endif 11 | 12 | We're excited to work with you! 13 | 14 | Best regards, 15 | {{ config('app.adserver_name') }} Team 16 | @endcomponent 17 | -------------------------------------------------------------------------------- /resources/views/emails/notifications/inactive-user-extend.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Dear User, 3 | 4 | It seems like it's been a while since we've seen you. 5 | There's so much waiting for you at {{ config('app.adserver_name') }}. 6 | 7 | Click [here]({{ $panelUrl }}) to access your account. 8 | Remember, if you need any assistance or have questions, feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }}) 9 | @if($bookingUrl) 10 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }}) 11 | @endif 12 | 13 | We look forward to seeing you again! 14 | 15 | Best regards, 16 | {{ config('app.adserver_name') }} Team 17 | @endcomponent 18 | 19 | 20 | -------------------------------------------------------------------------------- /resources/views/emails/notifications/inactive-user-who-deposit.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Dear Advertiser, 3 | 4 | Welcome to {{ config('app.adserver_name') }}! We noticed that you've successfully credited your account but haven't launched your first campaign yet. 5 | 6 | Get started today! Click [here]({{ $dashboardUrl }}) to create and launch your campaign. 7 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }}) 8 | @if($bookingUrl) 9 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }}) 10 | @endif 11 | 12 | Let's make the most of your advertising goals together! 13 | 14 | Best regards, 15 | {{ config('app.adserver_name') }} Team 16 | @endcomponent 17 | -------------------------------------------------------------------------------- /resources/views/emails/notifications/inactive-user.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Dear User, 3 | 4 | Welcome to {{ config('app.adserver_name') }}! We noticed you haven't created your first campaign or added your website yet. 5 | 6 | Click [here]({{ $advertiserDashboardUrl }}) to start setting up your campaign 7 | or [here]({{ $publisherDashboardUrl }}) to add your website and start monetizing your content with our advertising solutions. 8 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }}) 9 | @if($bookingUrl) 10 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }}) 11 | @endif 12 | 13 | We're excited to work with you! 14 | 15 | Best regards, 16 | {{ config('app.adserver_name') }} Team 17 | @endcomponent 18 | -------------------------------------------------------------------------------- /resources/views/emails/notifications/site-accepted.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Dear Publisher, 3 | 4 | Your @switch($mediumName) 5 | @case('web') 6 | website @break 7 | @case('metaverse') 8 | Metaverse site @break 9 | @default 10 | site @endswitch 11 | **{{ $siteName }}** has been verified and accepted. 12 | 13 | You can now start monetizing your @switch($mediumName) 14 | @case('web') 15 | digital content. @break 16 | @case('metaverse') 17 | digital land. @break 18 | @default 19 | site. @endswitch 20 | Log in [here]({{ $siteUrl }}) to manage your account, track your earnings, or get insights to grow your revenue. 21 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }}) 22 | @if($bookingUrl) 23 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }}) 24 | @endif 25 | 26 | Best regards, {{ config('app.adserver_name') }} Team 27 | @endcomponent 28 | -------------------------------------------------------------------------------- /resources/views/emails/notifications/site-draft.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Dear Publisher, 3 | 4 | We noticed that your @switch($mediumName) 5 | @case('web') 6 | website @break 7 | @case('metaverse') 8 | Metaverse site @break 9 | @default 10 | site @endswitch 11 | is currently saved as a draft. 12 | 13 | To start monetizing your @switch($mediumName) 14 | @case('web') 15 | digital content, @break 16 | @case('metaverse') 17 | digital land, @break 18 | @default 19 | site, @endswitch 20 | click [here]({{ $dashboardUrl }}). 21 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }}) 22 | @if($bookingUrl) 23 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }}) 24 | @endif 25 | 26 | Best regards, 27 | {{ config('app.adserver_name') }} Team 28 | @endcomponent 29 | -------------------------------------------------------------------------------- /resources/views/emails/panel-placeholders-change.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Hello, 3 | 4 | The panel placeholders were changed on {{ $date }}. Make sure the changes were yours. 5 | 6 | Thanks, 7 | 8 | {{ config('app.adserver_name') }} Team 9 | @endcomponent 10 | -------------------------------------------------------------------------------- /resources/views/emails/site-ads-txt-invalid.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | # File ads.txt on site "{{ $siteName }}" is invalid 3 | 4 | Please check ads.txt file on site "{{ $siteName }}". It is not accessible on expected url ({{ $adsTxtUrl }}) or does not contain expected entry. 5 | 6 | 7 | {{ $adsTxtEntry }} 8 | 9 | 10 | For more information please visit documentation page https://adshar.es/adstxt. 11 | 12 | Thanks, 13 | 14 | {{ config('app.adserver_name') }} Team 15 | @endcomponent 16 | -------------------------------------------------------------------------------- /resources/views/emails/site-ads-txt-valid.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | # File ads.txt on site "{{ $siteName }}" is correct 3 | 4 | Your ads.txt file is correct. You can now earn using {{ config('app.adserver_name') }}. 5 | 6 | Thanks, 7 | 8 | {{ config('app.adserver_name') }} Team 9 | @endcomponent 10 | -------------------------------------------------------------------------------- /resources/views/emails/site-approval-pending.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | # Site acceptance is pending 3 | 4 | Hello, 5 | 6 | User {{ $user }} added site {{ $url }} which needs approval. 7 | 8 | Thanks, 9 | 10 | {{ config('app.adserver_name') }} Team 11 | @endcomponent 12 | -------------------------------------------------------------------------------- /resources/views/emails/technical-error.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | # Technical Error: {{ $title }} 3 | 4 | {{ $message }} 5 | 6 | Do not ignore this error because it causes a serious problem on your server. 7 | 8 | Thanks, 9 | 10 | {{ config('app.adserver_name') }} Team 11 | @endcomponent 12 | -------------------------------------------------------------------------------- /resources/views/emails/user-banned.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | # Account banned 3 | 4 | Your account has been banned due to: {{ $reason }}. 5 | If you want to explain, contact support {{ config('app.support_email') }} 6 | 7 | Thanks, 8 | 9 | {{ config('app.adserver_name') }} Team 10 | @endcomponent 11 | -------------------------------------------------------------------------------- /resources/views/emails/user-confirmed.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | Hello, 3 | 4 | Your account has been confirmed. 5 | 6 | Thanks, 7 | 8 | {{ config('app.adserver_name') }} Team 9 | @endcomponent 10 | -------------------------------------------------------------------------------- /resources/views/emails/user-email-activate.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | # Account Activation 3 | 4 | Thank you for registering with Adshares. Please click button below to activate your account 5 | 6 | @component('mail::button', ['url' => config('app.adpanel_url').$uri.$token]) 7 | Accept and Activate 8 | @endcomponent 9 | 10 | Thanks, 11 | 12 | {{ config('app.adserver_name') }} Team 13 | @endcomponent 14 | -------------------------------------------------------------------------------- /resources/views/emails/user-email-change-confirm-1-old.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | # Confirm email change request 3 | 4 | Please confirm your email change request, once confirmed you will receive another confirmation email on your new email account 5 | 6 | @component('mail::button', ['url' => config('app.adpanel_url').$uri.$token]) 7 | Confirm email change request 8 | @endcomponent 9 | 10 | Thanks, 11 | 12 | {{ config('app.adserver_name') }} Team 13 | @endcomponent 14 | -------------------------------------------------------------------------------- /resources/views/emails/user-email-change-confirm-2-new.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | # Confirm your new email 3 | 4 | Please confirm this is your new email that you want to link with your Adshares account 5 | 6 | @component('mail::button', ['url' => config('app.adpanel_url').$uri.$token]) 7 | Confirm and save new email 8 | @endcomponent 9 | 10 | Thanks, 11 | 12 | {{ config('app.adserver_name') }} Team 13 | @endcomponent 14 | -------------------------------------------------------------------------------- /resources/views/emails/user-password-change-confirm.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | # Confirm password change request 3 | 4 | Please confirm your password change request 5 | 6 | @component('mail::button', ['url' => config('app.adpanel_url').$uri.$token]) 7 | Confirm password change 8 | @endcomponent 9 | 10 | Thanks, 11 | 12 | {{ config('app.adserver_name') }} Team 13 | @endcomponent 14 | -------------------------------------------------------------------------------- /resources/views/emails/user-password-change.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | # Password change 3 | 4 | The password to your account was changed. 5 | If you are not responsible for this change, contact support immediately {{ config('app.support_email') }} 6 | 7 | Thanks, 8 | 9 | {{ config('app.adserver_name') }} Team 10 | @endcomponent 11 | -------------------------------------------------------------------------------- /resources/views/emails/wallet-connect-confirm.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | # Confirm cryptocurrency wallet connection request 3 | 4 | Please confirm you want to connect your Adshares account to this cryptocurrency wallet: 5 | 6 | - Wallet address: {{ $address }} 7 | - Wallet network: {{ $network }} 8 | 9 | @component('mail::button', ['url' => config('app.adpanel_url').$uri.$token]) 10 | Confirm wallet connection 11 | @endcomponent 12 | 13 | Thanks, 14 | 15 | {{ config('app.adserver_name') }} Team 16 | @endcomponent 17 | -------------------------------------------------------------------------------- /resources/views/emails/wallet-connected.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | # Your cryptocurrency wallet has been successfully connected 3 | 4 | - Wallet address: {{ $address }} 5 | - Wallet network: {{ $network }} 6 | 7 | Thanks, 8 | 9 | {{ config('app.adserver_name') }} Team 10 | @endcomponent 11 | -------------------------------------------------------------------------------- /resources/views/emails/wallet-funds-email.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | ## Not enough funds on your account. 3 | 4 | Please transfer {{ $transferValue }} ADS from Cold Wallet to Hot Wallet - {{ $address }}. 5 | 6 | Thanks, 7 | 8 | {{ config('app.adserver_name') }} Team 9 | @endcomponent 10 | -------------------------------------------------------------------------------- /resources/views/emails/withdrawal-approval.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | # Confirm withdrawal 3 | 4 | Please confirm your withdrawal request. 5 | - Recipient Address: {{ $address }} 6 | - Network: {{ $network }} 7 | - Currency: {{ $currency }} 8 | - Amount: {{ $amount }} ADS 9 | @if ($fee > 0) 10 | - Fee: {{ $fee }} ADS 11 | - **TOTAL**: {{ $total }} ADS 12 | @endif 13 | 14 | @component('mail::button', ['url' => $url]) 15 | Confirm Withdrawal 16 | @endcomponent 17 | 18 | Thanks, 19 | 20 | {{ config('app.adserver_name') }} Team 21 | @endcomponent 22 | -------------------------------------------------------------------------------- /resources/views/emails/withdrawal-success.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | # Withdrawal success 3 | 4 | Withdrawal order has been added. 5 | - Recipient Address: {{ $address }} 6 | - Network: {{ $network }} 7 | - Currency: {{ $currency }} 8 | - Amount: {{ $amount }} ADS 9 | @if ($fee > 0) 10 | - Fee: {{ $fee }} ADS 11 | - **TOTAL**: {{ $total }} ADS 12 | @endif 13 | 14 | Thanks, 15 | 16 | {{ config('app.adserver_name') }} Team 17 | @endcomponent 18 | -------------------------------------------------------------------------------- /resources/views/info/policy.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | @if (isset($content)) 9 | {!! $content !!} 10 | @else 11 | Contact support {{ config('app.support_email') }} 12 | @endif 13 | 14 | 15 | -------------------------------------------------------------------------------- /scripts/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | if [[ -v GIT_CLONE ]] 6 | then 7 | # Checkout repo and change directory 8 | 9 | # Install git 10 | git --version || apt-get install -y git 11 | 12 | git clone \ 13 | --depth=1 \ 14 | https://github.com/adshares/adserver.git \ 15 | --branch ${BUILD_BRANCH:-master} \ 16 | ${BUILD_PATH}/build 17 | 18 | cd ${BUILD_PATH}/build 19 | fi 20 | 21 | composer install 22 | 23 | yarn install 24 | yarn run ${APP_ENV} 25 | 26 | mkdir -p storage/app/public/banners 27 | chmod a+rwX -R storage 28 | 29 | GIT_TAG=$(git tag -l --points-at HEAD | head -n 1) 30 | GIT_HASH="#"$(git rev-parse --short HEAD) 31 | 32 | APP_VERSION=${APP_VERSION:-${GIT_TAG:-${GIT_HASH}}} 33 | 34 | echo "APP_VERSION=$APP_VERSION" | tee .env.from-build 35 | 36 | -------------------------------------------------------------------------------- /scripts/pre-install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | apt-get -qq -y --no-install-recommends install \ 6 | php7.2-fpm php7.2-mysql php7.2-bcmath php7.2-bz2 php7.2-cli php7.2-curl \ 7 | php7.2-gd php7.2-intl php7.2-json php7.2-mbstring php7.2-opcache \ 8 | php7.2-readline php7.2-sqlite3 php7.2-zip 9 | -------------------------------------------------------------------------------- /sonar-project.properties: -------------------------------------------------------------------------------- 1 | sonar.host.url=https://sonarcloud.io 2 | sonar.organization=adshares-github 3 | sonar.projectKey=adshares-adserver 4 | sonar.projectName=Adshares AdServer 5 | sonar.projectVersion=2.8 6 | 7 | # ===================================================== 8 | # Meta-data for the project 9 | # ===================================================== 10 | 11 | sonar.links.homepage=https://adshares.net/ 12 | sonar.links.ci=https://app.travis-ci.com/github/adshares/adserver 13 | sonar.links.scm=https://github.com/adshares/adserver 14 | sonar.links.issue=https://github.com/adshares/adserver/issues 15 | 16 | # ===================================================== 17 | # Properties that will be shared amongst all modules 18 | # ===================================================== 19 | 20 | # SQ standard properties 21 | sonar.sourceEncoding=UTF-8 22 | sonar.sources=app,src 23 | sonar.tests=tests 24 | sonar.php.tests.reportPath=./storage/phpunit/logfile.xml 25 | sonar.php.coverage.reportPaths=./storage/phpunit/coverage.xml 26 | -------------------------------------------------------------------------------- /src/Advertiser/Dto/Input/InvalidInputException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Advertiser\Dto\Input; 25 | 26 | use RuntimeException; 27 | 28 | class InvalidInputException extends RuntimeException 29 | { 30 | } 31 | -------------------------------------------------------------------------------- /src/Classify/Application/Exception/BannerNotVerifiedException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Classify\Application\Exception; 25 | 26 | use RuntimeException; 27 | 28 | class BannerNotVerifiedException extends RuntimeException 29 | { 30 | } 31 | -------------------------------------------------------------------------------- /src/Common/Application/Dto/TaxonomyV2/InputTargetingItem.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common\Application\Dto\TaxonomyV2; 25 | 26 | class InputTargetingItem extends TargetingItem 27 | { 28 | public function __construct(string $key, string $label) 29 | { 30 | parent::__construct('input', $key, $label); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Common/Application/Format/Json/JsonDataRequest.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common\Application\Format\Json; 25 | 26 | interface JsonDataRequest 27 | { 28 | public function __toString(): string; 29 | } 30 | -------------------------------------------------------------------------------- /src/Common/Application/Model/Currency.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common\Application\Model; 25 | 26 | enum Currency: string 27 | { 28 | case ADS = 'ADS'; 29 | case USD = 'USD'; 30 | } 31 | -------------------------------------------------------------------------------- /src/Common/Application/Service/AdClassify.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common\Application\Service; 25 | 26 | use Adshares\Common\Application\Dto\TaxonomyV1; 27 | 28 | interface AdClassify 29 | { 30 | public function fetchFilteringOptions(): TaxonomyV1; 31 | } 32 | -------------------------------------------------------------------------------- /src/Common/Application/Service/Exception/AdsException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common\Application\Service\Exception; 25 | 26 | use Adshares\Ads\Driver\CommandError; 27 | use RuntimeException; 28 | 29 | class AdsException extends RuntimeException 30 | { 31 | public const LOW_LEVEL_BALANCE = CommandError::LOW_BALANCE; 32 | } 33 | -------------------------------------------------------------------------------- /src/Common/Application/Service/Exception/ExchangeRateNotAvailableException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common\Application\Service\Exception; 25 | 26 | use RuntimeException; 27 | 28 | class ExchangeRateNotAvailableException extends RuntimeException 29 | { 30 | } 31 | -------------------------------------------------------------------------------- /src/Common/Application/Service/Exception/SignatureVerifierException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common\Application\Service\Exception; 25 | 26 | use RuntimeException; 27 | 28 | class SignatureVerifierException extends RuntimeException 29 | { 30 | } 31 | -------------------------------------------------------------------------------- /src/Common/Application/Service/LicenseDecoder.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common\Application\Service; 25 | 26 | use Adshares\Common\Domain\ValueObject\License; 27 | 28 | interface LicenseDecoder 29 | { 30 | public function decode(string $encodedLicense): License; 31 | } 32 | -------------------------------------------------------------------------------- /src/Common/Application/Service/LicenseProvider.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common\Application\Service; 25 | 26 | use Adshares\Common\Application\Dto\EncodedLicense; 27 | 28 | interface LicenseProvider 29 | { 30 | public function fetchLicense(): EncodedLicense; 31 | } 32 | -------------------------------------------------------------------------------- /src/Common/Application/Service/LicenseVault.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common\Application\Service; 25 | 26 | use Adshares\Common\Domain\ValueObject\License; 27 | 28 | interface LicenseVault 29 | { 30 | public function read(): License; 31 | 32 | public function store(string $license): void; 33 | } 34 | -------------------------------------------------------------------------------- /src/Common/Application/TransactionManager.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common\Application; 25 | 26 | interface TransactionManager 27 | { 28 | public function begin(): void; 29 | 30 | public function commit(): void; 31 | 32 | public function rollback(): void; 33 | } 34 | -------------------------------------------------------------------------------- /src/Common/Comparable.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common; 25 | 26 | interface Comparable 27 | { 28 | public function equals(object $other): bool; 29 | } 30 | -------------------------------------------------------------------------------- /src/Common/Domain/Adapter/ArrayCollection.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common\Domain\Adapter; 25 | 26 | use Adshares\Common\Domain\Collection; 27 | use Doctrine\Common\Collections\ArrayCollection as DoctrineArrayCollection; 28 | 29 | class ArrayCollection extends DoctrineArrayCollection implements Collection 30 | { 31 | } 32 | -------------------------------------------------------------------------------- /src/Common/Domain/Adapter/ArrayableItemCollection.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common\Domain\Adapter; 25 | 26 | class ArrayableItemCollection extends ArrayCollection 27 | { 28 | public function toArray(): array 29 | { 30 | return array_map(fn($item) => $item->toArray(), $this->getValues()); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Common/Domain/Collection.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common\Domain; 25 | 26 | use Doctrine\Common\Collections\Collection as DoctrineCollection; 27 | 28 | interface Collection extends DoctrineCollection 29 | { 30 | } 31 | -------------------------------------------------------------------------------- /src/Common/Domain/Id.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common\Domain; 25 | 26 | interface Id extends ValueObject 27 | { 28 | public function __construct(string $value); 29 | 30 | public function toString(): string; 31 | } 32 | -------------------------------------------------------------------------------- /src/Common/Domain/ValueObject.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Common\Domain; 23 | 24 | use Adshares\Common\Comparable; 25 | 26 | interface ValueObject extends Comparable 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /src/Common/Domain/ValueObject/ChartResolution.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common\Domain\ValueObject; 25 | 26 | enum ChartResolution: string 27 | { 28 | case HOUR = 'hour'; 29 | case DAY = 'day'; 30 | case WEEK = 'week'; 31 | case MONTH = 'month'; 32 | case QUARTER = 'quarter'; 33 | case YEAR = 'year'; 34 | } 35 | -------------------------------------------------------------------------------- /src/Common/Domain/ValueObject/Exception/InvalidUuidException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Common\Domain\ValueObject\Exception; 23 | 24 | use Adshares\Common\Exception\RuntimeException; 25 | 26 | final class InvalidUuidException extends RuntimeException 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /src/Common/Exception/InvalidArgumentException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common\Exception; 25 | 26 | final class InvalidArgumentException extends \InvalidArgumentException 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /src/Common/Exception/RuntimeException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common\Exception; 25 | 26 | class RuntimeException extends \RuntimeException 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /src/Common/Identifiable.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common; 25 | 26 | use Adshares\Common\Domain; 27 | 28 | interface Identifiable 29 | { 30 | public function id(): Domain\Id; 31 | } 32 | -------------------------------------------------------------------------------- /src/Common/UrlInterface.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Common; 25 | 26 | interface UrlInterface 27 | { 28 | public function __toString(): string; 29 | 30 | public function toString(): string; 31 | } 32 | -------------------------------------------------------------------------------- /src/Demand/Application/Exception/TransferMoneyException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Demand\Application\Exception; 25 | 26 | use RuntimeException; 27 | 28 | class TransferMoneyException extends RuntimeException 29 | { 30 | } 31 | -------------------------------------------------------------------------------- /src/Network/Broadcastable.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Network; 25 | 26 | interface Broadcastable 27 | { 28 | public static function fromHex(string $hex); 29 | 30 | public function toHex(): string; 31 | } 32 | -------------------------------------------------------------------------------- /src/Publisher/Dto/Input/InvalidInputException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Publisher\Dto\Input; 25 | 26 | use RuntimeException; 27 | 28 | class InvalidInputException extends RuntimeException 29 | { 30 | } 31 | -------------------------------------------------------------------------------- /src/Supply/Application/Dto/FoundBanners.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Supply\Application\Dto; 25 | 26 | use Adshares\Common\Domain\Adapter\ArrayCollection; 27 | use Illuminate\Contracts\Support\Arrayable; 28 | 29 | final class FoundBanners extends ArrayCollection implements Arrayable 30 | { 31 | } 32 | -------------------------------------------------------------------------------- /src/Supply/Application/Dto/FoundBanners/Banner.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Supply\Application\Dto\FoundBanners; 25 | 26 | final class Banner 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /src/Supply/Application/Service/BannerClassifier.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Supply\Application\Service; 25 | 26 | use Adshares\Supply\Application\Dto\Classification\Collection; 27 | 28 | interface BannerClassifier 29 | { 30 | public function fetchBannersClassification(array $bannerPublicIds): Collection; 31 | } 32 | -------------------------------------------------------------------------------- /src/Supply/Application/Service/Exception/EmptyInventoryException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Supply\Application\Service\Exception; 23 | 24 | class EmptyInventoryException extends \RuntimeException 25 | { 26 | } 27 | -------------------------------------------------------------------------------- /src/Supply/Application/Service/Exception/NoBannersForGivenCampaign.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Supply\Application\Service\Exception; 23 | 24 | use RuntimeException; 25 | 26 | class NoBannersForGivenCampaign extends RuntimeException 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /src/Supply/Application/Service/Exception/UnexpectedClientResponseException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Supply\Application\Service\Exception; 23 | 24 | use RuntimeException; 25 | 26 | class UnexpectedClientResponseException extends RuntimeException 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /src/Supply/Application/Service/SupplyClient.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Supply\Application\Service; 25 | 26 | interface SupplyClient 27 | { 28 | public function fetchTargetingReach(string $targetingReachUrl): array; 29 | } 30 | -------------------------------------------------------------------------------- /src/Supply/Domain/Factory/Exception/InvalidCampaignArgumentException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Supply\Domain\Factory\Exception; 23 | 24 | use Adshares\Common\Exception\RuntimeException; 25 | 26 | class InvalidCampaignArgumentException extends RuntimeException 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /src/Supply/Domain/Model/Exception/InvalidBudgetValueException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Supply\Domain\Model\Exception; 23 | 24 | use RuntimeException; 25 | 26 | class InvalidBudgetValueException extends RuntimeException 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /src/Supply/Domain/Model/Exception/UnsupportedBannerTypeException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Supply\Domain\Model\Exception; 23 | 24 | use RuntimeException; 25 | 26 | class UnsupportedBannerTypeException extends RuntimeException 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /src/Supply/Domain/Model/Exception/UnsupportedStatusTypeException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Supply\Domain\Model\Exception; 25 | 26 | use RuntimeException; 27 | 28 | class UnsupportedStatusTypeException extends RuntimeException 29 | { 30 | } 31 | -------------------------------------------------------------------------------- /src/Supply/Domain/Repository/Exception/CampaignRepositoryException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Supply\Domain\Repository\Exception; 25 | 26 | class CampaignRepositoryException extends \RuntimeException 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /src/Supply/Domain/ValueObject/Exception/InvalidBudgetValueException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Supply\Domain\ValueObject\Exception; 25 | 26 | use Adshares\Common\Exception\RuntimeException; 27 | 28 | class InvalidBudgetValueException extends RuntimeException 29 | { 30 | } 31 | -------------------------------------------------------------------------------- /src/Supply/Domain/ValueObject/Exception/InvalidCampaignDateException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Supply\Domain\ValueObject\Exception; 25 | 26 | use Adshares\Common\Exception\RuntimeException; 27 | 28 | class InvalidCampaignDateException extends RuntimeException 29 | { 30 | } 31 | -------------------------------------------------------------------------------- /src/Supply/Domain/ValueObject/Exception/InvalidUrlException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Supply\Domain\ValueObject\Exception; 25 | 26 | use RuntimeException; 27 | 28 | class InvalidUrlException extends RuntimeException 29 | { 30 | } 31 | -------------------------------------------------------------------------------- /src/Supply/Domain/ValueObject/Exception/UnsupportedBannerTypeException.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | declare(strict_types=1); 23 | 24 | namespace Adshares\Supply\Domain\ValueObject\Exception; 25 | 26 | use RuntimeException; 27 | 28 | class UnsupportedBannerTypeException extends RuntimeException 29 | { 30 | } 31 | -------------------------------------------------------------------------------- /tests/app/Mail/MailTestCase.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Adserver\Tests\Mail; 23 | 24 | use Adshares\Adserver\Tests\CreatesApplication; 25 | use Adshares\Adserver\Tests\RefreshDatabase; 26 | use Illuminate\Foundation\Testing\TestCase; 27 | 28 | class MailTestCase extends TestCase 29 | { 30 | use CreatesApplication; 31 | use RefreshDatabase; 32 | } 33 | -------------------------------------------------------------------------------- /tests/mock/Files/Banners/2xhtml.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/tests/mock/Files/Banners/2xhtml.zip -------------------------------------------------------------------------------- /tests/mock/Files/Banners/300x250.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/tests/mock/Files/Banners/300x250.png -------------------------------------------------------------------------------- /tests/mock/Files/Banners/300x250.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/tests/mock/Files/Banners/300x250.zip -------------------------------------------------------------------------------- /tests/mock/Files/Banners/980x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/tests/mock/Files/Banners/980x120.png -------------------------------------------------------------------------------- /tests/mock/Files/Banners/adshares.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/tests/mock/Files/Banners/adshares.mp4 -------------------------------------------------------------------------------- /tests/mock/Files/Banners/empty.zip: -------------------------------------------------------------------------------- 1 | PK -------------------------------------------------------------------------------- /tests/mock/Files/Banners/model.vox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/tests/mock/Files/Banners/model.vox -------------------------------------------------------------------------------- /tests/mock/Files/Banners/too_big_unzipped.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/tests/mock/Files/Banners/too_big_unzipped.zip -------------------------------------------------------------------------------- /tests/mock/Files/Banners/too_big_zipped.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/tests/mock/Files/Banners/too_big_zipped.zip -------------------------------------------------------------------------------- /tests/mock/Files/OAuth/oauth-public.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAtJY3WgK4VlQ27N6zdBc3 3 | 1fpQmJjAhG1MW99noF3xEslYhu8m2e9/Sz0fu5tSlYeOC76QvhMarbDBCp/qpbvq 4 | HxwIkYT4SOrRJNMXB1MRy3+ym/5uj4iiVcfUMkQ4L1eOQYunX4rTc8nzohu8MXOp 5 | l2n1b2eZ8PhMNceSKh5+bvQz0b7cwyWBJuRbgilZDV7cGPh2rQmKoqy9roTpbDxb 6 | TT3r/BxZKGVRbONaNFospnEoulxCrynwfBg+FN+T53++Oaq3x9hCMvrKwu9B8fMy 7 | v7WZ9wMefZy0beU7xaJLFL2/vGiXes6RWRpFTomcOKI6NjHO4SIf6SYY8YuQ93wr 8 | gJ2jz7DW043O8z0jGjqYw8fOlKqXndu5dY8Su//VCOPI9A/tvWtZmI6enepkTWn/ 9 | HU/mgDSoFTfwJt5yYRfcque3qtpQFIl3dju2g/4zlFaoafNuQSk2j0sB582Ou37y 10 | s+60g14Bn/NSnAVSIwUHu7HnY3IpNf2rzVO65ROqCZQ/2LPAFogSSqtT3Qx0PFDf 11 | 5Z2r48UozuKewavcbsvbQhyi4/kZ6gwJ3PLm8255Isrfb0AcJfDu4aUVLDdzATwx 12 | V0vtqUwoodz1PIwRCIee2kLIOoFr8BOI8Jk2jBW6Nw3kNap1Of6GqZDwVaPeTkNv 13 | br/jrRotf+EnUDGaPFuydikCAwEAAQ== 14 | -----END PUBLIC KEY----- -------------------------------------------------------------------------------- /tests/mock/ToStringClass.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | 22 | namespace Adshares\Mock; 23 | 24 | class ToStringClass 25 | { 26 | /** @var string */ 27 | private $value; 28 | 29 | public function __construct(string $value) 30 | { 31 | $this->value = $value; 32 | } 33 | 34 | public function __toString() 35 | { 36 | return $this->value; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tests/mock/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "module": "adserver", 3 | "name": "AdServer", 4 | "version": "#", 5 | "capabilities": [ 6 | "ADV", 7 | "PUB" 8 | ], 9 | "serverUrl": "https://example.com", 10 | "panelUrl": "http://adpanel", 11 | "privacyUrl": "https://example.com/policies/privacy.html", 12 | "termsUrl": "https://example.com/policies/terms.html", 13 | "inventoryUrl": "https://example.com/adshares/inventory/list", 14 | "adsAddress": "0001-00000005-CBCA", 15 | "supportEmail": "mail@example.com", 16 | "demandFee": 0.0199, 17 | "supplyFee": 0.0199, 18 | "registrationMode": "public", 19 | "statistics": { 20 | "users": 120, 21 | "campaigns": 87, 22 | "sites": 294 23 | }, 24 | "mode": "operational" 25 | } 26 | -------------------------------------------------------------------------------- /tests/mock/network.json: -------------------------------------------------------------------------------- 1 | { 2 | "community": { 3 | "accountAddress": "0001-00000024-FF89", 4 | "demandFee": 0.01 5 | } 6 | } 7 | --------------------------------------------------------------------------------