Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
275 commits
Select commit Hold shift + click to select a range
1416283
Merge branch 'development' of https://github.com/Velocities/ShopFast …
Velocities Jan 13, 2024
112046d
Update build script for faulty npm run build command
Velocities Jan 13, 2024
873ad46
Update UI to employ more reactive page
Jan 16, 2024
bc3e55c
Start implementing Sign in with Google
Velocities Jan 16, 2024
44f3dff
Resolve merge conflict
Velocities Jan 16, 2024
34ca43c
Implement authentication as a service
Velocities Jan 18, 2024
25e8c4c
Fix SQL script for sqlite usage; was using mysql syntax
Velocities Jan 20, 2024
97a7a2e
Implement and test SQL-injection-safe querying and generify stream re…
Velocities Jan 27, 2024
f96ff50
Remove previously used code in favor of SQL-injection code
Velocities Jan 27, 2024
37cef20
Adjust naming scheme to use new name free of trademark issues
Velocities Jan 27, 2024
f06f840
Adjust naming of API call in API JavaScript testing file
Velocities Jan 27, 2024
e1baeb9
Update README with deployed link and updated architecture
Velocities Jan 27, 2024
f639a42
Clean up unnecessary code
Velocities Jan 28, 2024
43b1042
Clean up unnecessary PHP code
Velocities Jan 28, 2024
1495208
Update build script to use also updated JavaScript script for creatin…
Velocities Jan 28, 2024
7a25309
Update Privacy Policy to indicate usage of HTTPS with warning that pl…
Velocities Jan 28, 2024
629e5ad
Update folder structure for documentation and JavaScript script for r…
Velocities Jan 28, 2024
9e942b5
Update sanitization of table name in database class and clean up more…
Velocities Jan 29, 2024
2498218
Update document with new architecture link and document update log
Velocities Jan 29, 2024
094737c
Implement Issue #19 - API caller return results choice
Velocities Feb 1, 2024
95b08d0
Remove unnecessary type reconstruction from API call results
Velocities Feb 1, 2024
a2d2195
Comment out console logs that only work on associative array return t…
Velocities Feb 1, 2024
55b1c1e
Add better security for DELETE SQL command to protect against injecti…
Velocities Mar 5, 2024
57caccf
Create basic development procedural documents for SpeedCart team
Velocities Mar 13, 2024
017acfa
Update React list component and API DELETE contact interaction
Velocities Mar 13, 2024
e3a0bce
Reorganize React components into individual folders, implement barrel…
Mar 15, 2024
1559094
Update database interactions in PHP code and way of calling DELETE me…
Velocities Mar 16, 2024
80ae95d
Stash temporary ListManager.php file; not fully functional yet
Velocities Mar 16, 2024
e33fcf3
Merge branch 'development' of github.com:Velocities/ShopFast into dev…
Velocities Mar 16, 2024
b2b0a23
Update CORS management and remove unnecessary portions of DataManager
Velocities Mar 20, 2024
0e3de29
Update logging path and add local symbolic link for new path, fix URL…
Velocities Mar 21, 2024
5ecd88e
Add new Laravel folder for integration testing
Velocities Mar 27, 2024
a592aae
Start migrating PHP code to Laravel framework
Velocities Mar 30, 2024
969b2f1
Begin reCAPTCHA integration for site protection from bots
Velocities Apr 13, 2024
86a001c
Fix deleteRecords method bug in Database class
Velocities May 16, 2024
17729f3
Start migrating Google verification API endpoint to Laravel
Velocities May 17, 2024
8a00524
Remove all unnecessary fields from Users table schema
Velocities May 17, 2024
16ac46e
Update React authentication call to use Laravel implementation
May 17, 2024
d167b61
Save temporary debugging code for ShoppingList component
May 17, 2024
c034f02
Merge branch 'development' of http://www.github.com/Velocities/linode…
May 17, 2024
111b044
Adjust CORS policy to allow different variants of speedcartapp.com fo…
Velocities May 17, 2024
de528a0
Move Google Client ID secret to environment variables for security
Velocities May 18, 2024
cce7903
Remove unnecessary CSS and adjust component names and placement for c…
May 18, 2024
6086c17
Move NewShoppingList page to pages folder; custom hook may be develop…
May 18, 2024
f18b43c
Add custom quantity component for specifying quantity of a given item
May 18, 2024
5b1538e
Relocate Google authentication to Middleware and remove old version
Velocities May 24, 2024
37f33d0
Modify table usage and integrate Google authentication as middleware …
Velocities May 24, 2024
422da64
Add DEBUG_MODE condition for logging debug statements
Velocities May 24, 2024
ce53ab3
Make quantity values usable by parent component and fix onChange infi…
May 24, 2024
7a5387a
Modify usage of Authorization Header Bearer token for proper Laravel …
May 24, 2024
a227c2a
Merge branch 'development' of http://www.github.com/Velocities/linode…
May 24, 2024
4400267
Fix production with new migration and remove old migrations, then cha…
Velocities May 27, 2024
eec0ad1
Add list title retrieval and list deletion functionality to Dashboard…
May 27, 2024
0a9c2c0
Add list title retrieval and list deletion functionality on Laravel b…
Velocities May 27, 2024
eed0e61
Merge branch 'development' of github.com:Velocities/ShopFast into dev…
Velocities May 27, 2024
d9bf029
Fix unnecessary scrollbar for navigation bar width
May 27, 2024
1426386
Remove unused CSS styles
May 28, 2024
fa6eafb
Compartmentalize CSS for TransitionSection component
May 28, 2024
4a10625
Remove old links for previous API endpoints that were used prior to L…
May 28, 2024
79c037a
Start working on making footer positioning sticky
Velocities May 31, 2024
76ad91b
Adjust footer style and positioning for better visual design
Jun 1, 2024
5824ea1
Update look and feel of site for footer, home page and login page button
Jun 1, 2024
60290fd
Remove unnecessary Footer element duplicate from pages
Velocities Jun 1, 2024
aa93e69
Remove unnecessary class modification for children elements in Transi…
Velocities Jun 1, 2024
98c8e2f
Remove unused code for previous site configurations
Velocities Jun 2, 2024
1745625
Make list items saveable and removeable with Laravel
Velocities Jun 2, 2024
b4c9aca
Make lists saveable on front-end
Jun 2, 2024
7ec0697
Merge branch 'development' of http://www.github.com/Velocities/linode…
Jun 2, 2024
6cf8651
Implement list item and title retrieval in Laravel project
Velocities Jun 2, 2024
6e784cc
Implement shopping list retrieval with React Router and new custom Hooks
Jun 2, 2024
c1bc19e
Merge branch 'development' of http://www.github.com/Velocities/linode…
Jun 2, 2024
aa9fd3d
Remove unnecessary Footer container and relocate associated CSS to fo…
Jun 2, 2024
808ef88
Relocate background-gradient and other global site styles from Naviga…
Jun 4, 2024
25e231f
Make background-gradient fixed for Issue #23
Jun 4, 2024
ab6cba3
Remove necessity for extra container for Footer component for Issue #26
Jun 4, 2024
f1b051f
Enhance error handling for Dashboard page for Issue #25
Jun 4, 2024
36cbdde
Make fullHeightContainer class content height 92 to fill space, even …
Jun 4, 2024
51c7209
Update app architecture for Issue #27
Jun 6, 2024
0f2ae7b
Create custom component for shopping list items for Issue #24
Jun 6, 2024
a5b8dc0
Make ShoppingListItem component more modular and clarify its usage
Jun 6, 2024
eba2ba1
Convert remaining component styles, except App and root (in index), t…
Jun 8, 2024
ad11530
Implement Issue #32
Jun 9, 2024
f8b0c5a
Implement Issue #29
Jun 9, 2024
a15cff4
Implement Issue #31 and change default site title to more clearly rep…
Jun 9, 2024
3d69fa6
Make footer links vertically centered
Velocities Jun 9, 2024
0609bf5
Remove unused routes in Laravel web.php
Velocities Jun 10, 2024
b7c5216
Implement Issue #30 and #35
Jun 14, 2024
f94314e
Implement Issue #33
Jun 14, 2024
7f74982
Finish implementing Issue #20 and #21
Velocities Jun 14, 2024
92463fc
First container attempt for API folder
Velocities Jun 15, 2024
903add3
Dockerize Laravel Project for Issue #22
Velocities Jun 18, 2024
47deae7
Fix minimum quantity of 0 bug for Issue #37
Velocities Jun 18, 2024
a6d7f79
Implement Issue #36
Velocities Jun 18, 2024
8179a3d
Remove unnecessary files and dependencies in React project
Velocities Jun 19, 2024
7252b29
Add frontend CI/CD workflow file
Velocities Jun 19, 2024
6b3166f
Add temporary force npm installation for react-google-login problem w…
Velocities Jun 19, 2024
a777f69
Update version of React project
Velocities Jun 19, 2024
f69cbd8
Update build script for CI/CD front end pipeline
Velocities Jun 19, 2024
0b25352
Fix file paths for CI/CD front end pipeline
Velocities Jun 19, 2024
1fe0f96
Third workflow attempt
Velocities Jun 19, 2024
64de8ac
Update build script again:
Velocities Jun 19, 2024
52f2dc0
Remove ESLint check in front end workflow
Velocities Jun 19, 2024
03a7741
Sync version number in env.test with env
Velocities Jun 19, 2024
2c0cadb
Swap npm run build with running build script instead
Velocities Jun 19, 2024
e4f0564
Restore old build folder content removal command in build script
Velocities Jun 19, 2024
d487234
Update workflow for proper usage on GitHub Actions
Velocities Jun 19, 2024
4a0296d
Update build scripts for proper usage on GitHub Actions
Velocities Jun 19, 2024
c93750b
Adjust workflow file again
Velocities Jun 19, 2024
753c777
Make updates to resolve npm build issues on workflow
Velocities Jun 19, 2024
43373d2
Adjust file path for workflow generateHTML script
Velocities Jun 19, 2024
cb1ad20
Remove unnecessary generateHTML script call in workflow
Velocities Jun 19, 2024
c6dad04
Move SpeedCart logo into assets/images folder and adjust correspondin…
Velocities Jun 19, 2024
b0ac1e4
Adjust environment variables for workflow run step
Velocities Jun 19, 2024
7324ac3
Make BASE_URL in custom hooks dynamic with existing environment varia…
Velocities Jun 19, 2024
10053f9
Update frontend.yml
Velocities Jun 19, 2024
7a7b86b
Change siteLogoImg from id to class to allow for reuse of logo
Velocities Jun 19, 2024
785f3d3
Merge branch 'development' of github.com:Velocities/ShopFast into dev…
Velocities Jun 19, 2024
9abeeb9
Add echo for testing GitHub Actions secrets
Velocities Jun 19, 2024
48f3a25
Implement barreling for Home page component
Velocities Jun 19, 2024
bd2c21e
Move echo statements
Velocities Jun 19, 2024
1c043a9
Implement barreling for Login component
Velocities Jun 19, 2024
cb28439
Remove unnecessary laravelTesting script
Velocities Jun 20, 2024
2336a60
Add build script run to ssh step
Velocities Jun 20, 2024
9d18c98
Bring back old functional scripts
Velocities Jun 20, 2024
b3244c7
Make build script call full path
Velocities Jun 20, 2024
81ae5f3
Update old functional build script with comments
Velocities Jun 20, 2024
b2374d5
Force npm to work with CI workflow
Velocities Jun 20, 2024
354c7ae
Another change test for workflow
Velocities Jun 20, 2024
2097368
Add check for generateHTML script for workflow
Velocities Jun 20, 2024
99faed4
Adjust file path for workflow execution
Velocities Jun 20, 2024
1178da1
Make front end rebuild whenever legal docs change too
Velocities Jun 20, 2024
c8ba6a1
Start working on front end README for React project practices and con…
Velocities Jun 20, 2024
215a12c
Add starter field names for NewShoppingList component
Jun 20, 2024
8cc6c55
Add basic field names and starter layout design for NewShoppingList c…
Jun 21, 2024
6d57621
Make database a volume so php containers are actually stateless (bug …
Velocities Jun 22, 2024
ea115fb
Implement Issue #40
Velocities Jun 22, 2024
91d0e98
Add CI/CD workflow file for Backend Deployment
Velocities Jun 22, 2024
044f277
Backend workflow test 1
Velocities Jun 22, 2024
e2d0f20
Backend workflow test 2
Velocities Jun 22, 2024
c6f807e
Update volumes for nginx container
Velocities Jun 22, 2024
5dfe286
Add debug flag and master version to ssh-action step in backend workf…
Velocities Jun 22, 2024
f69a25b
Another workflow test
Velocities Jun 22, 2024
2cac23d
Add dependency and cache handling for php build (DevOps bug fix attempt)
Velocities Jun 23, 2024
832baf3
Debug workflow again
Velocities Jun 23, 2024
0623944
Remove cache clearing from backend workflow
Velocities Jun 23, 2024
5a45fcd
One more test
Velocities Jun 23, 2024
407ad64
Pinpoint composer image version to try fixing deployment bug for backend
Velocities Jun 23, 2024
dca16ef
Account for environment variables on automatic GitHub Actions backend…
Velocities Jun 23, 2024
8cec59f
Comment out phpinfo path for another test
Velocities Jun 23, 2024
3a7b5dd
Test without compose installation for backend workflow
Velocities Jun 23, 2024
76648e1
Compose installation step needed in workflow (add back in)
Velocities Jun 23, 2024
5071e31
Remove apiResource commented out code
Velocities Jun 23, 2024
432174b
Uninstall deprecated react-google-login package
Jun 23, 2024
071c478
Implement Issue #39
Jun 23, 2024
09072f9
Merge branch 'development' of http://www.github.com/Velocities/linode…
Jun 23, 2024
2b2ed2a
Implement Issue #43
Velocities Jun 28, 2024
fd0550a
Implement Issue #42
Velocities Jun 28, 2024
00b284f
Remove old logs symlink
Velocities Jun 28, 2024
ef7c100
First additions and attempts at Dashboard UI changes for Issue #44 im…
Jun 28, 2024
384b19e
Implement Issue #44 Back End changes
Velocities Jun 28, 2024
d50fedd
Make final front end changes for Issue #44
Jun 28, 2024
55dac54
Merge branch 'development' of github.com:Velocities/ShopFast into dev…
Velocities Jun 28, 2024
587cf29
First attempt at Issue #45
Jun 29, 2024
dcd3c7f
Remove logging and database code that's been replaced by built-in Lar…
Velocities Jun 30, 2024
65f86c2
Turn off debugging for GoogleAuthentication Middleware logging
Velocities Jun 30, 2024
289219a
Comment out or remove unnecessary console logging, refactor Navigatio…
Jun 30, 2024
e655ab6
Implement Issue #47
Jul 3, 2024
dde8d75
Add npm dependency installation to build script
Velocities Jul 3, 2024
5790952
Create new layout styling and media queries for footer for smaller de…
Jul 5, 2024
23ae71c
Update REACT_APP_VERSION in .env file
Jul 5, 2024
c15e5a7
Remove unnecessary BodyClassSetter component and fix semantics of pag…
Jul 6, 2024
c6bde45
Update front end version numbers in package.json and package-lock.json
Jul 6, 2024
bff65ff
Adjust sizing of IntegerQuantityValue and trashBin buttons
Jul 9, 2024
f13f7fc
Make new SaveButton modular component and use it in all relevant page…
Jul 9, 2024
de3b54b
Make modular AddShoppingListItemComponent and use in all relevant pages
Jul 9, 2024
c4c9b62
Implement Issue #34
Jul 11, 2024
d91ea55
Bring content of ShoppingListDetail page component more inward for be…
Jul 11, 2024
73cf7d9
Remove previous debugging code for Login jwt
Jul 12, 2024
56c73ca
Make SaveButton component have mouse be pointer/click on hover
Jul 12, 2024
8aa3240
Implement reset button for Issue #49
Jul 12, 2024
33c8aea
Make form buttons and other header content sticky for Issue #49 via c…
Jul 12, 2024
ca70d2c
Add multiple Add Items feature for Issue #49
Jul 12, 2024
62cc86b
Refactor IntegerQuantityValue to follow React pattern of lifting stat…
Jul 19, 2024
e3a79e6
Remove unnecessary CSS from Dashboard module css
Jul 19, 2024
f9f53de
Implement Issue #41 on backend
Velocities Jul 25, 2024
1900317
Save progress on backend Issue #41
Velocities Jul 25, 2024
b011d7d
Implement Issue #41 on frontend
Jul 25, 2024
cbe5978
Merge branch 'development' of http://www.github.com/Velocities/linode…
Jul 25, 2024
9fbd320
Merge branch 'development' of github.com:Velocities/ShopFast into dev…
Velocities Jul 25, 2024
a2092ee
Make aesthetic and usability improvements for Issue #41 (Dashboard co…
Jul 28, 2024
7ef09e1
Save progress on Issue #41 backend final changes
Velocities Jul 28, 2024
281c9b6
Merge branch 'development' of github.com:Velocities/ShopFast into dev…
Velocities Jul 28, 2024
03f38ca
Implement Issue #50 on backend
Velocities Aug 5, 2024
6864282
Add migration command to automated backend deployment script to ensur…
Velocities Aug 5, 2024
7e75a43
Migrate backend script to use docker compose instead of docker-compos…
Velocities Aug 5, 2024
9768567
Comment out debug log for cookie setting
Velocities Aug 5, 2024
c4db0e7
Implement Issue #50 on frontend
Aug 5, 2024
cb274e1
Cleanup old logging in frontend
Aug 5, 2024
b4bb71c
Merge branch 'development' of http://www.github.com/Velocities/linode…
Aug 5, 2024
e95297b
Add redirect feature for successful login
Aug 6, 2024
7561592
Add timeout to fix Race condition bug with temporary message area for…
Aug 6, 2024
01c2850
Make first implementation for Issue #52
Aug 9, 2024
2ef6ec5
Save progress for final permissions changes for Issue #41
Velocities Aug 9, 2024
682d3ab
Merge branch 'development' of github.com:Velocities/ShopFast into dev…
Velocities Aug 9, 2024
2e06cf9
Add error messages to all current StatusModal instances for Issue #52
Aug 10, 2024
e129437
Merge branch 'development' of github.com:Velocities/ShopFast into dev…
Velocities Aug 10, 2024
86efc1b
Finish robust redirection for Issue #34
Aug 10, 2024
1476ce3
Merge branch 'development' of github.com:Velocities/ShopFast into dev…
Velocities Aug 10, 2024
9a9128b
Make first file and folder structure changes for Issue #53
Aug 10, 2024
913f6b0
Implement Issue #53
Aug 18, 2024
bb68a91
Update web build script and automated deployment for reorganized fron…
Aug 19, 2024
0614bed
Update frontend script for missed mistake in previous commit
Aug 19, 2024
ab0bef3
Add updated comment to web build script
Aug 19, 2024
69530a5
Another mistake catch for previous commit
Aug 19, 2024
05a03d6
Update comment in build script for generateHTML step
Aug 19, 2024
9cc85f9
Update GitHub Actions script to account for shared package
Aug 19, 2024
b36c5fd
Update build script for using workspaces
Aug 19, 2024
01a6888
Try fixing scripts
Aug 19, 2024
0460359
Workspace not found fix attempt
Aug 20, 2024
d967722
Update frontend version number for web
Aug 20, 2024
aed6ca4
Merge branch 'development' of github.com:Velocities/ShopFast into dev…
Velocities Aug 20, 2024
e5f9874
Adjust build script organization and related paths for updated Fronte…
Velocities Aug 24, 2024
e821de6
Remove build for React Native app from Frontend build script
Velocities Aug 24, 2024
897369b
Change path of build script directory in frontend workflow
Velocities Aug 24, 2024
d899de0
Update jsconfig.json path for shared package
Velocities Aug 24, 2024
2178e18
Finalize fixes for React Native app and testing shared package for Is…
Sep 8, 2024
4fe6842
New Google Sessions (#55)
Velocities Sep 18, 2024
ca5d853
Improved Terms Enforcement (#58)
Velocities Sep 20, 2024
2483891
Shared folder ts refactor (#60)
Velocities Oct 9, 2024
a709967
Implement Issue #61 (#63)
Velocities Oct 16, 2024
160753e
Changes for Issue #64 (#65)
Velocities Nov 8, 2024
5f91ceb
Issue #66 Implementation (#67)
Velocities Nov 15, 2024
e5bf45b
Optimize build script for Issue #62 (#69)
Velocities Nov 24, 2024
c0643f2
Frontend Buildscript fix (#70)
Velocities Nov 24, 2024
8bc897d
Add debugging statement for workflow fix
Velocities Nov 24, 2024
267dccb
Field names final changes for issue 49 (#68)
Velocities Nov 29, 2024
a9f4eee
Update deployment files for new arrangement of HTTPS certificates
Velocities Dec 16, 2024
16e43c6
Issue #71 Implementation (#73)
Velocities Dec 20, 2024
c797d23
Bug fix for items to be deleted in ShoppingListDetailWithProvider
Velocities Dec 20, 2024
7596afb
Issue #72 Implementation (#74)
Velocities Dec 20, 2024
2369d88
Fix alignment of SitePolicies component content
Velocities Dec 23, 2024
f428356
STAGE 1 - Frontend auth testing fix 76 (#77)
Velocities Mar 18, 2025
5843335
fix: Update necessary configurations for recent Frontend and backend …
Velocities Mar 18, 2025
3975838
Update backend build script to cd into new directory for docker-compose
Velocities Mar 18, 2025
1e93468
Fix environment variables not copying into container properly
Velocities Mar 20, 2025
640d5b3
Modify frontend setup 78 (#79)
Velocities Mar 20, 2025
7ff6aa2
Frontend auth testing fix 76 stage2 (#80)
Velocities May 5, 2025
db47d2f
add: instructions for how to set up Laravel in WSL for faster Windows…
Velocities May 15, 2025
3a5430c
update: Laravel API setup for DigitalOcean hosting and Frontend usage…
Velocities May 19, 2025
0e4a035
fix: context directory for Laravel API so Docker can build properly (…
Velocities May 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Backend Deployment

on:
# Allows manual deployment
workflow_dispatch:
push:
# Triggers only when code is pushed to the development branch
# that modifies files in the API directory
branches:
- deployment # production
- development # development

paths:
- 'API/**'

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: ./API
file: ./API/docker/production/Dockerfile
push: true
# If the branch is deployment, tag the image with prod (otherwise, tag it with dev)
tags: |
${{ secrets.IMAGE_NAME }}:${{ github.ref == 'refs/heads/deployment' && 'prod' || 'dev' }}

trigger-do-deployment:
needs: build-and-push
runs-on: ubuntu-latest
steps:
- name: Trigger DigitalOcean App Platform redeploy
# We have two apps, one for prod and one for dev
run: |
APP_ID=${{ github.ref == 'refs/heads/deployment' && secrets.DO_APP_ID_PROD || secrets.DO_APP_ID_DEV }}
curl -X POST "https://api.digitalocean.com/v2/apps/$APP_ID/deployments" \
-H "Authorization: Bearer ${{ secrets.DO_API_TOKEN }}"
48 changes: 48 additions & 0 deletions .github/workflows/backend_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Run Laravel API Feature Tests

on:
pull_request:
branches:
- development
paths:
- 'API/**'

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2' # the PHP version this project requires
extensions: mbstring, pdo_sqlite
ini-values: |
memory_limit=-1
coverage: none

- name: Install dependencies
run: |
cd API
composer install --prefer-dist --no-interaction
cp .env.test .env

- name: Configure environment for SQLite in-memory database
run: |
cd API
echo "DB_CONNECTION=sqlite" >> .env
echo "DB_DATABASE=:memory:" >> .env
php artisan key:generate

- name: Run migrations
run: |
cd API
php artisan migrate --force

- name: Run tests
run: |
cd API
php artisan test --testsuite=Feature
44 changes: 44 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Frontend Deployment

on:
# Allows manual deployment
workflow_dispatch:
push:
# Triggers only when code is pushed to the development branch
# that modifies files in the Frontend or docs/legal directories
branches:
- development

paths:
- 'Frontend/**'
- 'docs/legal/**'

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '21.6.0'

- name: Install dependencies
run: cd Frontend && npm install --force # This should install all dependencies, regardless of the workspace

- name: Build front end
env:
CI: false
run: cd Frontend && npm run build # This makes sure the build succeeds before running it on the production server

- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CF_PAGES_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
projectName: "speedcart"
directory: "Frontend/speedcart-react/build"
branch: "development"
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
*.db
*.log
node_modules/
src/test.php
src/test.php
*.phpunit.result.cache
shopfast-react/build/api/*
vendor/*
18 changes: 18 additions & 0 deletions API/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2

[docker-compose.yml]
indent_size = 4
65 changes: 65 additions & 0 deletions API/.env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_TIMEZONE=UTC
APP_URL=http://localhost
FRONTEND_BASE_URL=www.speedcartapp.com

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US

APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database

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_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=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}"
11 changes: 11 additions & 0 deletions API/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
* text=auto eol=lf

*.blade.php diff=html
*.css diff=css
*.html diff=html
*.md diff=markdown
*.php diff=php

/.github export-ignore
CHANGELOG.md export-ignore
.styleci.yml export-ignore
19 changes: 19 additions & 0 deletions API/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/.phpunit.cache
/node_modules
/public/build
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.env.backup
.env.production
.phpunit.result.cache
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
/.fleet
/.idea
/.vscode
88 changes: 88 additions & 0 deletions API/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
## Development Setup on Windows with WSL2 for Blazing Fast Laravel Docker Performance

### Why This Setup?

By default, mounting your Laravel project from the Windows filesystem (`C:\...`) into Docker containers on Windows causes **extremely slow file I/O**, leading to very long request times (up to several seconds per request). This is due to the way Windows handles filesystem mounts and is a common pain point.

To fix this, we move the project files into the **native Linux filesystem inside WSL2** and run Docker from there, resulting in massive performance improvements (down to milliseconds per request).

---

### Step-by-step Setup Instructions

### VSCode extension install
For simplicity, you should develop with VSCode with the WSL extension installed
so you can easily develop this Laravel app after getting the Ubuntu WSL setup steps done
as part of step 1. This extension will come in handy by step 2.
This is the WSL extension: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl

#### 1. Start your WSL2 Ubuntu distro

Open PowerShell or Windows Terminal and run:

```bash
wsl -d Ubuntu
```

### 2. Create a projects folder and copy the repo into WSL

Inside the WSL terminal:

```bash
mkdir -p ~/projects
cp -r yourmounteddirectory/API ~/projects/SpeedCart
cd ~/projects/SpeedCart/API
```
Replace `yourmounteddirectory` with the directory that WSL goes to in vscode after you finish the startup
from step 1. You can see that you only need to copy the API folder into the container because this is just
for the Laravel app.
(should look something like `/mnt/c/Users/Admin/Desktop/Repos/SpeedCart` or similar depending on where
you store this repo)

### 3. Open the project in VSCode with WSL integration

Run:
```bash
code .
```
This will open the project in VSCode connected directly to WSL.

### 4. Enable Docker integration for your Ubuntu WSL distro
Open Docker Desktop on Windows.

Go to Settings > Resources > WSL Integration.

Enable the toggle for your Ubuntu distro.

Click Apply & Restart if prompted.

### 5. Verify Docker inside WSL
Back in your Ubuntu terminal, test Docker:

```bash
docker --version
docker compose version
```
You should see version info confirming Docker works inside WSL.

### 6. Run your Laravel containers
Inside the WSL terminal in your project folder:

```bash
cd docker/development
docker compose up -d --build
```

While still in the WSL terminal, be sure to run migrations to build the database tables:
```bash
docker exec -it laravel_dev sh
php artisan migrate
```

Enjoy lightning-fast performance thanks to native Linux filesystem speeds inside WSL.

## Git workflow
Since your code lives inside WSL's Linux filesystem, you can use Git as usual inside WSL:

## Optional: Running Composer & Node inside WSL
For best performance, install Composer and Node directly in your WSL Ubuntu environment to run commands like composer install and npm install super fast without Windows filesystem overhead.
Loading
Loading