Compare commits

...
Sign in to create a new pull request.

175 commits

Author SHA1 Message Date
Ben van Hartingsveldt
d732a51711
Remove download link 2025-07-06 23:16:10 +02:00
Ben van Hartingsveldt
b3cef74e2f
Replace URLs 2025-06-28 21:11:49 +02:00
Ben van Hartingsveldt
d9172b98fd
Remove cursor from screenshot 2025-06-28 20:58:29 +02:00
Ben van Hartingsveldt
a466c52fa3
Update README 2025-06-28 20:57:14 +02:00
Ben van Hartingsveldt
18c0f062f7
Remove useless files 2025-06-28 20:44:16 +02:00
Ben van Hartingsveldt
611cc6a706
Fix queries 2025-06-28 15:32:40 +02:00
Ben van Hartingsveldt
5872a04187
Fix layout bugs 2025-06-28 15:17:05 +02:00
Ben van Hartingsveldt
64435a917e
Improve index 2025-06-28 14:11:42 +02:00
Ben van Hartingsveldt
b25f621ffc
Remove queue 2025-06-27 18:02:19 +02:00
Ben van Hartingsveldt
502d270fd1
Add PHP-FPM 2025-06-27 16:38:06 +02:00
Ben van Hartingsveldt
3ab034154c
Fix Dockerfile 2025-06-27 16:36:20 +02:00
Ben van Hartingsveldt
09800ab844
Switch to chainquery 2025-06-27 16:22:05 +02:00
Ben van Hartingsveldt
aa6f86b014
Fix getting price 2025-05-25 21:03:50 +02:00
Ben van Hartingsveldt
8a43630ba9
Fix auxiliary command 2025-05-25 20:31:30 +02:00
Ben van Hartingsveldt
c4f68fef07
Fix command 2025-05-25 20:27:12 +02:00
Ben van Hartingsveldt
3a6e10b467
Fix Redis instance 2025-05-25 19:51:23 +02:00
Ben van Hartingsveldt
64534e5b99
Add PHP extensions 2025-05-25 19:42:26 +02:00
Ben van Hartingsveldt
10da9c87d7
Dockerize project 2025-05-25 19:36:22 +02:00
Ben van Hartingsveldt
a635331669
Convert full project to Laravel 2025-05-25 18:45:55 +02:00
Ben van Hartingsveldt
a39dacc347
Install Laravel 11 2025-05-01 11:13:30 +02:00
Ben van Hartingsveldt
d22d52ba58
Remove CakePHP implementation 2025-05-01 11:10:36 +02:00
Niko Storni
d10464e0c2 revert cakephp update 2024-12-12 18:44:14 +01:00
Niko Storni
12ba1b1aaa adjust blocking logic
update broken dependencies
2024-12-12 17:52:40 +01:00
Niko Storni
4065389798 retain the same resolution as the frontend 2022-06-21 18:21:12 +02:00
Niko Storni
a252dc05e6 fix typo 2022-06-17 20:00:48 +02:00
Niko Storni
e8c58e8c15 try 3 2022-06-17 18:59:32 +02:00
Niko Storni
e8e9346a70 tmp fix for stupid queries 2022-06-17 18:58:10 +02:00
Niko Storni
fdecf39f93 don't run stupid queries 2022-06-17 18:54:42 +02:00
Niko Storni
d3cd0e13f6 remove missing field 2022-06-17 18:32:31 +02:00
Niko Storni
f769cac5da fix thumbnails 2022-06-17 17:53:50 +02:00
Niko Storni
9b554eec1b fix issues with new chainquery schema
fix bittrex API
2022-06-17 17:15:19 +02:00
Niko Storni
07d9521cfe Merge remote-tracking branch 'origin/dependabot/composer/composer/composer-1.10.26' 2022-06-17 15:39:07 +02:00
dependabot[bot]
820f20a479
Bump composer/composer from 1.10.19 to 1.10.26
Bumps [composer/composer](https://github.com/composer/composer) from 1.10.19 to 1.10.26.
- [Release notes](https://github.com/composer/composer/releases)
- [Changelog](https://github.com/composer/composer/blob/1.10.26/CHANGELOG.md)
- [Commits](https://github.com/composer/composer/compare/1.10.19...1.10.26)

---
updated-dependencies:
- dependency-name: composer/composer
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 20:45:40 +00:00
Thomas Zarebczan
0c84ba3fae
Add new hot wallet 2021-02-03 11:20:40 -05:00
Niko Storni
e74d5b7b2d fix dependencies 2021-01-12 23:03:22 +01:00
Akinwale Ariwodola
fc0abe8d33
More claims fix (#91) 2020-10-28 15:57:26 +01:00
Jeremy Kauffman
7e9851ccfc
Merge pull request #80 from lbryio/dependabot/composer/cakephp/cakephp-3.7.7
Bump cakephp/cakephp from 3.7.1 to 3.7.7
2020-03-16 14:04:26 -04:00
Jeremy Kauffman
d7fb718dd0
Merge pull request #86 from kcseb/master
Change footer to .com
2020-03-16 14:03:03 -04:00
Kenneth C
6f4fa32078
Updated a missed .io 2020-03-09 20:33:19 -04:00
Kenneth C
8873373465
Update URL to .com 2020-03-09 20:32:16 -04:00
Akinwale Ariwodola
a73d65b1c2
Merge pull request #85 from lbryio/fix-utxosupply
fix custom configuration loading and gettxoutsetinfo request
2020-03-04 16:04:37 +01:00
Thomas Zarebczan
bb595d0027
update LBRY addresses 2020-02-27 18:22:34 -05:00
Akinwale Ariwodola
52d13987e5 fix custom configuration loading and gettxoutsetinfo request 2020-01-08 22:02:03 +01:00
Niko
57219734c3
Merge pull request #82 from lbryio/fix-utxosupply
Fix utxosupply
2020-01-08 14:06:36 +01:00
Akinwale Ariwodola
a7c1b9b346 update community, operational and institutional addresses 2020-01-08 08:04:00 +01:00
Akinwale Ariwodola
77ca91757b fix _gettxoutsetinfo return type 2020-01-07 23:37:50 +01:00
Akinwale Ariwodola
a147665e96 fix utxo supply 2020-01-07 23:34:50 +01:00
dependabot[bot]
0f197fc571
Bump cakephp/cakephp from 3.7.1 to 3.7.7
Bumps [cakephp/cakephp](https://github.com/cakephp/cakephp) from 3.7.1 to 3.7.7.
- [Release notes](https://github.com/cakephp/cakephp/releases)
- [Commits](https://github.com/cakephp/cakephp/compare/3.7.1...3.7.7)

Signed-off-by: dependabot[bot] <support@github.com>
2020-01-07 22:14:57 +00:00
Akinwale Ariwodola
31d515e992
Blocked claims (#81)
* handle blocked claims
* fix chainquery endpoint
* channel-level blocking
* don't show blocked claims in the result grid
* optimisation: break out of foreach loop if match found
* add caching for api request
* rename cache key
2020-01-07 23:13:38 +01:00
Niko
02551e98d7
Merge pull request #70 from lbryio/crash-fix
Crash fix
2019-10-21 11:41:58 -04:00
Akinwale Ariwodola
007cf0d34c add missing operator 2019-10-15 22:39:27 +01:00
Akinwale Ariwodola
c18431394c fix crash on large page numbers? 2019-10-15 22:28:45 +01:00
Niko
04cbdbcaee
Merge pull request #65 from lbryio/fix-dupes
fix dupes
2019-08-02 21:40:44 +02:00
Thomas Zarebczan
9b3a1f4097
remove decoder 2019-07-30 12:11:49 -04:00
Thomas Zarebczan
9582342a3a
fix dupes
fixed dupes on bMvUBo1h5WS46ThHtmfmXftz3z33VHL7wc
2019-07-17 09:41:25 -04:00
Thomas Zarebczan
bbc07e8238
Merge pull request #61 from ykris45/patch-1
Update README.md
2019-04-01 13:19:12 -04:00
YULIUS KURNIAWAN KRISTIANTO
4a7be9d61d
Update README.md 2019-04-02 00:16:30 +07:00
Thomas Zarebczan
6054ddc6c0
Merge pull request #59 from marcdeb1/confirmations_fix
Confirmations fix
2019-03-26 17:32:10 -04:00
marcdeb1
a0dac9c35b Mempool transactions confirmation 2019-03-26 11:04:22 +01:00
marcdeb1
5c5c7924af Confirmations number fix 2019-03-25 23:23:08 +01:00
marcdeb1
b8a685a8dc Home page lbry link fix 2019-03-25 23:03:03 +01:00
marcdeb1
9f98c64d18 Merging 2019-03-23 15:25:37 +01:00
Niko
1b13f2711b
Merge pull request #49 from marcdeb1/chainquery
Chainquery integration
2019-02-13 13:01:12 -05:00
marcdeb1
55a3736233 Deprecation warnings 2019-01-26 22:57:30 +01:00
marcdeb1
fd8a6953f3 Deprecation warnings 2019-01-26 22:21:50 +01:00
marcdeb1
70069a29ec Test Travis 2019-01-26 21:56:01 +01:00
marcdeb1
b96d40241d Name Transaction Address table file 2019-01-26 21:04:46 +01:00
marcdeb1
f3564d7809 TransactionAddress loading fix 2019-01-26 20:54:30 +01:00
marcdeb1
2941698c2b Updated CakePHP 2019-01-26 20:37:30 +01:00
Akinwale Ariwodola
0ca160336f
Merge pull request #51 from lbryio/claim-id-null-fix
fix issue with claim names being returned with a hash
2019-01-26 13:43:51 +01:00
Akinwale Ariwodola
e8eaf19490 fix issue with claim names being returned with a hash 2019-01-26 13:41:10 +01:00
marcdeb1
9e984c94c1
Merge branch 'master' into chainquery 2019-01-05 22:51:30 +01:00
marcdeb1
19b35b0685 Controlling tag and sorting by bid state in claim search 2019-01-05 22:34:08 +01:00
marcdeb1
1ba751acb3 Thumbnail text and content tag fix 2019-01-05 21:44:37 +01:00
Niko
fae8b3e98a
Merge pull request #47 from lbryio/cache2
Adds caching to vulnerable API call
2019-01-04 13:57:14 +01:00
Niko
07d937d0ef
Merge pull request #48 from marcdeb1/fix_mining_chart
Fix mining chart
2019-01-03 00:37:29 +01:00
marcdeb1
a428ebdd73 Chainquery update, transaction value and address balance 2019-01-01 15:40:45 +01:00
Mark Beamer Jr
262e90a2e1
Fixed some deprecation warnings.
Fixed a few claim queries that were using a distinct causing a group by to be performed with full table scan.
Added `dev.sh` file to quickly startup the explorer.
2018-12-21 23:41:30 -05:00
marcdeb1
17b0ef58a9 Find page bug 2018-12-21 17:19:55 +01:00
marcdeb1
5064b86fc6 Transaction address table 2018-12-21 17:15:36 +01:00
marcdeb1
b99285cfa5 Minor bugs 2018-12-21 17:15:02 +01:00
marcdeb1
d61d9ff015 DB comments 2018-12-21 17:12:00 +01:00
marcdeb1
0d49e4d0c8 Claim address in tx page 2018-12-21 16:53:55 +01:00
marcdeb1
80e55f53e2 Circulating supply API 2018-12-21 16:21:28 +01:00
marcdeb1
1edc128b61 Address balance API 2018-12-21 15:51:36 +01:00
marcdeb1
8bef4e5cec Address page 2018-12-21 15:48:33 +01:00
marcdeb1
9d88e2eaec Queries and bugs 2018-12-21 14:18:39 +01:00
marcdeb1
3569fdb4ff Improved index query 2018-12-21 13:55:59 +01:00
marcdeb1
4e0eeab3d1 Improved queries 2018-12-21 13:50:17 +01:00
marcdeb1
f7318d64fc Improved block page queries 2018-12-21 13:42:57 +01:00
marcdeb1
90eee866fc Block list page 2018-12-19 00:57:43 +01:00
marcdeb1
dfd7af81f9 Realtme action improvements 2018-12-19 00:53:39 +01:00
marcdeb1
cbee21c07c Other claim page bugs 2018-12-19 00:37:01 +01:00
marcdeb1
a09a0148c2 Fix claim page bugs 2018-12-19 00:12:14 +01:00
marcdeb1
6c45f432de Clam and publisher in one query 2018-12-18 23:02:09 +01:00
marcdeb1
830df53d74 Address balance API 2018-12-18 22:11:00 +01:00
marcdeb1
af39804ce7 Address action 2018-12-18 21:56:41 +01:00
marcdeb1
fbfd5b8f39 Price history db name 2018-12-18 20:17:34 +01:00
marcdeb1
edbc11db7f API tests 2018-12-18 19:21:12 +01:00
marcdeb1
0bd3836b31 Claim box 2018-12-18 18:14:42 +01:00
marcdeb1
e5d16d0100 Find action 2018-12-18 17:58:49 +01:00
marcdeb1
3cddd6ece1 Tx spend input 2018-12-18 17:47:49 +01:00
marcdeb1
e7a030ddf9 Rename API fields 2018-12-18 16:20:19 +01:00
marcdeb1
9a32c9a930 Transaction page improvement 2018-12-18 16:09:37 +01:00
marcdeb1
695f85262b DB in app.default 2018-12-18 13:53:03 +01:00
marcdeb1
5c681657cb Added old database for PriceHistory 2018-12-18 13:51:19 +01:00
marcdeb1
25a50ca2aa API realtime actions 2018-12-18 13:42:45 +01:00
marcdeb1
b61a1545a7 Realtime action 2018-12-18 01:20:54 +01:00
marcdeb1
86a1631144 Fix index transaction hash bug 2018-12-17 22:36:13 +01:00
marcdeb1
94682cc4d4 Fixed transaction value issue 2018-12-17 12:35:54 +01:00
marcdeb1
6e8a651980 Tx and index page 2018-12-17 00:49:26 +01:00
marcdeb1
0df9658b87 composer 2018-12-12 00:40:49 +01:00
marcdeb1
5b7c9f7e72 Fixing mining inflation chart bug 2018-12-12 00:22:39 +01:00
Niko Storni
aeceeec732 fix QR code
fix table declaration
2018-12-04 20:55:41 -05:00
Niko Storni
3884c74e7d add cache only 2018-12-03 20:17:19 -05:00
Akinwale Ariwodola
3eab838967 composer package updates 2018-12-03 17:26:01 +00:00
Akinwale Ariwodola
e8d3ead2c7 update home page style to accommodate new difficulty values 2018-12-03 18:23:59 +01:00
Akinwale Ariwodola
5983c61820
Merge pull request #46 from lbryio/hot-wallet
add additional hot wallet
2018-11-28 16:04:09 +01:00
marcdeb1
d98e9a3fb2 Improve search (#40)
* Added search page results
* Added getContentTag and getAutoThumbText to Claims model
* Order in search results
2018-11-28 16:03:41 +01:00
Thomas Zarebczan
c7c1e7299f
add additional hot wallet 2018-11-26 17:27:36 -05:00
Thomas Zarebczan
9246952c08
Merge pull request #38 from preserveddarnell/newcopyedits
Update various typos, punctuations & errors.
2018-11-12 11:42:46 -05:00
Thomas Zarebczan
59d23dc2a7
Update LICENSE 2018-11-12 11:42:30 -05:00
Akinwale Ariwodola
c58676cd69 only get the claim link if the claim object is not null 2018-11-01 07:08:27 +01:00
preserveddarnell
b9917c89da Update various typos, punctuations & errors. 2018-10-22 17:49:46 -04:00
marcdeb1
26a79d8340 Lbry addresses (#35)
* Added logo to indicate addresses owned by LBRY
2018-10-19 16:00:50 +01:00
marcdeb1
f903235c24 Added mining inflation chart to stats page (#34) 2018-10-19 13:22:50 +01:00
Akinwale Ariwodola
d8734c1b8e
Merge fix for PR 33 (#37)
* Added claim link to transaction
* Added 'View' link next to Claim label
2018-10-19 12:54:54 +01:00
marcdeb1
c13c06f74f Claim LBRY link and Thumbnail (#32)
* Claim LBRY link and Thumbnail
* Added getLink function to Model
* Changed getLink function name
2018-10-19 12:49:22 +01:00
Akinwale Ariwodola
ad82fc3975
Merge pull request #36 from marcdeb1/db_column_name
Changed LatestTransactionTime column name
2018-10-18 12:20:46 +01:00
marcdeb1
4d0efbaff8 Changed LatestTransactionTime column name 2018-10-11 07:42:46 +02:00
Akinwale Ariwodola
c8462afdee
Update README.md with installation instructions (#30) 2018-08-09 21:30:21 +01:00
Akinwale Ariwodola
a8a956f2bc update confirmations calculation on block list page 2018-07-26 12:22:51 +01:00
Akinwale Ariwodola
b91b3681d3 tweak confirmation calculation 2018-07-26 12:14:48 +01:00
Akinwale Ariwodola
190d998e4c Merge branch 'master' of https://github.com/lbryio/block-explorer 2018-07-26 12:08:56 +01:00
Akinwale Ariwodola
667097f35d better confirmations calculation 2018-07-26 12:08:15 +01:00
Akinwale Ariwodola
8d552afe8f removed unused cron file 2018-07-26 10:30:13 +00:00
Akinwale Ariwodola
ad4615cc5a forevermempool reset cron 2018-07-26 07:59:20 +01:00
Akinwale Ariwodola
3ad5db032b fix p2pk hash index 2018-07-26 07:27:12 +01:00
Akinwale Ariwodola
e25cd7807e
Merge pull request #26 from lbryio/diff
show diff on address page when tx spends back into the same wallet
2018-07-21 01:26:13 +01:00
Akinwale Ariwodola
71c7834521 move RPC URL value to configuration file 2018-07-21 00:18:24 +00:00
Akinwale Ariwodola
27ff22ff5a Updated mdanter/ecc version. Some cron file updates based on new environment. 2018-07-19 19:19:59 +00:00
Alex Grintsvayg
70032020f5 show diff on address page when tx spends back into the same wallet 2018-06-08 13:44:40 -04:00
Akinwale Ariwodola
c8ca48220f display verified tags 2018-05-28 21:09:16 +01:00
Akinwale Ariwodola
c2a19d91c1 remove address tagging 2018-05-23 00:46:55 +01:00
akinwale
d3e542dd91
Merge pull request #22 from lbryio/imgsrc-fix
strip tags from claim thumbnail url
2018-04-09 16:49:50 +01:00
Akinwale Ariwodola
5d23294dba strip tags from claim thumbnail url 2018-04-09 11:48:55 -04:00
akinwale
a0cbc324b7
Merge pull request #16 from Smurphonomics/master
Cleaner Easier to Read Block Explorer
2018-04-09 16:38:27 +01:00
Akinwale Ariwodola
f66101a9de small reconnect fix for forevermempool 2018-03-14 22:51:55 +01:00
Alex Grin
537dd85473
Merge pull request #14 from lbrydocs/patch-1
create LICENSE file
2018-02-28 09:39:41 -05:00
Smurphonomics
0adcf92cbb
Simple Grammar Corrections
Simple grammar corrections - Every little help :p
2018-02-22 16:45:19 +10:00
Smurphonomics
ade487848d
Cleaner Easier to Read Block Explorer
Made a few changes to separate links from titles, reduced some text sizes to be a more uniform, readable size and allow for more content within the page view. Fixed the button `border-radius` error.

This style (not present on the style-sheet) needs to be as changed...

From

`.claims-body .claim-metadata {padding: 24px 36px 88px 36px;}`

To

`.claims-body .claim-metadata {padding: 24px}`
2018-02-22 16:08:17 +10:00
LBRY Docs
7706338460
create LICENSE file 2018-02-05 12:58:49 -08:00
akinwale
c60b3946ce
Merge pull request #13 from lbryio/add-addresses
add aux addresses
2018-01-16 15:50:22 +01:00
Thomas Zarebczan
6bf194c448
Update MainController.php
bMvUBo1h5WS46ThHtmfmXftz3z33VHL7wc - holding 6M comm coins
bMgqQqYfwzWWYBk5o5dBMXtCndVAoeqy6h - holding 4M dev fund coins
2018-01-14 12:11:29 -05:00
akinwale
7cd3e5322c
Merge pull request #12 from lbryio/add-address
add additional cold storage address
2017-12-28 08:07:32 +01:00
Thomas Zarebczan
c82fd1a982
add additional cold storage address 2017-12-20 22:26:10 -05:00
Akinwale Ariwodola
efcce65004 changed Google Analytics tracker ID 2017-12-01 10:20:15 +01:00
Akinwale Ariwodola
df6264f388 fixed closing div tag in header 2017-11-28 22:29:48 +01:00
Akinwale Ariwodola
a99606ecbf Added Google Analytics code 2017-11-28 21:27:37 +01:00
Akinwale Ariwodola
f2bf172997 Merge branch 'master' of https://github.com/lbryio/block-explorer into explorer.lbry.io 2017-11-26 13:07:19 +01:00
Akinwale Ariwodola
5db80ac0d4 fixed position of download app link 2017-11-26 13:03:07 +01:00
Josh Finer
fe14cd88f0
Update index.ctp 2017-11-25 17:03:01 -05:00
Thomas Zarebczan
a855ee3d94 Add more addresses (#7)
* Add more addresses
2017-11-10 09:02:37 -06:00
Akinwale Ariwodola
58620a6298 updated transaction time css 2017-10-09 13:35:18 +01:00
Akinwale Ariwodola
409a0a7da7 fixed getTimestamp error 2017-10-09 13:35:09 +01:00
Akinwale Ariwodola
6e6dcd0613 added created time and block time to transction details page 2017-10-09 13:35:01 +01:00
Akinwale Ariwodola
ba995ed51f fix code merge issues 2017-10-09 13:33:39 +01:00
Akinwale Ariwodola
e7e444f84a some updates from the explorer.lbry.io branch 2017-10-09 13:30:57 +01:00
Akinwale Ariwodola
1d9dbb802b fix zero price on homepage 2017-10-09 13:29:55 +01:00
Akinwale Ariwodola
85926e316f price changed to display N/A when the value is $0.00 2017-10-09 13:29:43 +01:00
Akinwale Ariwodola
7f701f87d5 removed some unused code 2017-10-09 09:07:38 +01:00
Akinwale Ariwodola
06a495d396 Merge branch 'master' of https://gitlab.com/aureolin/lbryexplorer 2017-09-05 09:46:49 +01:00
Akinwale Ariwodola
a19e3abd07 forevermempool fix 2017-09-05 09:46:31 +01:00
Akinwale Ariwodola
66940ac02a cron script modification for lbrycrd blocknotify 2017-08-27 13:50:03 +00:00
Akinwale Ariwodola
5acd8f6039 reduced number of blocksync threads to 2 2017-08-25 16:16:39 +01:00
467 changed files with 12968 additions and 10755 deletions

View file

@ -1,18 +1,18 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 4
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.bat]
end_of_line = crlf
[*.md]
trim_trailing_whitespace = false
[*.yml]
indent_style = space
[*.{yml,yaml}]
indent_size = 2
[docker-compose.yml]
indent_size = 4

65
.env.example Normal file
View file

@ -0,0 +1,65 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
APP_MAINTENANCE_DRIVER=file
# APP_MAINTENANCE_STORE=database
PHP_CLI_SERVER_WORKERS=4
BCRYPT_ROUNDS=12
LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug
DB_CONNECTION=sqlite
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=laravel
# DB_USERNAME=root
# DB_PASSWORD=
SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null
BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database
CACHE_STORE=database
# CACHE_PREFIX=
MEMCACHED_HOST=127.0.0.1
REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=log
MAIL_SCHEME=null
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false
VITE_APP_NAME="${APP_NAME}"

49
.gitattributes vendored
View file

@ -1,42 +1,11 @@
# Define the line ending behavior of the different file extensions
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto
* text eol=lf
* text=auto eol=lf
# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.php text
*.default text
*.ctp text
*.sql text
*.md text
*.po text
*.js text
*.css text
*.ini text
*.properties text
*.txt text
*.xml text
*.svg text
*.yml text
.htaccess text
*.blade.php diff=html
*.css diff=css
*.html diff=html
*.md diff=markdown
*.php diff=php
# Declare files that will always have CRLF line endings on checkout.
*.bat eol=crlf
# Declare files that will always have LF line endings on checkout.
*.pem eol=lf
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.gif binary
*.ico binary
*.mo binary
*.pdf binary
*.phar binary
*.woff binary
*.woff2 binary
*.ttf binary
*.otf binary
*.eot binary
/.github export-ignore
CHANGELOG.md export-ignore
.styleci.yml export-ignore

16
.github/workflows/docker-image.yml vendored Normal file
View file

@ -0,0 +1,16 @@
name: Docker Image CI
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)

30
.gitignore vendored
View file

@ -1,7 +1,23 @@
/vendor/*
/config/app.php
/tmp/*
/logs/*
lbryexplorer.zip
lbryexplorer.komodoproject
.komodotools
/.phpunit.cache
/node_modules
/public/build
/public/hot
/public/storage
/storage/*.key
/storage/pail
/vendor
.env
.env.backup
.env.production
.phpactor.json
.phpunit.result.cache
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
/auth.json
/.fleet
/.idea
/.nova
/.vscode
/.zed

View file

@ -1,11 +0,0 @@
# Uncomment the following to prevent the httpoxy vulnerability
# See: https://httpoxy.org/
#<IfModule mod_headers.c>
# RequestHeader unset Proxy
#</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>

View file

@ -1,30 +0,0 @@
language: php
dist: trusty
sudo: false
php:
- 5.6
- 7.0
- 7.1
matrix:
fast_finish: true
include:
- php: 7.0
env: PHPCS=1
before_script:
- if [[ $PHPCS = 1 ]]; then composer require cakephp/cakephp-codesniffer:~2.1; fi
- if [[ $PHPCS != 1 ]]; then composer install; fi
- if [[ $PHPCS != 1 ]]; then composer require phpunit/phpunit:"^5.7|^6.0"; fi
- if [[ $PHPCS != 1 ]]; then composer run-script post-install-cmd --no-interaction; fi
script:
- if [[ $PHPCS != 1 ]]; then vendor/bin/phpunit; fi
- if [[ $PHPCS = 1 ]]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests ./config ./webroot; fi
notifications:
email: false

64
Dockerfile Normal file
View file

@ -0,0 +1,64 @@
FROM php:8.4.7-fpm-alpine
# Install PHPize packages
RUN apk add --no-cache --virtual .phpize $PHPIZE_DEPS
# Install Source Packages
ENV SRC_DEPS="gmp-dev icu-dev"
RUN apk add --no-cache --virtual .source $SRC_DEPS
# Install Binary Packages
ENV BIN_DEPS="gmp git icu nginx"
RUN apk add --no-cache --virtual .binary $BIN_DEPS
# Install PHP Extensions
RUN pecl install redis
RUN docker-php-ext-enable redis
RUN docker-php-ext-install bcmath
RUN docker-php-ext-install gmp
RUN docker-php-ext-install mysqli
RUN docker-php-ext-install opcache
RUN docker-php-ext-install pdo
RUN docker-php-ext-install pdo_mysql
# Delete PHPize packages
RUN apk del --no-network --no-cache --purge .phpize
# Delete Source packages
RUN apk del --no-network --no-cache --purge .source
# Remove files
RUN rm -rf /tmp/pear
RUN rm -rf ~/.pearrc
RUN rm -rf /var/cache/apk/*
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Copy files
WORKDIR /var/www/html
COPY . .
RUN mv nginx.conf /etc/nginx/http.d/default.conf
# Install project using Composer
RUN --mount=type=cache,target=/root/.composer composer install --no-interaction --optimize-autoloader --no-dev
# Change permissions
RUN chown -R www-data:www-data storage/
# Setup Process Manager
RUN echo "pm = ondemand" >> /usr/local/etc/php-fpm.d/zz-docker.conf
RUN echo "pm.process_idle_timeout = 10s" >> /usr/local/etc/php-fpm.d/zz-docker.conf
# Setup PHP
RUN mv php.ini /usr/local/etc/php/conf.d/
# Setup Opcache
RUN mv opcache.ini /usr/local/etc/php/conf.d/
VOLUME /var/www/html/storage/framework/cache/data
# Cache project and Start PHP-FPM and NGINX
CMD php artisan optimize; php artisan event:cache; php artisan view:cache; php-fpm -D; nginx -g "daemon off;"

25
LICENSE.md Normal file
View file

@ -0,0 +1,25 @@
The MIT License (MIT)
=====================
Copyright © 2024 The LBRY Foundation
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the “Software”), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

View file

@ -0,0 +1,11 @@
# LBRY Block Explorer
[![Codecov](https://codecov.io/gh/LBRYFoundation/block-explorer/graph/badge.svg)](https://codecov.io/gh/LBRYFoundation/block-explorer)
[![Docker Image CI](https://github.com/LBRYFoundation/block-explorer/actions/workflows/docker-image.yml/badge.svg)](https://github.com/LBRYFoundation/block-explorer/actions/workflows/docker-image.yml)
Explore blocks, transactions, addresses and claims on the blockchain of the LBRY network.
![Screenshot](/images/screenshot.png?raw=true)
## License
This project is MIT licensed. For the full license, see [LICENSE](LICENSE.md).

View file

@ -1,11 +1,9 @@
<?php
namespace App\Helpers;
namespace App\View\Helper;
class AmountHelper{
use Cake\View\Helper;
class AmountHelper extends Helper {
public function format($value, $thousandsSeparator = ',') {
public static function format(mixed $value,string $thousandsSeparator = ','): string{
$value = number_format($value, 8, '.', $thousandsSeparator);
$dotIdx = strpos($value, '.');
if ($dotIdx !== false) {
@ -17,11 +15,10 @@ class AmountHelper extends Helper {
$value .= '.' . rtrim($right, '0');
}
}
return $value;
}
public function formatCurrency($value, $thousandsSeparator = ',') {
public static function formatCurrency(mixed $value,string $thousandsSeparator = ','): string{
$dotIdx = strpos($value, '.');
if ($dotIdx !== false) {
$left = substr($value, 0, $dotIdx);
@ -38,9 +35,7 @@ class AmountHelper extends Helper {
} else {
$value = number_format($value, 2, '.', $thousandsSeparator);
}
return $value;
}
}
?>
}

View file

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers;
use App\Models\Claim;
use Illuminate\Routing\Controller;
class ClaimsController extends Controller{
public function apibrowse(): array{
$pageLimit = 48;
$beforeId = intval(request()->query('before'));
$afterId = intval(request()->query('after'));
$sort = trim(request()->query('sort'));
$nsfw = trim(request()->query('nsfw'));
switch ($sort) {
case 'popular':
// TODO: sort by upvote/downvote score
break;
case 'random':
$order = 'RAND() ASC';
break;
case 'oldest':
$order = 'created_at ASC';
break;
case 'newest':
default:
$order = 'created_at DESC';
break;
}
//$stmt = $conn->execute('SELECT COUNT(Id) AS Total FROM Claims WHERE ThumbnailUrl IS NOT NULL AND LENGTH(TRIM(ThumbnailUrl)) > 0');
//$count = $stmt->fetch(\PDO::FETCH_OBJ);
$numClaims = 23000000;
if ($beforeId < 0) {
$beforeId = 0;
}
$conditions = [
['thumbnail_url','IS','NOT NULL'],
['LENGTH(TRIM(thumbnail_url))','>',0],
['is_filtered','<>',1],
];
if ($afterId > 0) {
$conditions[] = ['id','>',$afterId];
} else if ($beforeId) {
$conditions[] = ['id','<',$beforeId];
}
if ($nsfw !== 'true') {
$conditions[] = ['is_nsfw','<>',1];
}
//->contain(['Stream', 'Publisher' => ['fields' => ['Name']]])
$claims = Claim::query()->distinct(['claim_id'])->where($conditions)->limit($pageLimit)->orderByRaw($order)->get();
return [
'success' => true,
'claims' => $claims,
'total' => (int) $numClaims,
];
}
}

File diff suppressed because it is too large Load diff

24
app/Models/Address.php Normal file
View file

@ -0,0 +1,24 @@
<?php
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* @mixin Model
* @property mixed id
* @property mixed address
* @property mixed first_seen
* @property mixed created_at
* @property mixed modified_at
* @property mixed balance
*/
class Address extends Model{
protected $casts = [
'first_seen' => 'datetime',
];
protected $table = 'address';
public $timestamps = false;
}

41
app/Models/Block.php Normal file
View file

@ -0,0 +1,41 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* @mixin Model
* @property mixed id
* @property mixed bits
* @property mixed chainwork
* @property mixed confirmations
* @property mixed difficulty
* @property mixed hash
* @property mixed height
* @property mixed merkle_root
* @property mixed name_claim_root
* @property mixed nonce
* @property mixed previous_block_hash
* @property mixed next_block_hash
* @property mixed block_size
* @property mixed block_time
* @property mixed version
* @property mixed version_hex
* @property mixed tx_count
* @property mixed created_at
* @property mixed modified_at
*/
class Block extends Model{
protected $table = 'block';
public $timestamps = false;
public function jsonSerialize(): array{
return [
'height' => $this->height,
'block_time' => $this->block_time,
'tx_count' => $this->tx_count,
];
}
}

117
app/Models/Claim.php Normal file
View file

@ -0,0 +1,117 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* @mixin Model
* @property mixed id
* @property mixed transaction_hash_id
* @property mixed vout
* @property mixed name
* @property mixed claim_id
* @property mixed claim_type
* @property mixed publisher_id
* @property mixed publisher_sig
* @property mixed certificate
* @property mixed sd_hash
* @property mixed transaction_time
* @property mixed version
* @property mixed value_as_hex
* @property mixed value_as_json
* @property mixed valid_at_height
* @property mixed height
* @property mixed effective_amount
* @property mixed author
* @property mixed description
* @property mixed content_type
* @property mixed is_nsfw
* @property mixed language
* @property mixed thumbnail_url
* @property mixed title
* @property mixed fee
* @property mixed fee_currency
* @property mixed fee_address
* @property mixed is_filtered
* @property mixed bid_state
* @property mixed created_at
* @property mixed modified_at
* @property mixed claim_address
* @property mixed is_cert_valid
* @property mixed is_cert_processed
* @property mixed license
* @property mixed type
* @property mixed release_time
* @property mixed source_hash
* @property mixed source_name
* @property mixed source_size
* @property mixed source_media_type
* @property mixed source_url
* @property mixed frame_width
* @property mixed frame_height
* @property mixed duration
* @property mixed audio_duration
* @property mixed email
* @property mixed has_claim_list
* @property mixed claim_reference
* @property mixed list_type
* @property mixed claim_id_list
* @property mixed transaction_hash_update
* @property mixed vout_update
* @property mixed claim_count
*/
class Claim extends Model{
protected $casts = [
'created_at' => 'datetime',
];
protected $table = 'claim';
public $timestamps = false;
// public function publisher(): BelongsTo{
// return $this->belongsTo(Claim::class, 'publisher_id','claim_id');
// }
public function getLbryLink(): string{
$link = $this->name;
if (isset($this->publisher)) {
$link = $this->publisher . '/' . $link;
}
$link = 'lbry://' . $link;
return $link;
}
public function getExplorerLink(): string{
$link = '/claims/' . $this->claim_id;
return $link;
}
public function getContentTag(): ?string{
$ctTag = null;
if (substr($this->content_type, 0, 5) === 'audio') {
$ctTag = 'audio';
} else if (substr($this->content_type, 0, 5) === 'video') {
$ctTag = 'video';
} else if (substr($this->content_type, 0, 5) === 'image') {
$ctTag = 'image';
}
if (!$ctTag && $this->claim_type == 2) {
$ctTag = 'identity';
}
return $ctTag;
}
public function getAutoThumbText(): string{
$autoThumbText = '';
if ($this->claim_type == 2) {
$autoThumbText = strtoupper(substr($this->name, 1, min(strlen($this->name), 10)));
} else {
$str = (strlen(trim($this->title)) > 0) ? $this->title : $this->name;
$autoThumbText = strtoupper(substr($str, 0, min(strlen($str), 5)));
}
return $autoThumbText;
}
}

35
app/Models/Input.php Normal file
View file

@ -0,0 +1,35 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
/**
* @mixin Model
* @property mixed id
* @property mixed transaction_id
* @property mixed transaction_hash
* @property mixed input_address_id
* @property mixed is_coinbase
* @property mixed coinbase
* @property mixed prevout_hash
* @property mixed prevout_n
* @property mixed sequence
* @property mixed value
* @property mixed script_sig_asm
* @property mixed script_sig_hex
* @property mixed created
* @property mixed modified
* @property mixed vin
* @property mixed witness
*/
class Input extends Model{
protected $table = 'input';
public $timestamps = false;
public function input_addresses(): BelongsToMany{
return $this->belongsToMany(Address::class,'InputsAddresses','InputId','AddressId');
}
}

39
app/Models/Output.php Normal file
View file

@ -0,0 +1,39 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
/**
* @mixin Model
* @property mixed id
* @property mixed transaction_id
* @property mixed transaction_hash
* @property mixed value
* @property mixed vout
* @property mixed type
* @property mixed script_pub_key_asm
* @property mixed script_pub_key_hex
* @property mixed required_signatures
* @property mixed address_list
* @property mixed is_spent
* @property mixed spent_by_input_id
* @property mixed created_at
* @property mixed modified_at
* @property mixed claim_id
*/
class Output extends Model{
protected $table = 'output';
public $timestamps = false;
public function output_addresses(): BelongsToMany{
return $this->belongsToMany(Address::class,'OutputsAddresses','OutputId','AddressId');
}
public function spend_input(): BelongsTo{
return $this->belongsTo(Input::class,'SpentByInputId','Id');
}
}

View file

@ -0,0 +1,15 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* @mixin Model
* @deprecated
*/
class TagAddressRequest extends Model{
protected $fillable = [];
public $timestamps = false;
}

View file

@ -0,0 +1,30 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* @mixin Model
* @property mixed id
* @property mixed block_hash_id
* @property mixed input_count
* @property mixed output_count
* @property mixed transaction_time
* @property mixed transaction_size
* @property mixed hash
* @property mixed version
* @property mixed lock_time
* @property mixed created_at
* @property mixed modified_at
* @property mixed created_time
* @property mixed value
*/
class Transaction extends Model{
protected $casts = [
'created_at' => 'datetime',
];
protected $table = 'transaction';
public $timestamps = false;
}

View file

@ -0,0 +1,18 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* @mixin Model
* @property mixed transaction_id
* @property mixed address_id
* @property mixed debit_amount
* @property mixed credit_amount
*/
class TransactionAddress extends Model{
protected $table = 'transaction_address';
public $timestamps = false;
}

18
artisan Normal file
View file

@ -0,0 +1,18 @@
#!/usr/bin/env php
<?php
use Illuminate\Foundation\Application;
use Symfony\Component\Console\Input\ArgvInput;
define('LARAVEL_START', microtime(true));
// Register the Composer autoloader...
require __DIR__.'/vendor/autoload.php';
// Bootstrap Laravel and handle the command...
/** @var Application $app */
$app = require_once __DIR__.'/bootstrap/app.php';
$status = $app->handleCommand(new ArgvInput);
exit($status);

View file

@ -1,46 +0,0 @@
#!/usr/bin/env sh
################################################################################
#
# Cake is a shell script for invoking CakePHP shell commands
#
# CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
#
# Licensed under The MIT License
# For full copyright and license information, please see the LICENSE.txt
# Redistributions of files must retain the above copyright notice.
#
# @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
# @link http://cakephp.org CakePHP(tm) Project
# @since 1.2.0
# @license http://www.opensource.org/licenses/mit-license.php MIT License
#
################################################################################
# Canonicalize by following every symlink of the given name recursively
canonicalize() {
NAME="$1"
if [ -f "$NAME" ]
then
DIR=$(dirname -- "$NAME")
NAME=$(cd -P "$DIR" > /dev/null && pwd -P)/$(basename -- "$NAME")
fi
while [ -h "$NAME" ]; do
DIR=$(dirname -- "$NAME")
SYM=$(readlink "$NAME")
NAME=$(cd "$DIR" > /dev/null && cd $(dirname -- "$SYM") > /dev/null && pwd)/$(basename -- "$SYM")
done
echo "$NAME"
}
CONSOLE=$(dirname -- "$(canonicalize "$0")")
APP=$(dirname "$CONSOLE")
if [ $(basename $0) != 'cake' ]
then
exec php "$CONSOLE"/cake.php $(basename $0) "$@"
else
exec php "$CONSOLE"/cake.php "$@"
fi
exit

View file

@ -1,27 +0,0 @@
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
:: Cake is a Windows batch script for invoking CakePHP shell commands
::
:: CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
:: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
::
:: Licensed under The MIT License
:: Redistributions of files must retain the above copyright notice.
::
:: @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
:: @link http://cakephp.org CakePHP(tm) Project
:: @since 2.0.0
:: @license http://www.opensource.org/licenses/mit-license.php MIT License
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off
SET app=%0
SET lib=%~dp0
php "%lib%cake.php" %*
echo.
exit /B %ERRORLEVEL%

View file

@ -1,34 +0,0 @@
#!/usr/bin/php -q
<?php
/**
* Command-line code generation utility to automate programmer chores.
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @since 2.0.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
$minVersion = '5.6.0';
if (file_exists('composer.json')) {
$composer = json_decode(file_get_contents('composer.json'));
if (isset($composer->require->php)) {
$minVersion = preg_replace('/([^0-9\.])/', '', $composer->require->php);
}
}
if (version_compare(phpversion(), $minVersion, '<')) {
fwrite(STDERR, sprintf("Minimum PHP version: %s. You are using: %s.\n", $minVersion, phpversion()));
exit(-1);
}
require dirname(__DIR__) . '/vendor/autoload.php';
include dirname(__DIR__) . '/config/bootstrap.php';
exit(Cake\Console\ShellDispatcher::run($argv));

16
bootstrap/app.php Normal file
View file

@ -0,0 +1,16 @@
<?php
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Middleware;
return Application::configure(basePath: dirname(__DIR__))
->withExceptions()
->withMiddleware(static function(Middleware $middleware){
$middleware->removeFromGroup('api',$middleware->getMiddlewareGroups()['api']);
$middleware->removeFromGroup('web',$middleware->getMiddlewareGroups()['web']);
})
->withRouting(
web: __DIR__.'/../routes/web.php',
api: __DIR__.'/../routes/api.php',
health: '/up',
)
->create();

2
bootstrap/cache/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
*
!.gitignore

View file

@ -1,53 +1,81 @@
{
"name": "cakephp/app",
"description": "CakePHP skeleton app",
"homepage": "http://cakephp.org",
"$schema": "https://getcomposer.org/schema.json",
"name": "laravel/laravel",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": ["laravel", "framework"],
"license": "MIT",
"require": {
"php": ">=5.6",
"cakephp/cakephp": "3.4.*",
"mobiledetect/mobiledetectlib": "2.*",
"cakephp/migrations": "~1.0",
"cakephp/plugin-installer": "~1.0",
"mdanter/ecc": "^0.4.2",
"nesbot/carbon": "~1.18",
"endroid/qrcode": "^2.2.2",
"predis/predis": "^1.1.1"
"php": "^8.2",
"ext-bcmath": "*",
"ext-curl": "*",
"ext-gmp": "*",
"ext-pdo": "*",
"ext-redis": "*",
"cakephp/utility": "^5.2",
"endroid/qr-code": "^6.0",
"laravel/framework": "^12.19",
"laravel/tinker": "^2.10",
"paragonie/ecc": "^2.4"
},
"require-dev": {
"psy/psysh": "@stable",
"cakephp/debug_kit": "~3.2",
"cakephp/bake": "~1.1"
},
"suggest": {
"markstory/asset_compress": "An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.",
"dereuromark/cakephp-ide-helper": "After baking your code, this keeps your annotations in sync with the code evolving from there on for maximum IDE and PHPStan compatibility.",
"phpunit/phpunit": "Allows automated tests to be run without system-wide install.",
"cakephp/cakephp-codesniffer": "Allows to check the code against the coding standards used in CakePHP."
"fakerphp/faker": "^1.24",
"laravel/pail": "^1.2",
"laravel/pint": "^1.22",
"laravel/sail": "^1.43",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.8",
"phpunit/phpunit": "^11.5"
},
"autoload": {
"psr-4": {
"App\\": "src"
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Test\\": "tests",
"Cake\\Test\\": "./vendor/cakephp/cakephp/tests"
"Tests\\": "tests/"
}
},
"scripts": {
"post-install-cmd": "App\\Console\\Installer::postInstall",
"post-create-project-cmd": "App\\Console\\Installer::postInstall",
"post-autoload-dump": "Cake\\Composer\\Installer\\PluginInstaller::postAutoloadDump",
"check": [
"@test",
"@cs-check"
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"cs-check": "phpcs --colors -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests",
"cs-fix": "phpcbf --colors --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests",
"test": "phpunit --colors=always"
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi",
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
"@php artisan migrate --graceful --ansi"
],
"dev": [
"Composer\\Config::disableProcessTimeout",
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite"
],
"test": [
"@php artisan config:clear --ansi",
"@php artisan test"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "stable",
"prefer-stable": true
}

9718
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,346 +0,0 @@
<?php
return [
/**
* Debug Level:
*
* Production Mode:
* false: No error messages, errors, or warnings shown.
*
* Development Mode:
* true: Errors and warnings shown.
*/
'debug' => filter_var(env('DEBUG', true), FILTER_VALIDATE_BOOLEAN),
/**
* Configure basic information about the application.
*
* - namespace - The namespace to find app classes under.
* - defaultLocale - The default locale for translation, formatting currencies and numbers, date and time.
* - encoding - The encoding used for HTML + database connections.
* - base - The base directory the app resides in. If false this
* will be auto detected.
* - dir - Name of app directory.
* - webroot - The webroot directory.
* - wwwRoot - The file path to webroot.
* - baseUrl - To configure CakePHP to *not* use mod_rewrite and to
* use CakePHP pretty URLs, remove these .htaccess
* files:
* /.htaccess
* /webroot/.htaccess
* And uncomment the baseUrl key below.
* - fullBaseUrl - A base URL to use for absolute links.
* - imageBaseUrl - Web path to the public images directory under webroot.
* - cssBaseUrl - Web path to the public css directory under webroot.
* - jsBaseUrl - Web path to the public js directory under webroot.
* - paths - Configure paths for non class based resources. Supports the
* `plugins`, `templates`, `locales` subkeys, which allow the definition of
* paths for plugins, view templates and locale files respectively.
*/
'App' => [
'namespace' => 'App',
'encoding' => env('APP_ENCODING', 'UTF-8'),
'defaultLocale' => env('APP_DEFAULT_LOCALE', 'en_US'),
'base' => false,
'dir' => 'src',
'webroot' => 'webroot',
'wwwRoot' => WWW_ROOT,
// 'baseUrl' => env('SCRIPT_NAME'),
'fullBaseUrl' => false,
'imageBaseUrl' => 'img/',
'cssBaseUrl' => 'css/',
'jsBaseUrl' => 'js/',
'paths' => [
'plugins' => [ROOT . DS . 'plugins' . DS],
'templates' => [APP . 'Template' . DS],
'locales' => [APP . 'Locale' . DS],
],
],
/**
* Security and encryption configuration
*
* - salt - A random string used in security hashing methods.
* The salt value is also used as the encryption key.
* You should treat it as extremely sensitive data.
*/
'Security' => [
'salt' => env('SECURITY_SALT', '__SALT__'),
],
/**
* Apply timestamps with the last modified time to static assets (js, css, images).
* Will append a querystring parameter containing the time the file was modified.
* This is useful for busting browser caches.
*
* Set to true to apply timestamps when debug is true. Set to 'force' to always
* enable timestamping regardless of debug value.
*/
'Asset' => [
// 'timestamp' => true,
],
/**
* Configure the cache adapters.
*/
'Cache' => [
'default' => [
'className' => 'File',
'path' => CACHE,
'url' => env('CACHE_DEFAULT_URL', null),
],
/**
* Configure the cache used for general framework caching.
* Translation cache files are stored with this configuration.
* Duration will be set to '+2 minutes' in bootstrap.php when debug = true
* If you set 'className' => 'Null' core cache will be disabled.
*/
'_cake_core_' => [
'className' => 'File',
'prefix' => 'myapp_cake_core_',
'path' => CACHE . 'persistent/',
'serialize' => true,
'duration' => '+1 years',
'url' => env('CACHE_CAKECORE_URL', null),
],
/**
* Configure the cache for model and datasource caches. This cache
* configuration is used to store schema descriptions, and table listings
* in connections.
* Duration will be set to '+2 minutes' in bootstrap.php when debug = true
*/
'_cake_model_' => [
'className' => 'File',
'prefix' => 'myapp_cake_model_',
'path' => CACHE . 'models/',
'serialize' => true,
'duration' => '+1 years',
'url' => env('CACHE_CAKEMODEL_URL', null),
],
],
/**
* Configure the Error and Exception handlers used by your application.
*
* By default errors are displayed using Debugger, when debug is true and logged
* by Cake\Log\Log when debug is false.
*
* In CLI environments exceptions will be printed to stderr with a backtrace.
* In web environments an HTML page will be displayed for the exception.
* With debug true, framework errors like Missing Controller will be displayed.
* When debug is false, framework errors will be coerced into generic HTTP errors.
*
* Options:
*
* - `errorLevel` - int - The level of errors you are interested in capturing.
* - `trace` - boolean - Whether or not backtraces should be included in
* logged errors/exceptions.
* - `log` - boolean - Whether or not you want exceptions logged.
* - `exceptionRenderer` - string - The class responsible for rendering
* uncaught exceptions. If you choose a custom class you should place
* the file for that class in src/Error. This class needs to implement a
* render method.
* - `skipLog` - array - List of exceptions to skip for logging. Exceptions that
* extend one of the listed exceptions will also be skipped for logging.
* E.g.:
* `'skipLog' => ['Cake\Network\Exception\NotFoundException', 'Cake\Network\Exception\UnauthorizedException']`
* - `extraFatalErrorMemory` - int - The number of megabytes to increase
* the memory limit by when a fatal error is encountered. This allows
* breathing room to complete logging or error handling.
*/
'Error' => [
'errorLevel' => E_ALL,
'exceptionRenderer' => 'Cake\Error\ExceptionRenderer',
'skipLog' => [],
'log' => true,
'trace' => true,
],
/**
* Email configuration.
*
* By defining transports separately from delivery profiles you can easily
* re-use transport configuration across multiple profiles.
*
* You can specify multiple configurations for production, development and
* testing.
*
* Each transport needs a `className`. Valid options are as follows:
*
* Mail - Send using PHP mail function
* Smtp - Send using SMTP
* Debug - Do not send the email, just return the result
*
* You can add custom transports (or override existing transports) by adding the
* appropriate file to src/Mailer/Transport. Transports should be named
* 'YourTransport.php', where 'Your' is the name of the transport.
*/
'EmailTransport' => [
'default' => [
'className' => 'Mail',
// The following keys are used in SMTP transports
'host' => 'localhost',
'port' => 25,
'timeout' => 30,
'username' => 'user',
'password' => 'secret',
'client' => null,
'tls' => null,
'url' => env('EMAIL_TRANSPORT_DEFAULT_URL', null),
],
],
/**
* Email delivery profiles
*
* Delivery profiles allow you to predefine various properties about email
* messages from your application and give the settings a name. This saves
* duplication across your application and makes maintenance and development
* easier. Each profile accepts a number of keys. See `Cake\Mailer\Email`
* for more information.
*/
'Email' => [
'default' => [
'transport' => 'default',
'from' => 'you@localhost',
//'charset' => 'utf-8',
//'headerCharset' => 'utf-8',
],
],
/**
* Connection information used by the ORM to connect
* to your application's datastores.
* Do not use periods in database name - it may lead to error.
* See https://github.com/cakephp/cakephp/issues/6471 for details.
* Drivers include Mysql Postgres Sqlite Sqlserver
* See vendor\cakephp\cakephp\src\Database\Driver for complete list
*/
'Datasources' => [
'default' => [
'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Mysql',
'persistent' => false,
'host' => 'localhost',
/**
* CakePHP will use the default DB port based on the driver selected
* MySQL on MAMP uses port 8889, MAMP users will want to uncomment
* the following line and set the port accordingly
*/
//'port' => 'non_standard_port_number',
'username' => 'my_app',
'password' => 'secret',
'database' => 'my_app',
'encoding' => 'utf8',
'timezone' => 'UTC',
'flags' => [],
'cacheMetadata' => true,
'log' => false,
/**
* Set identifier quoting to true if you are using reserved words or
* special characters in your table or column names. Enabling this
* setting will result in queries built using the Query Builder having
* identifiers quoted when creating SQL. It should be noted that this
* decreases performance because each query needs to be traversed and
* manipulated before being executed.
*/
'quoteIdentifiers' => false,
/**
* During development, if using MySQL < 5.6, uncommenting the
* following line could boost the speed at which schema metadata is
* fetched from the database. It can also be set directly with the
* mysql configuration directive 'innodb_stats_on_metadata = 0'
* which is the recommended value in production environments
*/
//'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],
'url' => env('DATABASE_URL', null),
],
/**
* The test connection is used during the test suite.
*/
'test' => [
'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Mysql',
'persistent' => false,
'host' => 'localhost',
//'port' => 'non_standard_port_number',
'username' => 'my_app',
'password' => 'secret',
'database' => 'test_myapp',
'encoding' => 'utf8',
'timezone' => 'UTC',
'cacheMetadata' => true,
'quoteIdentifiers' => false,
'log' => false,
//'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],
'url' => env('DATABASE_TEST_URL', null),
],
],
/**
* Configures logging options
*/
'Log' => [
'debug' => [
'className' => 'Cake\Log\Engine\FileLog',
'path' => LOGS,
'file' => 'debug',
'levels' => ['notice', 'info', 'debug'],
'url' => env('LOG_DEBUG_URL', null),
],
'error' => [
'className' => 'Cake\Log\Engine\FileLog',
'path' => LOGS,
'file' => 'error',
'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
'url' => env('LOG_ERROR_URL', null),
],
],
/**
* Session configuration.
*
* Contains an array of settings to use for session configuration. The
* `defaults` key is used to define a default preset to use for sessions, any
* settings declared here will override the settings of the default config.
*
* ## Options
*
* - `cookie` - The name of the cookie to use. Defaults to 'CAKEPHP'.
* - `cookiePath` - The url path for which session cookie is set. Maps to the
* `session.cookie_path` php.ini config. Defaults to base path of app.
* - `timeout` - The time in minutes the session should be valid for.
* Pass 0 to disable checking timeout.
* Please note that php.ini's session.gc_maxlifetime must be equal to or greater
* than the largest Session['timeout'] in all served websites for it to have the
* desired effect.
* - `defaults` - The default configuration set to use as a basis for your session.
* There are four built-in options: php, cake, cache, database.
* - `handler` - Can be used to enable a custom session handler. Expects an
* array with at least the `engine` key, being the name of the Session engine
* class to use for managing the session. CakePHP bundles the `CacheSession`
* and `DatabaseSession` engines.
* - `ini` - An associative array of additional ini values to set.
*
* The built-in `defaults` options are:
*
* - 'php' - Uses settings defined in your php.ini.
* - 'cake' - Saves session files in CakePHP's /tmp directory.
* - 'database' - Uses CakePHP's database sessions.
* - 'cache' - Use the Cache class to save sessions.
*
* To define a custom session handler, save it at src/Network/Session/<name>.php.
* Make sure the class implements PHP's `SessionHandlerInterface` and set
* Session.handler to <name>
*
* To use database sessions, load the SQL file located at config/Schema/sessions.sql
*/
'Session' => [
'defaults' => 'php',
],
];

125
config/app.php Normal file
View file

@ -0,0 +1,125 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application, which will be used when the
| framework needs to place the application's name in a notification or
| other UI elements where an application name needs to be displayed.
|
*/
'name' => env('APP_NAME', 'Laravel'),
/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services the application utilizes. Set this in your ".env" file.
|
*/
'env' => env('APP_ENV', 'production'),
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => (bool) env('APP_DEBUG', false),
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| the application so that it's available within Artisan commands.
|
*/
'url' => env('APP_URL', 'http://localhost'),
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. The timezone
| is set to "UTC" by default as it is suitable for most use cases.
|
*/
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by Laravel's translation / localization methods. This option can be
| set to any locale for which you plan to have translation strings.
|
*/
'locale' => env('APP_LOCALE', 'en'),
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is utilized by Laravel's encryption services and should be set
| to a random, 32 character string to ensure that all encrypted values
| are secure. You should do this prior to deploying the application.
|
*/
'cipher' => 'AES-256-CBC',
'key' => env('APP_KEY'),
'previous_keys' => [
...array_filter(
explode(',', env('APP_PREVIOUS_KEYS', ''))
),
],
/*
|--------------------------------------------------------------------------
| Maintenance Mode Driver
|--------------------------------------------------------------------------
|
| These configuration options determine the driver used to determine and
| manage Laravel's "maintenance mode" status. The "cache" driver will
| allow maintenance mode to be controlled across multiple machines.
|
| Supported drivers: "file", "cache"
|
*/
'maintenance' => [
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
'store' => env('APP_MAINTENANCE_STORE', 'database'),
],
];

View file

@ -1,222 +0,0 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @since 0.10.8
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
// You can remove this if you are confident that your PHP version is sufficient.
if (version_compare(PHP_VERSION, '5.6.0') < 0) {
trigger_error('Your PHP version must be equal or higher than 5.6.0 to use CakePHP.', E_USER_ERROR);
}
/*
* You can remove this if you are confident you have intl installed.
*/
if (!extension_loaded('intl')) {
trigger_error('You must enable the intl extension to use CakePHP.', E_USER_ERROR);
}
/*
* You can remove this if you are confident you have mbstring installed.
*/
if (!extension_loaded('mbstring')) {
trigger_error('You must enable the mbstring extension to use CakePHP.', E_USER_ERROR);
}
/*
* Configure paths required to find CakePHP + general filepath
* constants
*/
require __DIR__ . '/paths.php';
/*
* Bootstrap CakePHP.
*
* Does the various bits of setup that CakePHP needs to do.
* This includes:
*
* - Registering the CakePHP autoloader.
* - Setting the default application paths.
*/
require CORE_PATH . 'config' . DS . 'bootstrap.php';
use Cake\Cache\Cache;
use Cake\Console\ConsoleErrorHandler;
use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Core\Configure\Engine\PhpConfig;
use Cake\Core\Plugin;
use Cake\Database\Type;
use Cake\Datasource\ConnectionManager;
use Cake\Error\ErrorHandler;
use Cake\Log\Log;
use Cake\Mailer\Email;
use Cake\Network\Request;
use Cake\Utility\Inflector;
use Cake\Utility\Security;
/*
* Read configuration file and inject configuration into various
* CakePHP classes.
*
* By default there is only one configuration file. It is often a good
* idea to create multiple configuration files, and separate the configuration
* that changes from configuration that does not. This makes deployment simpler.
*/
try {
Configure::config('default', new PhpConfig());
Configure::load('app', 'default', false);
} catch (\Exception $e) {
exit($e->getMessage() . "\n");
}
/*
* Load an environment local configuration file.
* You can use a file like app_local.php to provide local overrides to your
* shared configuration.
*/
//Configure::load('app_local', 'default');
/*
* When debug = true the metadata cache should only last
* for a short time.
*/
if (Configure::read('debug')) {
Configure::write('Cache._cake_model_.duration', '+2 minutes');
Configure::write('Cache._cake_core_.duration', '+2 minutes');
}
/*
* Set server timezone to UTC. You can change it to another timezone of your
* choice but using UTC makes time calculations / conversions easier.
*/
date_default_timezone_set('UTC');
/*
* Configure the mbstring extension to use the correct encoding.
*/
mb_internal_encoding(Configure::read('App.encoding'));
/*
* Set the default locale. This controls how dates, number and currency is
* formatted and sets the default language to use for translations.
*/
ini_set('intl.default_locale', Configure::read('App.defaultLocale'));
/*
* Register application error and exception handlers.
*/
$isCli = PHP_SAPI === 'cli';
if ($isCli) {
(new ConsoleErrorHandler(Configure::read('Error')))->register();
} else {
(new ErrorHandler(Configure::read('Error')))->register();
}
/*
* Include the CLI bootstrap overrides.
*/
if ($isCli) {
require __DIR__ . '/bootstrap_cli.php';
}
/*
* Set the full base URL.
* This URL is used as the base of all absolute links.
*
* If you define fullBaseUrl in your config file you can remove this.
*/
if (!Configure::read('App.fullBaseUrl')) {
$s = null;
if (env('HTTPS')) {
$s = 's';
}
$httpHost = env('HTTP_HOST');
if (isset($httpHost)) {
Configure::write('App.fullBaseUrl', 'http' . $s . '://' . $httpHost);
}
unset($httpHost, $s);
}
Cache::setConfig(Configure::consume('Cache'));
ConnectionManager::setConfig(Configure::consume('Datasources'));
Email::setConfigTransport(Configure::consume('EmailTransport'));
Email::setConfig(Configure::consume('Email'));
Log::setConfig(Configure::consume('Log'));
Security::salt(Configure::consume('Security.salt'));
/*
* The default crypto extension in 3.0 is OpenSSL.
* If you are migrating from 2.x uncomment this code to
* use a more compatible Mcrypt based implementation
*/
//Security::engine(new \Cake\Utility\Crypto\Mcrypt());
/*
* Setup detectors for mobile and tablet.
*/
Request::addDetector('mobile', function ($request) {
$detector = new \Detection\MobileDetect();
return $detector->isMobile();
});
Request::addDetector('tablet', function ($request) {
$detector = new \Detection\MobileDetect();
return $detector->isTablet();
});
/*
* Enable immutable time objects in the ORM.
*
* You can enable default locale format parsing by adding calls
* to `useLocaleParser()`. This enables the automatic conversion of
* locale specific date formats. For details see
* @link http://book.cakephp.org/3.0/en/core-libraries/internationalization-and-localization.html#parsing-localized-datetime-data
*/
Type::build('time')
->useImmutable();
Type::build('date')
->useImmutable();
Type::build('datetime')
->useImmutable();
Type::build('timestamp')
->useImmutable();
/*
* Custom Inflector rules, can be set to correctly pluralize or singularize
* table, model, controller names or whatever other string is passed to the
* inflection functions.
*/
//Inflector::rules('plural', ['/^(inflect)or$/i' => '\1ables']);
//Inflector::rules('irregular', ['red' => 'redlings']);
//Inflector::rules('uninflected', ['dontinflectme']);
//Inflector::rules('transliteration', ['/å/' => 'aa']);
/*
* Plugins need to be loaded manually, you can either load them one by one or all of them in a single call
* Uncomment one of the lines below, as you need. make sure you read the documentation on Plugin to use more
* advanced ways of loading plugins
*
* Plugin::loadAll(); // Loads all plugins at once
* Plugin::load('Migrations'); //Loads a single plugin named Migrations
*
*/
/*
* Only try to load DebugKit in development mode
* Debug Kit should not be installed on a production system
*/
if (Configure::read('debug')) {
Plugin::load('DebugKit', ['bootstrap' => true]);
}

View file

@ -1,38 +0,0 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @since 3.0.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
use Cake\Core\Configure;
use Cake\Core\Exception\MissingPluginException;
use Cake\Core\Plugin;
/**
* Additional bootstrapping and configuration for CLI environments should
* be put here.
*/
// Set the fullBaseUrl to allow URLs to be generated in shell tasks.
// This is useful when sending email from shells.
//Configure::write('App.fullBaseUrl', php_uname('n'));
// Set logs to different files so they don't have permission conflicts.
Configure::write('Log.debug.file', 'cli-debug');
Configure::write('Log.error.file', 'cli-error');
try {
Plugin::load('Bake');
} catch (MissingPluginException $e) {
// Do not halt if the plugin is missing
}
Plugin::load('Migrations');

107
config/cache.php Normal file
View file

@ -0,0 +1,107 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache store that will be used by the
| framework. This connection is utilized if another isn't explicitly
| specified when running a cache operation inside the application.
|
*/
'default' => env('CACHE_STORE', 'file'),
/*
|--------------------------------------------------------------------------
| Cache Stores
|--------------------------------------------------------------------------
|
| Here you may define all of the cache "stores" for your application as
| well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches.
|
| Supported drivers: "array", "database", "file", "memcached",
| "redis", "dynamodb", "octane", "null"
|
*/
'stores' => [
'array' => [
'driver' => 'array',
'serialize' => false,
],
'database' => [
'driver' => 'database',
'connection' => env('DB_CACHE_CONNECTION'),
'table' => env('DB_CACHE_TABLE', 'cache'),
'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
'lock_table' => env('DB_CACHE_LOCK_TABLE'),
],
'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
'lock_path' => storage_path('framework/cache/data'),
],
'memcached' => [
'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],
'redis' => [
'driver' => 'redis',
'connection' => env('REDIS_CACHE_CONNECTION', 'cache'),
'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'),
],
'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
],
'octane' => [
'driver' => 'octane',
],
],
/*
|--------------------------------------------------------------------------
| Cache Key Prefix
|--------------------------------------------------------------------------
|
| When utilizing the APC, database, memcached, Redis, and DynamoDB cache
| stores, there might be other applications using the same cache. For
| that reason, you may prefix every cache key to avoid collisions.
|
*/
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
];

98
config/database.php Normal file
View file

@ -0,0 +1,98 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for database operations. This is
| the connection which will be utilized unless another connection
| is explicitly specified when you execute a query / statement.
|
*/
'default' => 'chainquery',
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Below are all of the database connections defined for your application.
| An example configuration is provided for each database system which
| is supported by Laravel. You're free to add / remove connections.
|
*/
'connections' => [
'chainquery' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
],
/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk haven't actually been run on the database.
|
*/
'migrations' => [
'table' => 'migrations',
'update_date_on_publish' => true,
],
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer body of commands than a typical key-value system
| such as Memcached. You may define your connection settings here.
|
*/
'redis' => [
'client' => env('REDIS_CLIENT', 'phpredis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
'persistent' => env('REDIS_PERSISTENT', false),
],
'default' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
],
],
];

4
config/lbry.php Normal file
View file

@ -0,0 +1,4 @@
<?php
return [
'rpc_url' => env('LBRY_RPC_URL'),
];

131
config/logging.php Normal file
View file

@ -0,0 +1,131 @@
<?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
use Monolog\Processor\PsrLogMessageProcessor;
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that is utilized to write
| messages to your logs. The value provided here should match one of
| the channels present in the list of "channels" configured below.
|
*/
'default' => env('LOG_CHANNEL', 'stack'),
/*
|--------------------------------------------------------------------------
| Deprecations Log Channel
|--------------------------------------------------------------------------
|
| This option controls the log channel that should be used to log warnings
| regarding deprecated PHP and library features. This allows you to get
| your application ready for upcoming major versions of dependencies.
|
*/
'deprecations' => [
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
'trace' => env('LOG_DEPRECATIONS_TRACE', false),
],
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Laravel
| utilizes the Monolog PHP logging library, which includes a variety
| of powerful log handlers and formatters that you're free to use.
|
| Available drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog", "custom", "stack"
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => explode(',', env('LOG_STACK', 'single')),
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => env('LOG_DAILY_DAYS', 14),
'replace_placeholders' => true,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'),
'emoji' => env('LOG_SLACK_EMOJI', ':boom:'),
'level' => env('LOG_LEVEL', 'critical'),
'replace_placeholders' => true,
],
'papertrail' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
],
'processors' => [PsrLogMessageProcessor::class],
],
'stderr' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => StreamHandler::class,
'handler_with' => [
'stream' => 'php://stderr',
],
'formatter' => env('LOG_STDERR_FORMATTER'),
'processors' => [PsrLogMessageProcessor::class],
],
'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER),
'replace_placeholders' => true,
],
'errorlog' => [
'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
],
];

View file

@ -1,85 +0,0 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @since 3.0.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/**
* Use the DS to separate the directories in other defines
*/
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
/**
* These defines should only be edited if you have cake installed in
* a directory layout other than the way it is distributed.
* When using custom settings be sure to use the DS and do not add a trailing DS.
*/
/**
* The full path to the directory which holds "src", WITHOUT a trailing DS.
*/
define('ROOT', dirname(__DIR__));
/**
* The actual directory name for the application directory. Normally
* named 'src'.
*/
define('APP_DIR', 'src');
/**
* Path to the application's directory.
*/
define('APP', ROOT . DS . APP_DIR . DS);
/**
* Path to the config directory.
*/
define('CONFIG', ROOT . DS . 'config' . DS);
/**
* File path to the webroot directory.
*/
define('WWW_ROOT', ROOT . DS . 'webroot' . DS);
/**
* Path to the tests directory.
*/
define('TESTS', ROOT . DS . 'tests' . DS);
/**
* Path to the temporary files directory.
*/
define('TMP', ROOT . DS . 'tmp' . DS);
/**
* Path to the logs directory.
*/
define('LOGS', ROOT . DS . 'logs' . DS);
/**
* Path to the cache files directory. It can be shared between hosts in a multi-server setup.
*/
define('CACHE', TMP . 'cache' . DS);
/**
* The absolute path to the "cake" directory, WITHOUT a trailing DS.
*
* CakePHP should always be installed with composer, so look there.
*/
define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'vendor' . DS . 'cakephp' . DS . 'cakephp');
/**
* Path to the cake directory.
*/
define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
define('CAKE', CORE_PATH . 'src' . DS);

