Skip to content

Commit

Permalink
Merge pull request #1 from rsammelson/default-comment-sort
Browse files Browse the repository at this point in the history
Default comment sort
  • Loading branch information
Faalangst26 authored Jul 14, 2023
2 parents 2728a53 + 8d971b2 commit 5d9af1d
Show file tree
Hide file tree
Showing 113 changed files with 10,939 additions and 1,382 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.swp
.git/
.github/
.gitignore
.prettierignore
.vscode/
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache: pnpm

- name: 📦 Install dependencies
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile

# - name: 🧪 Test project
# run: yarn test
# run: pnpm test

- name: 📝 Lint
run: yarn lint
run: pnpm lint

- name: 📝 Prettier formatting
run: yarn lint:formatting
run: pnpm lint:formatting

- name: 💪 Type check
run: yarn test:typecheck
run: pnpm test:typecheck
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dist/
dist/
pnpm-lock.yaml
50 changes: 23 additions & 27 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,55 +1,51 @@
# stage 0: set base image w/common customizations
FROM docker.io/library/node:lts-alpine AS base

# Prepare work directory
WORKDIR /wefwef
WORKDIR /voyager

# enable corepack & set network-timeout
RUN corepack enable &&\
pnpm config set network-timeout 300000

FROM base AS builder

RUN corepack enable
# stage 1: build
FROM base AS builder

# Prepare deps
RUN apk update
RUN apk add git --no-cache
RUN apk add --no-cache git

# Prepare build deps ( ignore postinstall scripts for now )
COPY package.json ./
COPY yarn.lock ./
RUN yarn config set network-timeout 300000
RUN yarn --frozen-lockfile --ignore-scripts
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile --ignore-scripts

# Copy all source files
COPY . ./

# Build
RUN yarn build
RUN pnpm build

FROM base AS runner

ARG UID=911
ARG GID=911
# stage 2: runtime
FROM base AS runner

RUN corepack enable
ARG UID=911 GID=911

COPY package.json ./
COPY yarn.lock ./
COPY server.mjs ./
COPY package.json pnpm-lock.yaml server.mjs ./

RUN yarn config set network-timeout 300000
RUN yarn --prod --frozen-lockfile --ignore-scripts
RUN pnpm install --prod --frozen-lockfile --ignore-scripts

# Create a dedicated user and group
RUN set -eux; \
addgroup -g $GID wefwef; \
adduser -u $UID -D -G wefwef wefwef;
addgroup -g "${GID}" voyager; \
adduser -u "${UID}" -D -G voyager voyager

USER wefwef
USER voyager

ENV NODE_ENV=production
ENV NODE_ENV=production PORT=5314

COPY --from=builder /wefwef/dist ./dist
COPY --from=builder /voyager/dist ./dist

EXPOSE 5314/tcp

ENV PORT=5314

CMD ["node", "./server.mjs"]
CMD ["node","./server.mjs"]
80 changes: 42 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
<p align="center">
<a href="https://wefwef.app" target="_blank" rel="noopener noreferrer">
<img width="160" height="160" src="./public/logo_minified.svg" alt="wefwef logo">
<a href="https://vger.app" target="_blank" rel="noopener noreferrer">
<img width="160" height="160" src="./public/logo_minified.svg" alt="Voyager logo">
</a>
</p>

<h1 align="center"/>wefwef <sup><em>alpha</em></sup></h1>
<h1 align="center"/>Voyager <sup><em>alpha</em></sup></h1>

<p align="center">
A mobile-first Lemmy web client
</p>

<p align="center">
(formerly wefwef)
</p>

<br/>
<p align="center">
<a href="https://matrix.to/#/#wefwef.app:matrix.org"><img src="https://img.shields.io/badge/chat-matrix-blue?style=flat&logo=matrix" alt="matrix chat"></a>
<a href="https://matrix.to/#/#vger.app:matrix.org"><img src="https://img.shields.io/badge/chat-matrix-blue?style=flat&logo=matrix" alt="matrix chat"></a>
</p>
<br/>

