Skip to content

Commit 03ad4f7

Browse files
committed
Release preparations
1 parent b2c7268 commit 03ad4f7

File tree

14 files changed

+1041
-17
lines changed

14 files changed

+1041
-17
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
APPWRITE_BROWSER_SECRET=secret

.github/workflows/check.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: "Check"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
format:
10+
name: "Check"
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: '18'
20+
21+
- name: Install dependencies
22+
run: pnpm install
23+
24+
- name: Format
25+
run: pnpm run check

.github/workflows/lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: "Lint"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
format:
10+
name: "Lint"
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: '18'
20+
21+
- name: Install dependencies
22+
run: pnpm install
23+
24+
- name: Format
25+
run: pnpm run lint

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "Release"
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
tests:
9+
name: Release
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set up QEMU
17+
uses: docker/setup-qemu-action@v3
18+
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v3
21+
22+
- name: Login to Docker Hub
23+
uses: docker/login-action@v3
24+
with:
25+
username: ${{ vars.DOCKERHUB_USERNAME }}
26+
password: ${{ secrets.DOCKERHUB_TOKEN }}
27+
28+
- name: Extract metadata (tags, labels) for Docker
29+
id: meta
30+
uses: docker/metadata-action@v5
31+
with:
32+
images: appwrite/browser
33+
tags: type=semver,pattern={{major}}.{{minor}}.{{patch}}
34+
35+
- name: Build and push
36+
uses: docker/build-push-action@v5
37+
with:
38+
context: .
39+
platforms: linux/amd64,linux/arm64
40+
push: true
41+
tags: ${{ steps.meta.outputs.tags }}
42+
labels: ${{ steps.meta.outputs.labels }}

.gitignore

Lines changed: 136 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,136 @@
1-
/node_modules
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
66+
# Optional REPL history
67+
.node_repl_history
68+
69+
# Output of 'npm pack'
70+
*.tgz
71+
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
75+
# dotenv environment variable files
76+
.env
77+
.env.development.local
78+
.env.test.local
79+
.env.production.local
80+
.env.local
81+
82+
# parcel-bundler cache (https://parceljs.org/)
83+
.cache
84+
.parcel-cache
85+
86+
# Next.js build output
87+
.next
88+
out
89+
90+
# Nuxt.js build / generate output
91+
.nuxt
92+
dist
93+
94+
# Gatsby files
95+
.cache/
96+
# Comment in the public line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# public
99+
100+
# vuepress build output
101+
.vuepress/dist
102+
103+
# vuepress v2.x temp and cache directory
104+
.temp
105+
.cache
106+
107+
# vitepress build output
108+
**/.vitepress/dist
109+
110+
# vitepress cache directory
111+
**/.vitepress/cache
112+
113+
# Docusaurus cache and generated files
114+
.docusaurus
115+
116+
# Serverless directories
117+
.serverless/
118+
119+
# FuseBox cache
120+
.fusebox/
121+
122+
# DynamoDB Local files
123+
.dynamodb/
124+
125+
# TernJS port file
126+
.tern-port
127+
128+
# Stores VSCode versions used for testing VSCode extensions
129+
.vscode-test
130+
131+
# yarn v2
132+
.yarn/cache
133+
.yarn/unplugged
134+
.yarn/build-state.yml
135+
.yarn/install-state.gz
136+
.pnp.*

.gitpod.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This configuration file was automatically generated by Gitpod.
2+
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
3+
# and commit this file to your remote git repository to share the goodness with others.
4+
5+
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart
6+
7+
tasks:
8+
- init: pnpm install
9+
command: pnpm run start
10+
11+

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ FROM base AS build
1313
COPY . .
1414

1515
FROM base
16-
COPY --from=prod-deps /app/node_modules /app/node_modules
17-
COPY --from=build /app/index.js /app/index.js
1816
RUN pnpm playwright install --with-deps chromium
17+
COPY --from=prod-deps /app/node_modules /app/node_modules
18+
COPY --from=build /app/src/index.js /app/src/index.js
1919
CMD ["pnpm", "start"]

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Appwrite
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Browser 🖥️
2+
3+
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
4+
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
5+
[![appwrite.io](https://img.shields.io/badge/appwrite-.io-f02e65?style=flat-square)](https://appwrite.io)
6+
7+
Appwrite Browser is simple to use and extend REST API meant to simplify screenshot preview, reports, and analysis.
8+
9+
## Usage
10+
11+
Add Appwrite Browser to your `docker-compose.yml`.
12+
13+
```
14+
services:
15+
appwrite-browser:
16+
container_name: appwrite-browser
17+
image: appwrite/browser:0.1.0
18+
networks:
19+
- appwrite
20+
environment:
21+
- APPWRITE_BROWSER_SECRET=secret
22+
```
23+
24+
Start browser alongside rest of your services.
25+
26+
```
27+
docker compose up -d
28+
```
29+
30+
Communicate with Appwrite Browser endpoints.
31+
32+
```bash
33+
curl -X GET -H "Authorization: Bearer secret" http://appwrite-browser:3000/screenshot?url=http://google.com/ping
34+
```
35+
36+
## Development
37+
38+
Make sure you have [pnpm](https://pnpm.io/) installed.
39+
40+
To install dependencies, run the following command.
41+
42+
```bash
43+
pnpm i
44+
```
45+
46+
Next, duplicate `.env.example` into `.env`, and update the values.
47+
48+
```bash
49+
cp .env.example .env
50+
```
51+
52+
Finally, start the server by running `npm start`, and visit use endpoint `http://localhost:3000` as REST API endpoint. To authorize, provide header `Authorization: Bearer <secret>`.
53+
54+
## Contributing
55+
56+
All code contributions, including those of people having commit access, must go through a pull request and be approved by a core developer before being merged. This is to ensure a proper review of all the code.
57+
58+
We truly ❤️ pull requests! If you wish to help, you can learn more about how you can contribute to this project in the [contribution guide](CONTRIBUTING.md).

biome.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json"
3+
}

0 commit comments

Comments
 (0)