Skip to content

Commit 3fee837

Browse files
committed
Merge branch 'main' into 'sync-preferences'.
2 parents fa0c76e + 2ed5507 commit 3fee837

File tree

1,899 files changed

+84589
-63102
lines changed

Some content is hidden

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

1,899 files changed

+84589
-63102
lines changed

.env.example

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
PUBLIC_APPWRITE_ENDPOINT=https://localhost/v1
21
PUBLIC_CONSOLE_MODE=self-hosted
2+
PUBLIC_APPWRITE_MULTI_REGION=false
3+
PUBLIC_APPWRITE_ENDPOINT=http://localhost/v1
4+
35
PUBLIC_STRIPE_KEY=
46
PUBLIC_GROWTH_ENDPOINT=

.eslintignore

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

.eslintrc.cjs

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

.github/workflows/publish.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ jobs:
3939
labels: ${{ steps.meta.outputs.labels }}
4040
build-args: |
4141
"PUBLIC_CONSOLE_MODE=cloud"
42+
"PUBLIC_APPWRITE_MULTI_REGION=true"
4243
"PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}"
4344
"PUBLIC_STRIPE_KEY=${{ secrets.PUBLIC_STRIPE_KEY }}"
4445
"SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}"
46+
"SENTRY_RELEASE=${{ github.event.release.tag_name }}"
4547
publish-cloud-stage:
4648
runs-on: ubuntu-latest
4749
steps:
@@ -76,6 +78,7 @@ jobs:
7678
labels: ${{ steps.meta.outputs.labels }}
7779
build-args: |
7880
"PUBLIC_CONSOLE_MODE=cloud"
81+
"PUBLIC_APPWRITE_MULTI_REGION=true"
7982
"PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}"
8083
"PUBLIC_STRIPE_KEY=${{ secrets.PUBLIC_STRIPE_KEY_STAGE }}"
8184
publish-self-hosted:
@@ -112,4 +115,43 @@ jobs:
112115
labels: ${{ steps.meta.outputs.labels }}
113116
build-args: |
114117
"PUBLIC_CONSOLE_MODE=self-hosted"
118+
"PUBLIC_APPWRITE_MULTI_REGION=false"
119+
"PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}"
120+
121+
publish-cloud-no-regions:
122+
runs-on: ubuntu-latest
123+
steps:
124+
- name: Checkout the repo
125+
uses: actions/checkout@v2
126+
- name: Set up QEMU
127+
uses: docker/setup-qemu-action@v2
128+
- name: Set up Docker Buildx
129+
uses: docker/setup-buildx-action@v2
130+
- name: Log in to Docker Hub
131+
uses: docker/login-action@v3
132+
with:
133+
username: ${{ vars.DOCKERHUB_USERNAME }}
134+
password: ${{ secrets.DOCKERHUB_TOKEN }}
135+
- name: Extract metadata (tags, labels) for Docker
136+
id: meta
137+
uses: docker/metadata-action@v5
138+
with:
139+
images: appwrite/console-cloud-no-regions
140+
tags: |
141+
type=semver,pattern={{major}}.{{minor}}.{{patch}}
142+
type=semver,pattern={{major}}.{{minor}}
143+
type=semver,pattern={{major}}
144+
- name: Build and push Docker image
145+
id: push
146+
uses: docker/build-push-action@v6
147+
with:
148+
context: .
149+
push: true
150+
platforms: linux/amd64,linux/arm64
151+
tags: ${{ steps.meta.outputs.tags }}
152+
labels: ${{ steps.meta.outputs.labels }}
153+
build-args: |
154+
"PUBLIC_CONSOLE_MODE=cloud"
155+
"PUBLIC_APPWRITE_MULTI_REGION=false"
156+
"PUBLIC_STRIPE_KEY=${{ secrets.PUBLIC_STRIPE_KEY_STAGE }}"
115157
"PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}"

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ dist/
2424
*.swp
2525
### Node ###
2626
# Logs
27-
logs
2827
*.log
2928
npm-debug.log*
3029
yarn-debug.log*

CONTRIBUTING.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ pnpm run lint
108108

109109
Diagnostic tool that checks for the following:
110110

111-
- Unused CSS
112-
- Svelte A11y hints
113-
- TypeScript compiler errors
111+
- Unused CSS
112+
- Svelte A11y hints
113+
- TypeScript compiler errors
114114

