Skip to content

Commit a8b2d02

Browse files
authored
Merge pull request #1 from utopia-php/dev
Dev
2 parents 3eecd2d + 3159d0a commit a8b2d02

40 files changed

+6921
-2
lines changed

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
LLM_KEY_ANTHROPIC=sk-ant-1234567890
2+
LLM_KEY_OPENAI=sk-proj-1234567890
3+
LLM_KEY_DEEPSEEK=sk-1234567890
4+
LLM_KEY_XAI=xai-1234567890
5+
LLM_KEY_PERPLEXITY=pplx-1234567890

.github/ISSUE_TEMPLATE/bug.yaml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: "🐛 Bug Report"
2+
description: "Submit a bug report to help us improve"
3+
title: "🐛 Bug Report: "
4+
labels: [bug]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out our bug report form 🙏
10+
- type: textarea
11+
id: steps-to-reproduce
12+
validations:
13+
required: true
14+
attributes:
15+
label: "👟 Reproduction steps"
16+
description: "How do you trigger this bug? Please walk us through it step by step."
17+
placeholder: "When I ..."
18+
- type: textarea
19+
id: expected-behavior
20+
validations:
21+
required: true
22+
attributes:
23+
label: "👍 Expected behavior"
24+
description: "What did you think would happen?"
25+
placeholder: "It should ..."
26+
- type: textarea
27+
id: actual-behavior
28+
validations:
29+
required: true
30+
attributes:
31+
label: "👎 Actual Behavior"
32+
description: "What did actually happen? Add screenshots, if applicable."
33+
placeholder: "It actually ..."
34+
- type: dropdown
35+
id: appwrite-version
36+
attributes:
37+
label: "🎲 Utopia Auth Version"
38+
description: "What version of Utopia Auth are you running?"
39+
options:
40+
- Version 0.5.x
41+
- Version 0.4.x
42+
- Version 0.3.x
43+
- Version 0.2.x
44+
- Version 0.1.x
45+
validations:
46+
required: true
47+
- type: dropdown
48+
id: operating-system
49+
attributes:
50+
label: "💻 Operating system"
51+
description: "What OS is your server / device running on?"
52+
options:
53+
- Linux
54+
- MacOS
55+
- Windows
56+
- Something else
57+
validations:
58+
required: true
59+
- type: textarea
60+
id: enviromnemt
61+
validations:
62+
required: false
63+
attributes:
64+
label: "🧱 Your Environment"
65+
description: "Is your environment customized in any way?"
66+
placeholder: "I use Cloudflare for ..."
67+
- type: checkboxes
68+
id: no-duplicate-issues
69+
attributes:
70+
label: "👀 Have you spent some time to check if this issue has been raised before?"
71+
description: "Have you Googled for a similar issue or checked our older issues for a similar bug?"
72+
options:
73+
- label: "I checked and didn't find similar issue"
74+
required: true
75+
- type: checkboxes
76+
id: read-code-of-conduct
77+
attributes:
78+
label: "🏢 Have you read the Code of Conduct?"
79+
options:
80+
- label: "I have read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/HEAD/CODE_OF_CONDUCT.md)"
81+
required: true
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "📚 Documentation"
2+
description: "Report an issue related to documentation"
3+
title: "📚 Documentation: "
4+
labels: [documentation]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out our bug report form 🙏
10+
- type: textarea
11+
id: issue-description
12+
validations:
13+
required: true
14+
attributes:
15+
label: "💭 Description"
16+
description: "A clear and concise description of what the issue is."
17+
placeholder: "Documentation should not ..."
18+
- type: checkboxes
19+
id: no-duplicate-issues
20+
attributes:
21+
label: "👀 Have you spent some time to check if this issue has been raised before?"
22+
description: "Have you Googled for a similar issue or checked our older issues for a similar bug?"
23+
options:
24+
- label: "I checked and didn't find similar issue"
25+
required: true
26+
- type: checkboxes
27+
id: read-code-of-conduct
28+
attributes:
29+
label: "🏢 Have you read the Code of Conduct?"
30+
options:
31+
- label: "I have read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/HEAD/CODE_OF_CONDUCT.md)"
32+
required: true
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: 🚀 Feature
2+
description: "Submit a proposal for a new feature"
3+
title: "🚀 Feature: "
4+
labels: [feature]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out our feature report form 🙏
10+
- type: textarea
11+
id: feature-description
12+
validations:
13+
required: true
14+
attributes:
15+
label: "🔖 Feature description"
16+
description: "A clear and concise description of what the feature is."
17+
placeholder: "You should add ..."
18+
- type: textarea
19+
id: pitch
20+
validations:
21+
required: true
22+
attributes:
23+
label: "🎤 Pitch"
24+
description: "Please explain why this feature should be implemented and how it would be used. Add examples, if applicable."
25+
placeholder: "In my use-case, ..."
26+
- type: checkboxes
27+
id: no-duplicate-issues
28+
attributes:
29+
label: "👀 Have you spent some time to check if this issue has been raised before?"
30+
description: "Have you Googled for a similar issue or checked our older issues for a similar feature suggestion?"
31+
options:
32+
- label: "I checked and didn't find similar issue"
33+
required: true
34+
- type: checkboxes
35+
id: read-code-of-conduct
36+
attributes:
37+
label: "🏢 Have you read the Code of Conduct?"
38+
options:
39+
- label: "I have read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/HEAD/CODE_OF_CONDUCT.md)"
40+
required: true
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "CodeQL"
2+
3+
on: [pull_request]
4+
jobs:
5+
lint:
6+
name: CodeQL
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 2
14+
15+
- run: git checkout HEAD^2
16+
17+
- name: Run CodeQL
18+
run: |
19+
docker run --rm -v $PWD:/app composer:2.6 sh -c \
20+
"composer install --profile --ignore-platform-reqs && composer check"