<p align="center">
<a href="https://wefwef.app/" target="_blank" rel="noopener noreferrer" >
<img src="./public/promo.png" alt="wefwef screenshots" width="600" height="auto">
<a href="https://vger.app/" target="_blank" rel="noopener noreferrer" >
<img src="./public/promo.png" alt="Voyager screenshots" width="600" height="auto">
</a>
</p>

## ⚠️ wefwef is in Alpha
## ⚠️ Voyager is in Alpha

wefwef is an [Apollo-like](https://apolloapp.io/) open source web client for [Lemmy](https://join-lemmy.org/). It's a mobile-first app, but works great on desktop devices, too. Please feel free to try it out, but be aware you will likely encounter bugs and missing functionality.
Voyager is an [Apollo-like](https://apolloapp.io/) open source web client for [Lemmy](https://join-lemmy.org/). It's a mobile-first app, but works great on desktop devices, too. Please feel free to try it out, but be aware you will likely encounter bugs and missing functionality.

**What does wefwef currently support?**
**What does Voyager currently support?**

- Light/dark mode
- View and subscribe to communities
Expand All @@ -40,13 +44,12 @@ wefwef is an [Apollo-like](https://apolloapp.io/) open source web client for [Le
- Creating new posts (url/photo/text)
- Deleting/editing comments
- Swipe to hide posts
- Saving/bookmarking
- Favorites

**What is on the roadmap?**

- Deleting/editing posts
- Saving/bookmarking
- Better splash screens
- Favorites
- More customization
- Android theme
- Native notifications and badging
Expand All @@ -57,22 +60,22 @@ wefwef is an [Apollo-like](https://apolloapp.io/) open source web client for [Le

Native apps can be great, but we believe in the strengths of the web. Why use a web-based Lemmy client?

- **Cross-platform** Use the familiar wefwef interface on your phone, tablet, desktop computer, and more!
- **Cross-platform** Use the familiar Voyager interface on your phone, tablet, desktop computer, and more!
- **Self-hostable** No worries about your favorite app getting taken down, and you can customize to your desire!
- **Lightweight** No large installation bundles - and it's easy to try it out

## Deployment

### Official Deployment

The wefwef team maintains a deployment at:
The Voyager team maintains a deployment at:

- 🐭 Production: [wefwef.app](https://wefwef.app)
- 🐭 Production: [vger.app](https://vger.app)

### Self-Host Docker Deployment

In order to host wefwef yourself you can use the provided Dockerfile to build a container with wefwef. The Docker container itself does not provide any SSL/TLS handling. You'll have to add this bit yourself.
One could put wefwef behind popular reverse proxies with SSL Handling like Traefik, NGINX etc.
In order to host Voyager yourself you can use the provided Dockerfile to build a container with Voyager. The Docker container itself does not provide any SSL/TLS handling. You'll have to add this bit yourself.
One could put Voyager behind popular reverse proxies with SSL Handling like Traefik, NGINX etc.

> **Tip:** Use [Watchtower](https://github.com/containrrr/watchtower) to keep your deployment automatically up to date!
Expand All @@ -82,60 +85,61 @@ One could put wefwef behind popular reverse proxies with SSL Handling like Traef

#### From source

1. checkout source `git clone https://github.com/aeharding/wefwef.git`
1. go into new source dir: `cd wefwef`
1. build Docker image: `docker build . -t wefwef`
1. start container: `docker run --rm -it -p 5314:5314 wefwef`
1. checkout source `git clone https://github.com/aeharding/voyager.git`
1. go into new source dir: `cd voyager`
1. build Docker image: `docker build . -t voyager`
1. start container: `docker run --init --rm -it -p 5314:5314 voyager`

#### Prebuilt

1. pull image `docker pull ghcr.io/aeharding/wefwef:latest`
1. start container: `docker run --rm -it -p 5314:5314 wefwef`
1. pull image `docker pull ghcr.io/aeharding/voyager:latest`
1. start container: `docker run --init --rm -it -p 5314:5314 voyager`

Note: The provided Dockerfile creates a container which will eventually run wefwef as non-root user.
Note: The provided Dockerfile creates a container which will eventually run Voyager as non-root user.

### Ecosystem

- 🇸🇬 [w.opnxng.com](https://w.opnxng.com) - wefwef hosted by Opnxng in Singapore. [Contact/privacy](https://about.opnxng.com)
- 🇸🇬 [w.opnxng.com](https://w.opnxng.com) - Voyager hosted by Opnxng in Singapore. [Contact/privacy](https://about.opnxng.com)
- 🇲🇽 [voyager.nohost.network](https://voyager.nohost.network) - Voyager hosted by Nohost in Mexico. [Contact/privacy](https://nohost.network)

> **Note**: Community deployments are **NOT** maintained by the wefwef team. They may not be synced with wefwef's source code. Please do your own research about the host servers before using them.
> **Note**: Community deployments are **NOT** maintained by the Voyager team. They may not be synced with Voyager's source code. Please do your own research about the host servers before using them.
## 💖 Sponsors

If you're enjoying wefwef, you can sponsor it:
If you're enjoying Voyager, you can sponsor it:

- [Alexander Harding](https://github.com/sponsors/aeharding)

We would also appreciate sponsoring other contributors to wefwef. If someone helps you solve an issue or implement a feature you wanted, supporting them would help make this project and OS more sustainable.
We would also appreciate sponsoring other contributors to Voyager. If someone helps you solve an issue or implement a feature you wanted, supporting them would help make this project and OS more sustainable.

## 🧑‍💻 Contributing

We're really excited that you're interested in contributing to wefwef!
We're really excited that you're interested in contributing to Voyager!

> **NOTE** wefwef is receiving a lot of new users and interest in contributing. Before contributing, [please read this](https://github.com/aeharding/wefwef/discussions/180). 🙂
> **NOTE** Voyager is receiving a lot of new users and interest in contributing. Before contributing, [please read this](https://github.com/aeharding/voyager/discussions/180). 🙂
### Local Setup

Clone the repository and run on the root folder:

```
yarn
yarn run dev
pnpm install
pnpm run dev
```

`Warning`: you will need `corepack` enabled.

### Testing

wefwef uses [Vitest](https://vitest.dev). You can run the test suite with:
Voyager uses [Vitest](https://vitest.dev). You can run the test suite with:

```
yarn test
pnpm test
```

## 📲 PWA

wefwef works best added to the homescreen. There are certain features that only work there, like badging and smooth page transitions.
Voyager works best added to the homescreen. There are certain features that only work there, like badging and smooth page transitions.

## 🦄 Stack

Expand All @@ -147,10 +151,10 @@ wefwef works best added to the homescreen. There are certain features that only

## 👨‍💻 Contributors

<a href="https://github.com/aeharding/wefwef/graphs/contributors">
<img src="https://contrib.rocks/image?repo=aeharding/wefwef" />
<a href="https://github.com/aeharding/voyager/graphs/contributors">
<img src="https://contrib.rocks/image?repo=aeharding/voyager" />
</a>

## 📄 License

[AGPL-3.0](./LICENSE) &copy; wefwef contributors
[AGPL-3.0](./LICENSE) &copy; Voyager contributors
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@
media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)"
/>
<meta charset="utf-8" />
<title>wefwef for lemmy</title>
<title>Voyager for Lemmy</title>

<!-- runtime_config -->
<meta
name="description"
content="wefwef is a beautiful mobile web client for lemmy. Enjoy a seamless experience browsing the fediverse."
content="Voyager is a beautiful mobile web client for Lemmy. Enjoy a seamless experience browsing the fediverse."
/>
<base href="/" />
<meta name="color-scheme" content="light dark" />
Expand Down Expand Up @@ -211,7 +211,7 @@
/>

<!-- add to homescreen for ios -->
<meta name="apple-mobile-web-app-title" content="wefwef" />
<meta name="apple-mobile-web-app-title" content="Voyager" />
<meta
name="apple-mobile-web-app-status-bar-style"
content="black-translucent"
Expand Down
Loading

0 comments on commit 5d9af1d

Please sign in to comment.