115115
```bash
116116
pnpm run check
@@ -130,11 +130,11 @@ doc-548-submit-a-pull-request-section-to-contribution-guide
130130

131131
When `TYPE` can be:
132132

133-
- **feat** - is a new feature
134-
- **doc** - documentation only changes
135-
- **cicd** - changes related to CI/CD system
136-
- **fix** - a bug fix
137-
- **refactor** - code change that neither fixes a bug nor adds a feature
133+
- **feat** - is a new feature
134+
- **doc** - documentation only changes
135+
- **cicd** - changes related to CI/CD system
136+
- **fix** - a bug fix
137+
- **refactor** - code change that neither fixes a bug nor adds a feature
138138

139139
**All PRs must include a commit message with a description of the changes made!**
140140

@@ -175,22 +175,22 @@ $ git push origin [name_of_your_new_branch]
175175

176176
Before committing always make sure to run all available tools to improve the codebase:
177177

178-
- Formatter
179-
- `pnpm run format`
180-
- Tests
181-
- `pnpm test`
182-
- Diagnostics
183-
- `pnpm run check`
178+
- Formatter
179+
- `pnpm run format`
180+
- Tests
181+
- `pnpm test`
182+
- Diagnostics
183+
- `pnpm run check`
184184

185185
### Performance
186186

187187
Page load times are a key consideration for users of all browsers and device types.
188188

189189
There are some general things we can do in front-end development:
190190

191-
- Minimize HTTP requests
192-
- Minimize blocking – content should be readable before client-side processing
193-
- Lazy load "supplementary" content, especially images
191+
- Minimize HTTP requests
192+
- Minimize blocking – content should be readable before client-side processing
193+
- Lazy load "supplementary" content, especially images
194194

195195
### Don't Repeat Yourself (DRY)
196196

@@ -202,12 +202,12 @@ If you stick to this principle, you will ensure that you will only ever need to
202202

203203
Separate _structure_ from _presentation_ from _behavior_ to aid maintainability and understanding.
204204

205-
- Keep CSS (presentation), JS (behavior) and HTML (structure) in the same respective Svelte component
206-
- Avoid writing inline CSS or Javascript in HTML
207-
- Avoid writing CSS or HTML in Javascript
208-
- Don't choose HTML elements to imply style
209-
- Where appropriate, use CSS or Svelte rather than Javascript for animations and transitions
210-
- Try to use templates when defining markup in Javascript
205+
- Keep CSS (presentation), JS (behavior) and HTML (structure) in the same respective Svelte component
206+
- Avoid writing inline CSS or Javascript in HTML
207+
- Avoid writing CSS or HTML in Javascript
208+
- Don't choose HTML elements to imply style
209+
- Where appropriate, use CSS or Svelte rather than Javascript for animations and transitions
210+
- Try to use templates when defining markup in Javascript
211211

212212
### Write code to be read
213213

Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ WORKDIR /app
44

55
ENV PNPM_HOME="/pnpm"
66
ENV PATH="$PNPM_HOME:$PATH"
7+
RUN npm i -g corepack@latest
78
RUN corepack enable
9+
RUN corepack prepare [email protected] --activate
810

911
ADD ./package.json /app/package.json
1012
ADD ./pnpm-lock.yaml /app/pnpm-lock.yaml
@@ -19,23 +21,27 @@ ADD ./src /app/src
1921
ADD ./static /app/static
2022

2123
ARG PUBLIC_CONSOLE_MODE
24+
ARG PUBLIC_APPWRITE_MULTI_REGION
2225
ARG PUBLIC_APPWRITE_ENDPOINT
2326
ARG PUBLIC_GROWTH_ENDPOINT
2427
ARG PUBLIC_STRIPE_KEY
2528
ARG SENTRY_AUTH_TOKEN
29+
ARG SENTRY_RELEASE
2630

2731
ENV PUBLIC_APPWRITE_ENDPOINT=$PUBLIC_APPWRITE_ENDPOINT
2832
ENV PUBLIC_GROWTH_ENDPOINT=$PUBLIC_GROWTH_ENDPOINT
2933
ENV PUBLIC_CONSOLE_MODE=$PUBLIC_CONSOLE_MODE
34+
ENV PUBLIC_APPWRITE_MULTI_REGION=$PUBLIC_APPWRITE_MULTI_REGION
3035
ENV PUBLIC_STRIPE_KEY=$PUBLIC_STRIPE_KEY
3136
ENV SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN
37+
ENV SENTRY_RELEASE=$SENTRY_RELEASE
3238
ENV NODE_OPTIONS=--max_old_space_size=8192
3339

34-
RUN pnpm run sync && pnpm run build
40+
RUN pnpm run build
3541

36-
FROM nginx:1.25-alpine
42+
FROM nginx:1.26.3-alpine
3743

3844
EXPOSE 80
3945

4046
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
41-
COPY --from=build /app/build /usr/share/nginx/html/console
47+
COPY --from=build /app/build /usr/share/nginx/html/console

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
Appwrite Console has been built with the following frameworks:
1212

13-
- [Svelte](https://svelte.dev/)
14-
- [Svelte Kit](https://kit.svelte.dev/)
13+
- [Svelte](https://svelte.dev/)
14+
- [Svelte Kit](https://kit.svelte.dev/)
1515

1616
## Developer Experience
1717

build.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ async function main() {
2424
log(bold().magenta('APPWRITE CONSOLE'));
2525
log();
2626
logEnv('CONSOLE MODE', env?.PUBLIC_CONSOLE_MODE);
27+
logEnv('MULTI REGION', env?.PUBLIC_APPWRITE_MULTI_REGION);
2728
logEnv('APPWRITE ENDPOINT', env?.PUBLIC_APPWRITE_ENDPOINT, 'relative');
2829
logEnv('GROWTH ENDPOINT', env?.PUBLIC_GROWTH_ENDPOINT);
2930
log();

compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ services:
55
context: .
66
args:
77
PUBLIC_CONSOLE_MODE: ${PUBLIC_CONSOLE_MODE}
8+
PUBLIC_APPWRITE_MULTI_REGION: ${PUBLIC_APPWRITE_MULTI_REGION}
89
PUBLIC_APPWRITE_ENDPOINT: ${PUBLIC_APPWRITE_ENDPOINT}
910
PUBLIC_GROWTH_ENDPOINT: ${PUBLIC_GROWTH_ENDPOINT}
1011
PUBLIC_STRIPE_KEY: ${PUBLIC_STRIPE_KEY}
@@ -20,6 +21,7 @@ services:
2021
- build/
2122
environment:
2223
- PUBLIC_CONSOLE_MODE
24+
- PUBLIC_APPWRITE_MULTI_REGION
2325
- PUBLIC_APPWRITE_ENDPOINT
2426
- PUBLIC_GROWTH_ENDPOINT
2527
- PUBLIC_STRIPE_KEY

0 commit comments

Comments
 (0)