mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3658be4a44 | ||
|
|
7c206dd392 | ||
|
|
18193f00d7 | ||
|
|
85339d41b0 | ||
|
|
38c3438e52 | ||
|
|
156e18b600 | ||
|
|
5eec7c127b | ||
|
|
8130534405 | ||
|
|
938855b302 | ||
|
|
ed42318732 | ||
|
|
a3c98b1e34 | ||
|
|
46cf908c19 | ||
|
|
5c89df907e | ||
|
|
0c23163a57 | ||
|
|
bac028312a | ||
|
|
e8863e32cd | ||
|
|
361815107f | ||
|
|
f8f932893c | ||
|
|
63c0387e15 | ||
|
|
050bca13e5 | ||
|
|
8bf337bba1 | ||
|
|
dfc5f9c894 | ||
|
|
77426dfbe8 | ||
|
|
de2cd7ec5c | ||
|
|
4e98de314a | ||
|
|
f6899a205a |
46
.env-sail
46
.env-sail
@ -1,23 +1,23 @@
|
||||
APP_NAME=oc
|
||||
APP_ENV=production
|
||||
INSTALLED="false"
|
||||
APP_URL_TYPE="HTTP_X_FORWARDED_HOST"
|
||||
APP_KEY=DYKEBxfEHK1PP4mUbP3gWPtsPZgXh0qX
|
||||
APP_DEBUG=true
|
||||
DEBUG_BAR=true
|
||||
DB_CONNECTION=mysql
|
||||
#DB_HOST=mysql
|
||||
DB_HOST=host.docker.internal
|
||||
DB_DATABASE=oc
|
||||
DB_USERNAME=oc
|
||||
DB_PASSWORD=oc
|
||||
APPLICATION_NAME=Default
|
||||
APPLICATION_REFERENCE=default
|
||||
ADMIN_USERNAME=admin
|
||||
ADMIN_EMAIL=admin@example.com
|
||||
ADMIN_PASSWORD=admin
|
||||
APP_LOCALE=en
|
||||
APP_TIMEZONE=UTC
|
||||
REDIS_CLIENT=phpredis
|
||||
REDIS_HOST=redis
|
||||
REDIS_PORT=6379
|
||||
APP_NAME=oc
|
||||
APP_ENV=production
|
||||
INSTALLED="false"
|
||||
APP_URL_TYPE="HTTP_X_FORWARDED_HOST"
|
||||
APP_KEY=DYKEBxfEHK1PP4mUbP3gWPtsPZgXh0qX
|
||||
APP_DEBUG=true
|
||||
DEBUG_BAR=true
|
||||
DB_CONNECTION=mysql
|
||||
#DB_HOST=mysql
|
||||
DB_HOST=host.docker.internal
|
||||
DB_DATABASE=oc
|
||||
DB_USERNAME=oc
|
||||
DB_PASSWORD=oc
|
||||
APPLICATION_NAME=Default
|
||||
APPLICATION_REFERENCE=default
|
||||
ADMIN_USERNAME=admin
|
||||
ADMIN_EMAIL=admin@example.com
|
||||
ADMIN_PASSWORD=admin
|
||||
APP_LOCALE=en
|
||||
APP_TIMEZONE=UTC
|
||||
REDIS_CLIENT=phpredis
|
||||
REDIS_HOST=redis
|
||||
REDIS_PORT=6379
|
||||
|
||||
16
.env.example
Normal file
16
.env.example
Normal file
@ -0,0 +1,16 @@
|
||||
APP_ENV=local
|
||||
INSTALLED=false
|
||||
APP_KEY=spNWIbUUSkRICcUwBGOaDzgwWsLjqUVq
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=localhost
|
||||
DB_DATABASE=forge
|
||||
DB_USERNAME=forge
|
||||
DB_PASSWORD=forge
|
||||
APPLICATION_NAME=Default
|
||||
APPLICATION_REFERENCE=default
|
||||
ADMIN_USERNAME=$adminUserName
|
||||
ADMIN_EMAIL=admin@example.com
|
||||
ADMIN_PASSWORD=admin123
|
||||
LOCALE=en
|
||||
AUTO_TOKEN=spNWITUUSkRICcUwBGOaDzGwWsLqUVqX
|
||||
APP_TIMEZONE=UTC
|
||||
22
.gitignore
vendored
22
.gitignore
vendored
@ -9,4 +9,24 @@
|
||||
/node_modules
|
||||
/bower_components
|
||||
composer.lock
|
||||
package-lock.json
|
||||
package-lock.json
|
||||
|
||||
|
||||
* text=auto
|
||||
|
||||
*.txt text eol=lf
|
||||
*.xml text eol=lf
|
||||
*.json text eol=lf
|
||||
*.properties text eol=lf
|
||||
*.conf text eol=lf
|
||||
*.sh text eol=lf
|
||||
Dockerfile text eol=lf
|
||||
|
||||
*.awk text eol=lf
|
||||
*.sed text eol=lf
|
||||
*.sh text eol=lf
|
||||
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
|
||||
*.p12 binary
|
||||
20
LICENSE.md
Normal file
20
LICENSE.md
Normal file
@ -0,0 +1,20 @@
|
||||
# The MIT License (MIT)
|
||||
|
||||
|
||||
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.
|
||||
15
README.md
15
README.md
@ -1,6 +1,9 @@
|
||||
<br>
|
||||
<p align="center">
|
||||
<a href="https://openclassify.com"><img src="https://raw.githubusercontent.com/openclassify/openclassify/master/public/openclassify-logo.png" width="250" alt="Openclassify Logo"></a>
|
||||
|
||||
OpenClassify is modular and most advanced open source classified platform build with Laravel included Pyrocms.
|
||||
|
||||
</p>
|
||||
<br>
|
||||
<p align="center">
|
||||
@ -9,17 +12,11 @@
|
||||
</a>
|
||||
<a href="https://packagist.org/packages/openclassify/openclassify" target="_blank"><img class="badge" src="http://poser.pugx.org/openclassify/openclassify/downloads"></a>
|
||||
<a href="https://packagist.org/packages/openclassify/openclassify" target="_blank"><img class="badge" src="http://poser.pugx.org/openclassify/openclassify/license"></a>
|
||||
<a href="https://scrutinizer-ci.com/g/openclassify/openclassify/?branch=master" rel="nofollow"><img src="https://camo.githubusercontent.com/b1809c56d5b15765dabaf72c173e7f9aba9e7b721ccb0036e9db5da62869e6b1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f70656e636c6173736966792f6f70656e636c6173736966792f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572" alt="Scrutinizer Code Quality" data-canonical-src="https://scrutinizer-ci.com/g/openclassify/openclassify/badges/quality-score.png?b=master" style="max-width: 100%;"></a>
|
||||
<a href="https://scrutinizer-ci.com/g/openclassify/openclassify/build-status/master" rel="nofollow"><img src="https://camo.githubusercontent.com/07509845a0eab157141235a794cd09967425222639d63d640d689763250f0da3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f70656e636c6173736966792f6f70656e636c6173736966792f6261646765732f6275696c642e706e673f623d6d6173746572" alt="Build Status" data-canonical-src="https://scrutinizer-ci.com/g/openclassify/openclassify/badges/build.png?b=master" style="max-width: 100%;"></a>
|
||||
<a href="https://scrutinizer-ci.com/code-intelligence" rel="nofollow"><img src="https://camo.githubusercontent.com/9fcde20119b3a44e430ad50f1bb3c2db3db753df9c3b2ade5cd14217a0a971ab/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f70656e636c6173736966792f6f70656e636c6173736966792f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572" alt="Code Intelligence Status" data-canonical-src="https://scrutinizer-ci.com/g/openclassify/openclassify/badges/code-intelligence.svg?b=master" style="max-width: 100%;"></a>
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
### About OpenClassify
|
||||
|
||||
OpenClassify is modular and most advanced open source classified platform build with Laravel included Pyrocms.
|
||||
|
||||
### Install with Docker
|
||||
|
||||
We suggest to use Docker. Nginx, Mysql and PHP 8.2 pre-installed. MacOS, Windows and Ubuntu is supported.
|
||||
@ -84,4 +81,4 @@ This project exists thanks to all the people who [contribute](https://github.com
|
||||
<a href = "https://github.com/openclassify/openclassify/graphs/contributors">
|
||||
<img src = "https://contrib.rocks/image?repo=openclassify/openclassify"/>
|
||||
</a>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
@ -2,8 +2,6 @@
|
||||
|
||||
use Anomaly\Streams\Platform\Notification\Message\MailMessage;
|
||||
use Anomaly\UsersModule\User\Contract\UserInterface;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
/**
|
||||
@ -13,11 +11,8 @@ use Illuminate\Notifications\Notification;
|
||||
* @author PyroCMS, Inc. <support@pyrocms.com>
|
||||
* @author Ryan Thompson <ryan@pyrocms.com>
|
||||
*/
|
||||
class ActivateYourAccount extends Notification implements ShouldQueue
|
||||
class ActivateYourAccount extends Notification
|
||||
{
|
||||
|
||||
use Queueable;
|
||||
|
||||
/**
|
||||
* Redirect here after activating.
|
||||
*
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
use Anomaly\Streams\Platform\Notification\Message\MailMessage;
|
||||
use Anomaly\UsersModule\User\Contract\UserInterface;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
/**
|
||||
@ -13,11 +12,9 @@ use Illuminate\Notifications\Notification;
|
||||
* @author PyroCMS, Inc. <support@pyrocms.com>
|
||||
* @author Ryan Thompson <ryan@pyrocms.com>
|
||||
*/
|
||||
class ResetYourPassword extends Notification implements ShouldQueue
|
||||
class ResetYourPassword extends Notification
|
||||
{
|
||||
|
||||
use Queueable;
|
||||
|
||||
/**
|
||||
* Redirect here after activating.
|
||||
*
|
||||
|
||||
@ -16,11 +16,6 @@ INSERT INTO `{application_reference}_settings_settings` (`created_at`, `created_
|
||||
('2019-07-15 06:48:46', 1, '2019-07-15 06:53:05', 1, 'streams::enabled_locales', 'a:11:{i:0;s:2:\"en\";i:1;s:2:\"fa\";i:2;s:2:\"ar\";i:3;s:2:\"el\";i:4;s:2:\"es\";i:5;s:2:\"fr\";i:6;s:2:\"it\";i:7;s:2:\"nl\";i:8;s:2:\"pt\";i:9;s:2:\"ru\";i:10;s:2:\"tr\";}'),
|
||||
('2020-09-25 11:10:13', 1, '2020-09-25 11:10:13', 1, 'visiosoft.module.advs::latest-limit', '24'),
|
||||
('2020-09-25 11:10:14', 1, '2020-09-25 11:10:14', 1, 'visiosoft.module.advs::popular_ads_limit', '15'),
|
||||
('2020-10-01 10:12:38', 1, '2020-10-01 10:12:38', 1, 'visiosoft.theme.sahibinden::banner_web', '462'),
|
||||
('2020-09-25 11:12:33', 1, '2020-10-01 15:22:19', 1, 'visiosoft.theme.sahibinden::home_bottom', '<p><img alt=\"Home bottom\" src=\"/files/images/home_bottom.jpg\"></p>'),
|
||||
('2020-09-25 11:12:33', 1, '2020-10-01 15:11:10', 1, 'visiosoft.theme.sahibinden::home_bottom_left_categories', '<p><img src=\"/files/images/home-bottom-left-categories.jpg\"></p>'),
|
||||
('2020-09-25 11:12:33', 1, '2020-10-01 15:11:10', 1, 'visiosoft.theme.sahibinden::home_top_latestAds', '<p><img src=\"/files/images/home-top-latestads.jpg\"></p>'),
|
||||
('2020-09-25 11:12:33', 1, '2020-10-01 15:11:10', 1, 'visiosoft.theme.sahibinden::home_bottom_latestAds', '<p><img alt=\"Home bottom latestads\" src=\"/files/images/home-bottom-latestads.jpg\"></p>'),
|
||||
('2020-11-12 06:58:45', 1, '2020-11-16 14:25:22', 1, 'streams::mail_driver', 'log')
|
||||
ON DUPLICATE KEY UPDATE `id` = VALUES(`id`), `sort_order` = VALUES(`sort_order`), `created_at` = VALUES(`created_at`), `created_by_id` = VALUES(`created_by_id`), `updated_at` = VALUES(`updated_at`), `updated_by_id` = VALUES(`updated_by_id`), `key` = VALUES(`key`), `value` = VALUES(`value`);
|
||||
|
||||
@ -28,4 +23,4 @@ COMMIT;
|
||||
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
|
||||
@ -1,87 +1,88 @@
|
||||
volumes:
|
||||
db-store:
|
||||
psysh-store:
|
||||
|
||||
configs:
|
||||
db-config:
|
||||
file: ./docker/mysql/my.cnf
|
||||
|
||||
services:
|
||||
php:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/php/Dockerfile
|
||||
target: ${APP_BUILD_TARGET:-development}
|
||||
container_name: oc_php
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./
|
||||
target: /workspace
|
||||
- type: volume
|
||||
source: psysh-store
|
||||
target: /root/.config/psysh
|
||||
volume:
|
||||
nocopy: true
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
nginx:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/nginx/Dockerfile
|
||||
container_name: ${APP_NAME}_nginx
|
||||
ports:
|
||||
- target: 80
|
||||
published: ${WEB_PUBLISHED_PORT:-80}
|
||||
protocol: tcp
|
||||
mode: host
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./
|
||||
target: /workspace
|
||||
depends_on:
|
||||
- php
|
||||
- database
|
||||
|
||||
database:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/mysql/Dockerfile
|
||||
command: --max_allowed_packet=32505856 # Set max_allowed_packet to 256M (or any other value)
|
||||
ports:
|
||||
- target: 3306
|
||||
published: ${DB_PUBLISHED_PORT:-3306}
|
||||
protocol: tcp
|
||||
mode: host
|
||||
configs:
|
||||
- source: db-config
|
||||
target: /etc/my.cnf
|
||||
volumes:
|
||||
- type: volume
|
||||
source: db-store
|
||||
target: /var/lib/mysql
|
||||
volume:
|
||||
nocopy: true
|
||||
environment:
|
||||
- MYSQL_DATABASE=${DB_DATABASE:-laravel}
|
||||
- MYSQL_USER=${DB_USERNAME:-phper}
|
||||
- MYSQL_PASSWORD=${DB_PASSWORD:-secret}
|
||||
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD:-secret}
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin:latest
|
||||
ports:
|
||||
- "8081:80"
|
||||
depends_on:
|
||||
- database
|
||||
environment:
|
||||
PMA_USER: oc
|
||||
PMA_PASSWORD: oc
|
||||
PMA_HOSTS: database,localhost
|
||||
volumes:
|
||||
db-store:
|
||||
psysh-store:
|
||||
|
||||
configs:
|
||||
db-config:
|
||||
file: ./docker/mysql/my.cnf
|
||||
|
||||
services:
|
||||
php:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/php/Dockerfile
|
||||
target: ${APP_BUILD_TARGET:-development}
|
||||
container_name: oc_php
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./
|
||||
target: /workspace
|
||||
- type: volume
|
||||
source: psysh-store
|
||||
target: /root/.config/psysh
|
||||
volume:
|
||||
nocopy: true
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
nginx:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/nginx/Dockerfile
|
||||
container_name: ${APP_NAME}_nginx
|
||||
ports:
|
||||
- target: 80
|
||||
published: ${WEB_PUBLISHED_PORT:-80}
|
||||
protocol: tcp
|
||||
mode: host
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./
|
||||
target: /workspace
|
||||
depends_on:
|
||||
- php
|
||||
- database
|
||||
|
||||
database:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/mysql/Dockerfile
|
||||
command: --max_allowed_packet=32505856 # Set max_allowed_packet to 256M (or any other value)
|
||||
ports:
|
||||
- target: 3306
|
||||
published: ${DB_PUBLISHED_PORT:-3306}
|
||||
protocol: tcp
|
||||
mode: host
|
||||
configs:
|
||||
- source: db-config
|
||||
target: /etc/my.cnf
|
||||
volumes:
|
||||
- type: volume
|
||||
source: db-store
|
||||
target: /var/lib/mysql
|
||||
volume:
|
||||
nocopy: true
|
||||
environment:
|
||||
- MYSQL_DATABASE=${DB_DATABASE:-laravel}
|
||||
- MYSQL_USER=${DB_USERNAME:-phper}
|
||||
- MYSQL_PASSWORD=${DB_PASSWORD:-secret}
|
||||
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD:-secret}
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin:latest
|
||||
ports:
|
||||
- "8081:80"
|
||||
depends_on:
|
||||
- database
|
||||
environment:
|
||||
PMA_USER: oc
|
||||
PMA_PASSWORD: oc
|
||||
PMA_HOSTS: database,localhost
|
||||
UPLOAD_LIMIT: 10G
|
||||
@ -44,8 +44,8 @@ RUN docker-php-ext-install gd
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN ["chmod", "+x", "./docker/php/entrypoint.sh"]
|
||||
#CMD ["docker/php/entrypoint.sh"]
|
||||
#RUN ["chmod", "+x", "./docker/php/entrypoint.sh"]
|
||||
CMD ["docker/php/entrypoint.sh"]
|
||||
|
||||
FROM base AS development
|
||||
|
||||
|
||||
@ -1,29 +1,119 @@
|
||||
# Contribution Guide
|
||||
|
||||
Thank you for considering contributing! Please review the entire guide before sending a pull request.
|
||||
It's been often said that programming is part art, part science - that because lots of times there's no single, simple solution to a problem; or if there is, we might not know about it. There's also an infamous joke that if there are *n* developers in the room, then there are *n+1* opinions on how things should be done.
|
||||
|
||||
## Bug Reports
|
||||
### The most important thing
|
||||
|
||||
Wes strongly encourages pull requests, not just bug reports.
|
||||
**The code has to work.** Unless you open a PR as a work in progress, the code should be built and tested on a device or emulator. Having people review your code is one thing, but you should not expect them to also *test* the code for you.
|
||||
|
||||
"Bug Report" should contain a title and a clear detailed description of the issue. You should also include as much relevant information as possible and a code sample that demonstrates the issue. The goal of a bug report is to make it easy for yourself - and others - to replicate the bug and develop a fix.
|
||||
### Context
|
||||
|
||||
Remember, bug reports are created in the hope that others with the same problem will be able to collaborate with you on solving it. Do not expect that the bug report will automatically see any activity or that others will jump to fix it. Creating a bug report serves to help yourself and others start on the path of fixing the problem.
|
||||
Some of those might be more urgent than the others, and sometimes you might be under pressure to ship as soon as possible so the code might not be perfect or there won't be any tests or code might not be extendable. **That's ok.**
|
||||
|
||||
## Everyone
|
||||
|
||||
* There is no perfect code: good enough is usually good enough. That being said, try to keep the number of WTFs per minute to a minimum.
|
||||
|
||||

|
||||
|
||||
* Accept that many programming decisions are opinions. Discuss tradeoffs, which you prefer, and reach a resolution quickly.
|
||||
* Ask for clarification. ("I didn't understand. Can you clarify?")
|
||||
* Offer clarification, explain the decisions you made to reach a solution in question.
|
||||
* Avoid using terms that could be seen as referring to personal traits. ("dumb", "stupid"). Assume everyone is intelligent and well-meaning.
|
||||
* Be humble. ("I'm not sure - let's look it up.")
|
||||
* Don't use hyperbole. ("always", "never", "endlessly", "nothing") Don't use sarcasm.
|
||||
* Remember that you're both on the same side - the goal is to make the code better. Understand that sometimes your ideas will be overruled. Even if you do turn out to be right, don't take revenge or say, "I told you so".
|
||||
* Talk synchronously (e.g. chat, screensharing, in person) if there are too many "I didn't understand" or "Alternative solution:" comments. Pull requests should not be the place for long discussions, architectural or otherwise.
|
||||
* Put notes on what's missing or could be improved in the PR description or comments. You can also create an issue with discussion points and possible problems or things to do and discuss it offline.
|
||||
|
||||
## As a code submitter
|
||||
|
||||
* PRs should be about one thing. If you do multiple things in one PR, it's hard to review. If you're fixing stuff as you go, you might want to make atomic commits and then cherry-pick those commits into separate branches, leaving the PR clean.
|
||||
* Try to keep the PRs small. There has been some research to indicate that beyond 400 LOC the ability to detect defects diminishes. (We're talking about LOC proper, unit tests and layouts don't count)
|
||||
* Having a PR description is useful. Additionally, you can also link to the card on Trello.
|
||||
* Ideally, the PR should be finished when submitted. If the PR is work in progress, add (WIP) or [WIP] to the title.
|
||||
* You should have tests that at least cover the logic, and ideally also cover the input/output parameters and methods. (depends on context)
|
||||
|
||||
## As a reviewer
|
||||
|
||||
* Reviewing code is part of a normal workday. You should check for open/updated PRs at least once a day.
|
||||
* Ask, don’t tell. (“What do you think about trying…?” rather than “Don’t do…”)
|
||||
* Offer ways to simplify or improve code.
|
||||
* Code beautification and refactoring ought to be tasks in the next sprint, except for obvious and easy-to-fix things.
|
||||
* Communicate which ideas you feel strongly about and those you don't. Explain your reasons why code should be changed. (Not in line with the style guide? A personal preference?)
|
||||
* If you disagree strongly, consider giving it a few minutes before responding; think before you react.
|
||||
* Offer alternative implementations, but assume the author already considered them. ("What do you think about using a custom validator here?")
|
||||
* If discussions turn too theoretical or touch big architectural questions, move the discussion offline. In the meantime, let the author make the final decision on alternative implementations.
|
||||
* Don't keep the code hostage. Keep in mind the context and the most important thing - does it work?
|
||||
|
||||
## Readability and Cleanliness
|
||||
|
||||
The first step is to make sure that your PHP code is clean and readable so that both you and other developers can easily understand it.
|
||||
|
||||
Make sure to consider the following issues:
|
||||
|
||||
* Is the code formatting written in the same style as the rest of the project?
|
||||
* Is the code well-described with comments or other documentation?
|
||||
* Is it easy to discern the purpose of a given PHP function or class?
|
||||
* Does the code throw exceptions or display appropriate error messages when something goes wrong?
|
||||
* Are any variable, function, or file names unclear or inconsistent?
|
||||
* Are there still large blocks of code commented out that should be deleted?
|
||||
* Are there duplicate sections of code that can be removed or condensed?
|
||||
* Can large files be refactored or broken down into smaller components that are easier to comprehend?
|
||||
|
||||
|
||||
## Which Repository?
|
||||
# Task list to Check
|
||||
|
||||
Please send all issues to the base `openclassify/openclassify` repository in order to keep them consolidated.
|
||||
Send all pull requests to the respective repository in which they apply to and the branch as described below.
|
||||
## General
|
||||
- [ ] The code works
|
||||
- [ ] The code is easy to understand
|
||||
- [ ] Follows coding conventions
|
||||
- [ ] Names are simple and if possible short
|
||||
- [ ] Names are spelt correctly
|
||||
- [ ] Names contain units where applicable
|
||||
- [ ] There are no usages of [magic numbers](http://c2.com/cgi/wiki?MagicNumber)
|
||||
- [ ] No hard coded constants that could possibly change in the future
|
||||
- [ ] All variables are in the smallest scope possible
|
||||
- [ ] There is no commented out code
|
||||
- [ ] There is no dead code (inaccessible at Runtime)
|
||||
- [ ] No code that can be replaced with library functions
|
||||
- [ ] Variables are not accidentally used with null values
|
||||
- [ ] Variables are immutable where possible
|
||||
- [ ] Code is not repeated or duplicated
|
||||
- [ ] No complex/long boolean expressions
|
||||
- [ ] No negatively named boolean variables
|
||||
- [ ] No empty blocks of code
|
||||
- [ ] Ideal data structures are used
|
||||
- [ ] Constructors do not accept null/none values
|
||||
- [ ] Catch clauses are fine grained and catch specific exceptions
|
||||
- [ ] Exceptions are not eaten if caught, unless explicitly documented otherwise
|
||||
- [ ] Files/Sockets and other resources are properly closed even when an exception occurs in using them
|
||||
- [ ] == operator and === (and its inverse !==) are not mixed up
|
||||
- [ ] Floating point numbers are not compared for equality
|
||||
- [ ] Loops have a set length and correct termination conditions
|
||||
- [ ] Blocks of code inside loops are as small as possible
|
||||
- [ ] No methods with boolean parameters
|
||||
- [ ] No object exists longer than necessary
|
||||
- [ ] No memory leaks
|
||||
- [ ] Code is unit testable
|
||||
- [ ] Test cases are written wherever possible
|
||||
- [ ] Methods return early without compromising code readability
|
||||
- [ ] Performance is considered
|
||||
- [ ] Loop iteration and off by one are taken care of
|
||||
|
||||
## Architecture
|
||||
- [ ] [Law of Demeter](https://en.wikipedia.org/wiki/Law_of_Demeter) is not violated
|
||||
- [ ] A class should have only a single responsibility (i.e. only one potential change in the software's specification should be able to affect the specification of the class)
|
||||
- [ ] Classes, modules, functions, etc. should be open for extension, but closed for modification
|
||||
- [ ] Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program
|
||||
- [ ] Many client-specific interfaces are better than one general-purpose interface.
|
||||
- [ ] Depend upon Abstractions. Do not depend upon concretions.
|
||||
|
||||
|
||||
## Which Branch?
|
||||
|
||||
All bug fixes should be sent to the latest stable branch. Bug fixes should never be sent to the master branch unless they fix features that exist only in the upcoming release.
|
||||
|
||||
Minor features that are fully backwards compatible with the current release may be sent to the latest stable branch.
|
||||
|
||||
Major new features should always be sent to the master branch, which contains the upcoming release.
|
||||
## Security
|
||||
- [ ] All data inputs are checked (for the correct type, length/size, format, and range)
|
||||
- [ ] Invalid parameter values handled such that exceptions are not thrown
|
||||
- [ ] No sensitive information is logged or visible in a stacktrace
|
||||
|
||||
|
||||
## Security Vulnerabilities
|
||||
|
||||
@ -16,6 +16,10 @@ The `--seed` flag causes the addon to be seeded as well.
|
||||
php artisan addon:install anomaly.module.store --seed
|
||||
```
|
||||
|
||||
### Install All modules and migrate
|
||||
|
||||
Clone modules & themes and run this command:
|
||||
|
||||
```bash
|
||||
php artisan migrate --all-addons
|
||||
```
|
||||
|
||||
34
install.sh
34
install.sh
@ -5,38 +5,6 @@ echo "----------------- Openclassify -----------------"
|
||||
echo "----- Automated install script with Docker -----"
|
||||
echo "================================================"
|
||||
|
||||
if [[ $(which docker) && $(docker --version) ]]; then
|
||||
docker --version
|
||||
|
||||
#if ubuntu install docker
|
||||
if [ -n "$(uname -a | grep Ubuntu)" ]; then
|
||||
if ! docker info > /dev/null 2>&1; then
|
||||
systemctl --user start docker-desktop
|
||||
echo "Docker is not running. I've started for you. Run it again"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
else
|
||||
#if ubuntu install docker
|
||||
if [ -n "$(uname -a | grep Ubuntu)" ]; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install ca-certificates curl gnupg
|
||||
sudo install -m 0755 -d /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||
sudo chmod a+r /etc/apt/keyrings/docker.gpg
|
||||
echo \
|
||||
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
|
||||
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
|
||||
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
sudo apt-get update
|
||||
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
|
||||
|
||||
else
|
||||
echo "Install docker and come back later"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
docker --version
|
||||
cp .env-sail .env
|
||||
docker compose up
|
||||
@ -1,15 +0,0 @@
|
||||
const mix = require('laravel-mix');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mix Asset Management
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Mix provides a clean, fluent API for defining some Webpack build steps
|
||||
| for your Laravel applications. By default, we are compiling the CSS
|
||||
| file for the application as well as bundling up all the JS files.
|
||||
|
|
||||
*/
|
||||
|
||||
mix.js('resources/assets/js/app.js', 'public/js')
|
||||
.vue().version();
|
||||
Loading…
Reference in New Issue
Block a user