mirror of
https://github.com/april-knights/Squire.git
synced 2025-12-05 22:20:55 +00:00
Core files for the Squire 2 web application.
| .docker | ||
| .github | ||
| app | ||
| bootstrap | ||
| config | ||
| database | ||
| public | ||
| resources | ||
| routes | ||
| storage | ||
| tests | ||
| .editorconfig | ||
| .env.default | ||
| .env.prod | ||
| .gitattributes | ||
| .gitignore | ||
| .styleci.yml | ||
| artisan | ||
| CODE_OF_CONDUCT.md | ||
| composer.json | ||
| composer.lock | ||
| CONTRIBUTING.md | ||
| CSS Notes | ||
| LICENSE | ||
| MiscChangeLog.txt | ||
| package-lock.json | ||
| package.json | ||
| phpunit.xml | ||
| README.md | ||
| readme.txt | ||
| server.php | ||
| webpack.mix.js | ||
Squire
Dev Setup (using Docker)
- Install Git and Docker (with Compose)
- Clone the repository using
git clone https://github.com/april-knights/Squire.git. - Create a Reddit application and set the redirect URI to
http://localhost/login/reddit/callback. The other fields can be set to anything - Copy
.env.defaultto.envand modify the Reddit client ID and secret to the values you got from Reddit - Run
docker compose up --buildin the.dockerdirectory. Once everything is initialized properly, you can reach the page at http://localhost/ - While the project is running, run the following commands in another window (in the
.dockerdirectory) to have better coding assistance:
docker compose exec app php artisan ide-helper:generate
docker compose exec app php artisan ide-helper:meta # Only if you use PHPStorm
docker compose exec app php artisan ide-helper:models
Dev Setup (running directly)
- Install
git,php,composerandnpm. - Clone the repository using
git clone https://github.com/april-knights/Squire.git. - Enter the
Squiredirectory and runcomposer install. - Copy
.env.exampleto.envand modify whatever you need. - Start the development server using
php artisan serve - While the project is running, run the following commands in another window (in the
.dockerdirectory) to have better coding assistance:
php artisan ide-helper:generate
php artisan ide-helper:meta # Only if you use PHPStorm
php artisan ide-helper:models
Compiling CSS/JS changes
- Install the required Javascript dependencies using
npm install. - Run
npm run devto recompile css and js files.
Automatically recompile CSS/JS and refresh browser
- Change the redirect_uri in
.envand on reddit to127.0.0.1:3000. - Run
npm run watch. Whenever you make a change to the application, your browser is automatically reloaded.
Deployment
- Properly set up your webserver.
- Install
git,phpandcomposer. - Clone the repository using
git clone https://github.com/april-knights/Squire.git. - Enter the
Squiredirectory and runcomposer install --optimize-autoloader --no-dev. - Install the required Javascript dependencies using
npm install. - Run
npm run prodto generate the minified static files. - Copy
.env.prodto.envand set up the DB connection and Reddit API. - Run
php artisan key:generateto generate an app key for secure session storage. - Run
php artisan config:cacheto combine all config files into a single one. Rerun this whenever you make changes to.env! - Point your webserver to
squire/public.