View file

@ -1,80 +0,0 @@
<?php
/**
* Routes configuration
*
* In this file, you set up routes to your controllers and their actions.
* Routes are very important mechanism that allows you to freely connect
* different URLs to chosen controllers and their actions (functions).
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
use Cake\Core\Plugin;
use Cake\Routing\RouteBuilder;
use Cake\Routing\Router;
use Cake\Routing\Route\DashedRoute;
/**
* The default class to use for all routes
*
* The following route classes are supplied with CakePHP and are appropriate
* to set as the default:
*
* - Route
* - InflectedRoute
* - DashedRoute
*
* If no call is made to `Router::defaultRouteClass()`, the class used is
* `Route` (`Cake\Routing\Route\Route`)
*
* Note that `Route` does not do any inflections on URLs which will result in
* inconsistently cased URLs when used with `:plugin`, `:controller` and
* `:action` markers.
*
*/
Router::defaultRouteClass(DashedRoute::class);
Router::scope('/', function (RouteBuilder $routes) {
$routes->connect('/', ['controller' => 'Main', 'action' => 'index']);
$routes->connect('/address/*', ['controller' => 'Main', 'action' => 'address']);
$routes->connect('/blocks/*', ['controller' => 'Main', 'action' => 'blocks']);
$routes->connect('/claims/*', ['controller' => 'Main', 'action' => 'claims']);
$routes->connect('/find', ['controller' => 'Main', 'action' => 'find']);
$routes->connect('/realtime', ['controller' => 'Main', 'action' => 'realtime']);
$routes->connect('/stats', ['controller' => 'Main', 'action' => 'stats']);
$routes->connect('/tx/*', ['controller' => 'Main', 'action' => 'tx']);
$routes->connect('/qr/*', ['controller' => 'Main', 'action' => 'qr']);
$routes->connect('/*', ['controller' => 'Main', 'action' => 'index']);
$routes->connect('/api/v1/address/:addr/tag', ['controller' => 'Main', 'action' => 'apiaddrtag'], ['addr' => '[A-Za-z0-9,]+', 'pass' => ['addr']]);
$routes->connect('/api/v1/address/:addr/utxo', ['controller' => 'Main', 'action' => 'apiaddrutxo'], ['addr' => '[A-Za-z0-9,]+', 'pass' => ['addr']]);
$routes->connect('/api/v1/address/:addr/balance', ['controller' => 'Main', 'action' => 'apiaddrbalance'], ['addr' => '[A-Za-z0-9]+', 'pass' => ['addr']]);
$routes->connect('/api/v1/address/:addr/transactions', ['controller' => 'Main', 'action' => 'apiaddrtx'], ['addr' => '[A-Za-z0-9,]+', 'pass' => ['addr']]);
$routes->connect('/api/v1/charts/blocksize/:period', ['controller' => 'Main', 'action' => 'apiblocksize'], ['period' => '[012346789dhy]+', 'pass' => ['period']]);
$routes->connect('/api/v1/realtime/blocks', ['controller' => 'Main', 'action' => 'apirealtimeblocks']);
$routes->connect('/api/v1/realtime/tx', ['controller' => 'Main', 'action' => 'apirealtimetx']);
$routes->connect('/api/v1/recentblocks', ['controller' => 'Main', 'action' => 'apirecentblocks']);
$routes->connect('/api/v1/status', ['controller' => 'Main', 'action' => 'apistatus']);
$routes->connect('/api/v1/supply', ['controller' => 'Main', 'action' => 'apiutxosupply']);
//$routes->connect('/api/v1/recenttxs', ['controller' => 'Main', 'action' => 'apirecenttxs']);
$routes->connect('/api/v1/claims/browse', ['controller' => 'Claims', 'action' => 'apibrowse']);
//$routes->fallbacks(DashedRoute::class);
});
/**
* Load all plugin routes. See the Plugin documentation on
* how to customize the loading of plugin routes.
*/
Plugin::routes();

