Skip to content

Commit d5d7df0

Browse files
committed
Combine glick-api and glick-app repos
1 parent fcb9ec2 commit d5d7df0

File tree

11 files changed

+65
-98
lines changed

11 files changed

+65
-98
lines changed

app/.github/workflows/js.yml renamed to .github/workflows/js.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ jobs:
1010
node-version: '22'
1111
- uses: actions/checkout@v3
1212
- run: yarn install
13+
working-directory: app
1314
- run: yarn run lint
15+
working-directory: app

api/.github/workflows/php.yml renamed to .github/workflows/php.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,8 @@ jobs:
1111
php-version: '8.4'
1212
- uses: actions/checkout@v3
1313
- run: composer install
14+
working-directory: api
1415
- run: ./vendor/bin/phpcs
16+
working-directory: api
1517
- run: ./vendor/bin/phpunit --coverage-text
18+
working-directory: api

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
TODO.md
3+
.gitcommit
File renamed without changes.

api/README.md renamed to README.md

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Glick API
1+
# Glick
22

33
[View the site](https://glick.jennybelanger.com/).
44

@@ -8,20 +8,21 @@
88

99
- [Composer](https://getcomposer.org/)
1010
- [Git](https://git-scm.com/)
11+
- [Yarn](https://classic.yarnpkg.com/en/docs/install)
1112
- Database
1213
- Web server with PHP
1314

1415
### Setup
1516

1617
``` bash
17-
# Clone the API repo
18-
git clone https://github.com/jlbelanger/glick-api.git
19-
cd glick-api
18+
# Clone the repo
19+
git clone https://github.com/jlbelanger/glick.git
2020

21-
# Configure the environment settings
21+
# Configure the PHP environment settings
22+
cd glick/api
2223
cp .env.example .env
2324

24-
# Install dependencies
25+
# Install PHP dependencies
2526
composer install
2627

2728
# Generate key
@@ -36,45 +37,75 @@ chown -R www-data:www-data storage
3637

3738
# Create account with username "test" and password "password" (or reset existing account password to "password")
3839
php artisan auth:reset-admin
40+
41+
# Configure the JS environment settings
42+
cd ../app
43+
cp .env.example .env
44+
cp .env.example .env.production
45+
cp cypress.env.example.json cypress.env.json
46+
47+
# Install JS dependencies
48+
yarn install
49+
```
50+
51+
### Run
52+
53+
``` bash
54+
cd app && yarn start
3955
```
4056

41-
Then, setup the [Glick app](https://github.com/jlbelanger/glick-app).
57+
Your browser should automatically open http://localhost:3000/
4258

4359
### Lint
4460

4561
``` bash
46-
./vendor/bin/phpcs
62+
./api/vendor/bin/phpcs
63+
```
64+
65+
``` bash
66+
cd app && yarn lint
4767
```
4868

4969
### Test
5070

5171
``` bash
52-
./vendor/bin/phpunit
72+
./api/vendor/bin/phpunit
73+
```
74+
75+
``` bash
76+
cd app && yarn test:cypress
5377
```
5478

5579
## Deployment
5680

5781
Essentially, to set up the repo on the server:
5882

5983
``` bash
60-
git clone https://github.com/jlbelanger/glick-api.git
61-
cd glick-api
84+
git clone https://github.com/jlbelanger/glick.git
85+
cd glick/api
6286
cp .env.example .env
6387
# Then configure the values in .env.
6488
composer install
6589
php artisan key:generate
6690
php artisan migrate
6791
chown -R www-data:www-data storage
92+
cd ../app
93+
cp .env.example .env
94+
# Then configure the values in .env.
95+
yarn build
6896
```
6997

7098
For subsequent deploys, push changes to the main branch, then run the following on the server:
7199

72100
``` bash
73-
cd glick-api
101+
cd glick
74102
git fetch origin
75103
git pull
104+
cd api
76105
composer install
77106
php artisan config:clear
107+
cd ../app
108+
yarn build
78109
```
79110

80111
### Deploy script

api/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "jlbelanger/glick-api",
2+
"name": "jlbelanger/glick",
33
"description": "Track occurrences of time-based events.",
44
"version": "1.0.0",
55
"type": "project",

app/README.md

Lines changed: 0 additions & 62 deletions
This file was deleted.

app/deploy.sh

Lines changed: 0 additions & 14 deletions
This file was deleted.

app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@jlbelanger/glick-app",
2+
"name": "@jlbelanger/glick",
33
"version": "1.0.0",
44
"description": "Track occurrences of time-based events.",
55
"license": "GPL-3.0-only",
@@ -10,7 +10,7 @@
1010
},
1111
"repository": {
1212
"type": "git",
13-
"url": "https://github.com/jlbelanger/glick-app.git"
13+
"url": "https://github.com/jlbelanger/glick.git"
1414
},
1515
"scripts": {
1616
"start": "npx update-browserslist-db@latest && react-scripts start",

app/yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3637,9 +3637,9 @@ caniuse-api@^3.0.0:
36373637
lodash.uniq "^4.5.0"
36383638

36393639
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001646, caniuse-lite@^1.0.30001688:
3640-
version "1.0.30001700"
3641-
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001700.tgz"
3642-
integrity sha512-2S6XIXwaE7K7erT8dY+kLQcpa5ms63XlRkMkReXjle+kf6c5g38vyMl+Z5y8dSxOFDhcFe+nxnn261PLxBSQsQ==
3640+
version "1.0.30001704"
3641+
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001704.tgz"
3642+
integrity sha512-+L2IgBbV6gXB4ETf0keSvLr7JUrRVbIaB/lrQ1+z8mRcQiisG5k+lG6O4n6Y5q6f5EuNfaYXKgymucphlEXQew==
36433643

36443644
case-sensitive-paths-webpack-plugin@^2.4.0:
36453645
version "2.4.0"

0 commit comments

Comments
 (0)