Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit 9f992ff

Browse files
committed
feat: initial commit
0 parents  commit 9f992ff

369 files changed

Lines changed: 75081 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2
16+
17+
[docker-compose.yml]
18+
indent_size = 4

.env.example

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
APP_NAME=OBMS
2+
APP_THEME=aurora
3+
APP_ENV=local
4+
APP_KEY=
5+
APP_DEBUG=true
6+
APP_URL=http://localhost
7+
8+
LOG_CHANNEL=stack
9+
LOG_DEPRECATIONS_CHANNEL=null
10+
LOG_LEVEL=debug
11+
12+
DB_CONNECTION=mysql
13+
DB_HOST=mysql
14+
DB_PORT=3306
15+
DB_DATABASE=laravel
16+
DB_USERNAME=sail
17+
DB_PASSWORD=password
18+
19+
BROADCAST_DRIVER=log
20+
CACHE_DRIVER=redis
21+
FILESYSTEM_DRIVER=local
22+
QUEUE_CONNECTION=redis
23+
SESSION_DRIVER=redis
24+
SESSION_LIFETIME=120
25+
26+
MEMCACHED_HOST=127.0.0.1
27+
28+
REDIS_HOST=redis
29+
REDIS_PASSWORD=null
30+
REDIS_PORT=6379
31+
32+
MAIL_MAILER=smtp
33+
MAIL_HOST=mailhog
34+
MAIL_PORT=1025
35+
MAIL_USERNAME=null
36+
MAIL_PASSWORD=null
37+
MAIL_ENCRYPTION=null
38+
MAIL_FROM_ADDRESS=null
39+
MAIL_FROM_NAME="${APP_NAME}"
40+
MAIL_SUPPORT_ADDRESS="${MAIL_FROM_ADDRESS}"
41+
MAIL_SUPPORT_NAME="${APP_NAME}"
42+
43+
AWS_ACCESS_KEY_ID=
44+
AWS_SECRET_ACCESS_KEY=
45+
AWS_DEFAULT_REGION=us-east-1
46+
AWS_BUCKET=
47+
AWS_USE_PATH_STYLE_ENDPOINT=false
48+
49+
PUSHER_APP_ID=
50+
PUSHER_APP_KEY=
51+
PUSHER_APP_SECRET=
52+
PUSHER_APP_CLUSTER=mt1
53+
54+
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
55+
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
* text=auto
2+
*.css linguist-vendored
3+
*.scss linguist-vendored
4+
*.js linguist-vendored
5+
CHANGELOG.md export-ignore
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Pull Request
2+
3+
## Description
4+
<!-- Provide a brief description of the changes in this PR -->
5+
6+
## Type of Change
7+
<!-- Select the type of change this PR introduces -->
8+
- [ ] feat: A new feature
9+
- [ ] fix: A bug fix
10+
- [ ] docs: Documentation only changes
11+
- [ ] style: Changes that do not affect the meaning of the code (white-space, formatting, etc)
12+
- [ ] refactor: A code change that neither fixes a bug nor adds a feature
13+
- [ ] perf: A code change that improves performance
14+
- [ ] test: Adding missing tests or correcting existing tests
15+
- [ ] chore: Changes to the build process or auxiliary tools and libraries
16+
- [ ] ci: Changes to our CI configuration files and scripts
17+
18+
## Breaking Changes
19+
<!-- Does this PR introduce any breaking changes? -->
20+
- [ ] Yes
21+
- [ ] No
22+
23+
<!-- If yes, please describe the breaking changes -->
24+
25+
## Related Issues
26+
<!-- Link any related issues here using the format: Fixes #123, Closes #456 -->
27+
28+
## Checklist
29+
- [ ] My code follows the style guidelines of this project
30+
- [ ] I have performed a self-review of my own code
31+
- [ ] I have commented my code, particularly in hard-to-understand areas
32+
- [ ] I have made corresponding changes to the documentation
33+
- [ ] My changes generate no new warnings
34+
- [ ] I have added tests that prove my fix is effective or that my feature works
35+
- [ ] New and existing unit tests pass locally with my changes
36+
- [ ] Any dependent changes have been merged and published in downstream modules
37+
- [ ] I have checked my code and corrected any misspellings
38+
- [ ] I have read and agree to the [Contributing Guidelines](https://github.com/forepath/obms/blob/main/CONTRIBUTING.md)
39+
40+
## Additional Notes
41+
<!-- Add any additional notes about the PR here -->
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Setup Environment
2+
description: 'Setup environment for PHP and Node.js'
3+
4+
runs:
5+
using: 'composite'
6+
steps:
7+
- name: Set up Node.js
8+
uses: actions/setup-node@v4
9+
with:
10+
node-version-file: .nvmrc
11+
cache: 'npm'
12+
13+
- name: Install Node.js dependencies
14+
run: npm ci
15+
shell: bash
16+
17+
- name: Set up PHP 8.2
18+
uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: '8.2'
21+
tools: composer:v2
22+
extensions: curl, fileinfo, imagick, imap, json, pdo, mbstring
23+
coverage: xdebug
24+
25+
- name: Install PHP dependencies
26+
run: composer install
27+
shell: bash

.github/workflows/publish.yml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
code_coverage:
10+
name: Code coverage
11+
runs-on: ubuntu-latest
12+
services:
13+
mysql:
14+
image: mysql/mysql-server:8.0
15+
ports:
16+
- 3306:3306
17+
env:
18+
MYSQL_ROOT_PASSWORD: 'root'
19+
MYSQL_ROOT_HOST: '%'
20+
MYSQL_DATABASE: 'testing'
21+
MYSQL_USER: 'testing'
22+
MYSQL_PASSWORD: 'testing'
23+
options: >-
24+
--health-cmd="mysqladmin ping --silent"
25+
--health-interval=10s
26+
--health-timeout=5s
27+
--health-retries=3
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v4
31+
32+
- name: Setup environment
33+
uses: ./.github/actions/setup-env
34+
35+
- name: Run tests
36+
run: vendor/bin/phpunit --coverage-clover clover.xml
37+
env:
38+
APP_KEY: ${{ secrets.TESTING_APP_KEY }}
39+
40+
- name: Upload coverage to Codecov
41+
uses: codecov/codecov-action@v4
42+
with:
43+
files: clover.xml
44+
flags: release
45+
verbose: true
46+
env:
47+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
48+
49+
publish:
50+
runs-on: ubuntu-latest
51+
permissions:
52+
contents: write
53+
packages: write
54+
pages: write
55+
steps:
56+
- name: Checkout repository
57+
uses: actions/checkout@v4
58+
with:
59+
persist-credentials: false
60+
fetch-depth: 0
61+
62+
- name: Setup environment
63+
uses: ./.github/actions/setup-env
64+
65+
- name: Generate API documentation
66+
run: php artisan l5-swagger:generate
67+
68+
- name: Set API documentation version
69+
run: sed -i "s/0.0.0/$TAG/g" storage/api-docs/api-docs.json
70+
env:
71+
TAG: ${{ github.ref_name }}
72+
73+
- name: Copy API documentation
74+
run: |
75+
mkdir -p docs
76+
cp storage/api-docs/api-docs.json docs/api-docs-${{ github.ref_name }}.json
77+
cp storage/api-docs/api-docs.json docs/api-docs-latest.json
78+
cp DEPENDENCIES.md docs/DEPENDENCIES-${{ github.ref_name }}.md
79+
cp DEPENDENCIES.md docs/DEPENDENCIES-latest.md
80+
cp CHANGELOG.md docs/CHANGELOG.md
81+
82+
- name: Deploy to GitHub Pages
83+
uses: peaceiris/actions-gh-pages@v3
84+
with:
85+
personal_token: ${{ secrets.GITHUB_TOKEN }}
86+
publish_dir: ./docs
87+
cname: documents.obms.one
88+
keep_files: true
89+
publish_branch: gh-pages
90+
91+
- name: Log in to GitHub Container Registry
92+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
93+
94+
- name: Build and push app image
95+
run: |
96+
docker build -t ghcr.io/forepath/obms-app:${{ github.ref_name }} -f docker/production/Dockerfile.fpm .
97+
docker push ghcr.io/forepath/obms-app:${{ github.ref_name }}
98+
docker tag ghcr.io/forepath/obms-app:${{ github.ref_name }} ghcr.io/forepath/obms-app:latest
99+
docker push ghcr.io/forepath/obms-app:latest
100+
101+
- name: Build and push worker image
102+
run: |
103+
docker build -t ghcr.io/forepath/obms-worker:${{ github.ref_name }} -f docker/production/Dockerfile.worker .
104+
docker push ghcr.io/forepath/obms-worker:${{ github.ref_name }}
105+
docker tag ghcr.io/forepath/obms-worker:${{ github.ref_name }} ghcr.io/forepath/obms-worker:latest
106+
docker push ghcr.io/forepath/obms-worker:latest
107+
108+
notify:
109+
runs-on: ubuntu-latest
110+
needs: publish
111+
steps:
112+
- name: Trigger remote update
113+
uses: peter-evans/repository-dispatch@v1
114+
with:
115+
repository: forepath/obms-documentation
116+
event-type: core-release
117+
token: ${{ secrets.DOCUMENTATION_REPOSITORY_TOKEN }}

0 commit comments

Comments
 (0)