View file

@ -1,18 +0,0 @@
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
#
# Licensed under The MIT License
# For full copyright and license information, please see the LICENSE.txt
# Redistributions of files must retain the above copyright notice.
# MIT License (http://www.opensource.org/licenses/mit-license.php)
CREATE TABLE i18n (
id int NOT NULL auto_increment,
locale varchar(6) NOT NULL,
model varchar(255) NOT NULL,
foreign_key int(10) NOT NULL,
field varchar(255) NOT NULL,
content text,
PRIMARY KEY (id),
UNIQUE INDEX I18N_LOCALE_FIELD(locale, model, foreign_key, field),
INDEX I18N_FIELD(model, foreign_key, field)
);

View file

@ -1,13 +0,0 @@
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
#
# Licensed under The MIT License
# For full copyright and license information, please see the LICENSE.txt
# Redistributions of files must retain the above copyright notice.
# MIT License (http://www.opensource.org/licenses/mit-license.php)
CREATE TABLE sessions (
id char(40) NOT NULL,
data text,
expires INT(11) NOT NULL,
PRIMARY KEY (id)
);

View file

@ -1,4 +0,0 @@
#!/bin/sh
cd /var/www/lbry.block.ng
bin/cake block addrtxamounts

View file

@ -1,4 +0,0 @@
#!/bin/sh
cd /var/www/lbry.block.ng
bin/cake block parsenewblocks