.github/workflows/linter.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "Linter"
2+
3+
on: [pull_request]
4+
jobs:
5+
lint:
6+
name: Linter
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 2
14+
15+
- run: git checkout HEAD^2
16+
17+
- name: Run Linter
18+
run: |
19+
docker run --rm -v $PWD:/app composer sh -c \
20+
"composer install --profile --ignore-platform-reqs && composer lint"

.github/workflows/tests.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "Tests"
2+
3+
on: [ pull_request ]
4+
jobs:
5+
lint:
6+
name: Tests
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 2
14+
15+
- run: git checkout HEAD^2
16+
17+
- name: Build
18+
env:
19+
LLM_KEY_ANTHROPIC: ${{ secrets.LLM_KEY_ANTHROPIC }}
20+
LLM_KEY_OPENAI: ${{ secrets.LLM_KEY_OPENAI }}
21+
LLM_KEY_DEEPSEEK: ${{ secrets.LLM_KEY_DEEPSEEK }}
22+
LLM_KEY_XAI: ${{ secrets.LLM_KEY_XAI }}
23+
LLM_KEY_PERPLEXITY: ${{ secrets.LLM_KEY_PERPLEXITY }}
24+
run: |
25+
docker compose build
26+
docker compose up -d
27+
sleep 10
28+
29+
- name: Run Tests
30+
run: docker compose exec tests vendor/bin/phpunit --configuration phpunit.xml tests

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/vendor/
2+
/.vscode/
3+
.phpunit.result.cache
4+
tests/chunk.php
5+
.idea/
6+
.env
7+
example.php
8+
example.md

Dockerfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
FROM composer:2.0 AS composer
2+
3+
ARG TESTING=false
4+
ENV TESTING=$TESTING
5+
6+
WORKDIR /usr/local/src/
7+
COPY composer.lock /usr/local/src/
8+
COPY composer.json /usr/local/src/
9+
10+
RUN composer update \
11+
--ignore-platform-reqs \
12+
--optimize-autoloader \
13+
--no-plugins \
14+
--no-scripts \
15+
--prefer-dist
16+
17+
FROM php:8.3-cli-alpine AS final
18+
19+
LABEL maintainer="team@appwrite.io"
20+
21+
WORKDIR /usr/src/code
22+
23+
# Configure PHP
24+
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
25+
&& echo "memory_limit=256M" >> $PHP_INI_DIR/php.ini
26+
27+
# Copy composer dependencies
28+
COPY --from=composer /usr/local/src/vendor /usr/src/code/vendor
29+
30+
# Add Source Code
31+
COPY . /usr/src/code
32+
33+
CMD [ "tail", "-f", "/dev/null" ]

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2025 Eldad A. Fux
3+
Copyright (c) 2025 Utopia
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

0 commit comments

Comments
 (0)