View file

@ -1,137 +0,0 @@
<?php
define('TMP', '/tmp/');
define('DS', '/');
class BlockSyncThread extends \Thread {
private $_startHeight;
private $_endHeight;
private $_maxHeight;
public function __construct($startBlock, $endBlock, $maxHeight) {
$this->_startHeight = $startBlock;
$this->_endHeight = $endBlock;
$this->_maxHeight = $maxHeight;
}
public function run() {
$conn = new \PDO("mysql:host=localhost;dbname=lbry", 'lbry-admin', '46D861aX#!yQ');
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$data_error = false;
$conn->beginTransaction();
// TODO: Batch block synchronisation from memory to DB
for ($curr_height = $this->_startHeight; $curr_height <= $this->_endHeight; $curr_height++) {
$idx_str = str_pad($curr_height, strlen($this->_maxHeight), '0', STR_PAD_LEFT);
// get the block hash
$req = ['method' => 'getblockhash', 'params' => [$curr_height]];
$response = BlockStuff::curl_json_post(BlockStuff::rpcurl, json_encode($req));
$json = json_decode($response);
$curr_block_hash = $json->result;
$req = ['method' => 'getblock', 'params' => [$curr_block_hash]];
$response = BlockStuff::curl_json_post(BlockStuff::rpcurl, json_encode($req));
$json = json_decode($response);
$curr_block = $json->result;
$stmt = $conn->prepare('UPDATE Blocks SET Confirmations = ? WHERE Height = ?');
try {
$stmt->execute([$curr_block->confirmations, $curr_height]);
echo "[$idx_str/$this->_maxHeight] Updated block height: $curr_height with confirmations $curr_block->confirmations.\n";
} catch (Exception $e) {
$data_error = true;
}
}
if ($data_error) {
echo "Rolling back changes.\n";
$conn->rollBack();
return;
}
echo "Committing data.\n";
$conn->commit();
}
}
class BlockStuff {
const rpcurl = 'http://lrpc:lrpc@127.0.0.1:9245';
public static function blocksync() {
self::lock('blocksync');
$conn = new \PDO("mysql:host=localhost;dbname=lbry", 'lbry-admin', '46D861aX#!yQ');
$stmt = $conn->prepare('SELECT Height FROM Blocks ORDER BY Height DESC LIMIT 1');
$stmt->execute([]);
$max_block = $stmt->fetch(PDO::FETCH_OBJ);
if ($max_block) {
$chunk_limit = 2;
$curr_height = 0;
$chunks = floor($max_block->Height / $chunk_limit);
$threads = [];
for ($i = 0; $i < $chunk_limit; $i++) {
$start = $curr_height;
$end = ($i == ($chunk_limit - 1)) ? $max_block->Height : $start + $chunks;
$curr_height += $chunks + 1;
$thread = new BlockSyncThread($start, $end, $max_block->Height);
$threads[] = $thread;
$thread->start();
}
for ($i = 0; $i < count($threads); $i++) {
$threads[$i]->join();
}
}
self::unlock('blocksync');
}
public static function curl_json_post($url, $data, $headers = []) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
//Log::debug('Request execution completed.');
if ($response === false) {
$error = curl_error($ch);
$errno = curl_errno($ch);
curl_close($ch);
throw new \Exception(sprintf('The request failed: %s', $error), $errno);
} else {
curl_close($ch);
}
// Close any open file handle
return $response;
}
public static function lock($process_name) {
if (!is_dir(TMP . 'lock')) {
mkdir(TMP . 'lock');
}
$lock_file = TMP . 'lock' . DS . $process_name;
if (file_exists($lock_file)) {
echo "$process_name is already running.\n";
exit(0);
}
file_put_contents($lock_file, '1');
}
public static function unlock($process_name) {
$lock_file = TMP . 'lock' . DS . $process_name;
if (file_exists($lock_file)) {
unlink($lock_file);
}
return true;
}
}
BlockStuff::blocksync();

View file

@ -1,4 +0,0 @@
#!/bin/sh
cd /var/www/lbry.block.ng
bin/cake block parsetxs

View file

@ -1,4 +0,0 @@
#!/bin/sh
cd /var/www/lbry.block.ng
bin/cake block buildclaimindex

View file

@ -1,3 +0,0 @@
#!/bin/sh
cd /var/www/lbry.block.ng/cron
php -d extension=pthreads.so blockstuff.php

View file

@ -1,4 +0,0 @@
#!/bin/sh
cd /var/www/lbry.block.ng
bin/cake block fixzerooutputs

View file

@ -1,4 +0,0 @@
#!/bin/sh
cd /var/www/lbry.block.ng
bin/cake block forevermempool &

View file

@ -1,4 +0,0 @@
#!/bin/sh
cd /var/www/lbry.block.ng
bin/cake block parsemempool

View file

@ -1,4 +0,0 @@
#!/bin/sh
cd /var/www/lbry.block.ng
bin/cake aux pricehistory

View file

@ -1,4 +0,0 @@
#!/bin/sh
cd /var/www/lbry.block.ng
bin/cake block updatespends

View file

@ -1,4 +0,0 @@
#!/bin/sh
cd /var/www/lbry.block.ng
bin/cake aux verifytags

1
database/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.sqlite*

BIN
images/screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

View file

@ -1,16 +0,0 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @since 0.10.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
require 'webroot' . DIRECTORY_SEPARATOR . 'index.php';

20
nginx.conf Normal file
View file

@ -0,0 +1,20 @@
server{
listen 80;
root /var/www/html/public;
index index.php;
gzip on;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_buffers 16 1024k;
fastcgi_buffer_size 1024k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass localhost:9000;
include /etc/nginx/fastcgi_params;
}
}

7
opcache.ini Normal file
View file

@ -0,0 +1,7 @@
opcache.jit_buffer_size=256M
opcache.max_accelerated_files=20000
opcache.memory_consumption=256
opcache.preload = '/var/www/html/preload.php'
;opcache.preload = '/app/preload.php'
opcache.preload_user = 'www-data'
opcache.validate_timestamps=0

1
php.ini Normal file
View file

@ -0,0 +1 @@
memory_limit = ${PHP_MEMORY_LIMIT}

33
phpunit.xml Normal file
View file

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
<testsuites>
<testsuite name="Unit">
<directory>tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory>tests/Feature</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory>app</directory>
</include>
</source>
<php>
<env name="APP_ENV" value="testing"/>
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_STORE" value="array"/>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
<env name="MAIL_MAILER" value="array"/>
<env name="PULSE_ENABLED" value="false"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="TELESCOPE_ENABLED" value="false"/>
</php>
</phpunit>

View file

@ -1,40 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
colors="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="./tests/bootstrap.php"
>
<php>
<ini name="memory_limit" value="-1"/>
<ini name="apc.enable_cli" value="1"/>
</php>
<!-- Add any additional test suites you want to run here -->
<testsuites>
<testsuite name="App Test Suite">
<directory>./tests/TestCase</directory>
</testsuite>
<!-- Add plugin test suites here. -->
</testsuites>
<!-- Setup a listener for fixtures -->
<listeners>
<listener
class="\Cake\TestSuite\Fixture\FixtureInjector"
file="./vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php">
<arguments>
<object class="\Cake\TestSuite\Fixture\FixtureManager" />
</arguments>
</listener>
</listeners>
<!-- Ignore vendor tests in code coverage reports -->
<filter>
<whitelist>
<directory suffix=".php">./src/</directory>
<directory suffix=".php">./plugins/*/src/</directory>
</whitelist>
</filter>
</phpunit>

7
preload.php Normal file
View file

@ -0,0 +1,7 @@
<?php
echo '[Preloading] Started'.PHP_EOL;
/**@var \Composer\Autoload\ClassLoader $loader*/
$loader = require_once 'vendor/autoload.php';
echo '[Preloading] Ended'.PHP_EOL;

View file

Before

Width:  |  Height:  |  Size: 122 B

After

Width:  |  Height:  |  Size: 122 B

View file

Before

Width:  |  Height:  |  Size: 122 B

After

Width:  |  Height:  |  Size: 122 B

View file

Before

Width:  |  Height:  |  Size: 111 B

After

Width:  |  Height:  |  Size: 111 B

View file

Before

Width:  |  Height:  |  Size: 111 B

After

Width:  |  Height:  |  Size: 111 B

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 700 B

After

Width:  |  Height:  |  Size: 700 B

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 699 B

After

Width:  |  Height:  |  Size: 699 B

View file

Before

Width:  |  Height:  |  Size: 681 B

After

Width:  |  Height:  |  Size: 681 B

View file

Before

Width:  |  Height:  |  Size: 698 B

After

Width:  |  Height:  |  Size: 698 B

View file

Before

Width:  |  Height:  |  Size: 715 B

After

Width:  |  Height:  |  Size: 715 B

View file

Before

Width:  |  Height:  |  Size: 698 B

After

Width:  |  Height:  |  Size: 698 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 696 B

After

Width:  |  Height:  |  Size: 696 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 696 B

After

Width:  |  Height:  |  Size: 696 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 696 B

After

Width:  |  Height:  |  Size: 696 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 696 B

After

Width:  |  Height:  |  Size: 696 B

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

Before

Width:  |  Height:  |  Size: 664 B

After

Width:  |  Height:  |  Size: 664 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 664 B

After

Width:  |  Height:  |  Size: 664 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 664 B

After

Width:  |  Height:  |  Size: 664 B

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

Before

Width:  |  Height:  |  Size: 664 B

After

Width:  |  Height:  |  Size: 664 B

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 646 B

After

Width:  |  Height:  |  Size: 646 B

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 646 B

After

Width:  |  Height:  |  Size: 646 B

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 646 B

After

Width:  |  Height:  |  Size: 646 B

Some files were not shown because too many files have changed in this diff Show more