A replacement for lemmy-ui with more features, a better design, and more customizability.
Go to file
Xylight 4dab003ae2 feat: make sort changes the default 2024-03-24 15:51:29 -07:00
.github fix: put flavor into with 2023-11-29 18:16:12 -08:00
.vscode misc: fix padding 2023-08-07 11:35:16 -07:00
src feat: make sort changes the default 2024-03-24 15:51:29 -07:00
static feat: use select menu for sort 2023-09-03 17:43:45 -07:00
tests feat: add v0.19.0 support 2023-09-28 17:09:09 -07:00
.dockerignore design: Reduce vertical padding 2023-07-22 10:54:05 -07:00
.gitignore feat: use sveltekit pwa 2023-08-02 18:38:55 -07:00
.npmrc misc: Initial commit 2023-06-21 14:53:24 -07:00
Dockerfile docker: hopefully fix dockerfile 2024-02-10 14:12:26 -08:00
LICENSE Update LICENSE 2023-07-24 08:48:24 -07:00
README.md Merge pull request #250 from DarrenOfficial/main 2024-03-15 14:42:00 -07:00
TODO.md feat: add v0.19.0 support 2023-09-28 17:09:09 -07:00
bun.lockb update: mono-svelte 2024-03-24 15:33:14 -07:00
package.json feat: make sort changes the default 2024-03-24 15:51:29 -07:00
postcss.config.js im dying inside 2023-06-24 13:00:09 -07:00
shell.nix misc: Initial commit 2023-06-21 14:53:24 -07:00
svelte.config.js optimize: precompress assets with adapter 2024-02-24 10:38:23 -08:00
tailwind.config.js feat: add basic theming support 2024-03-04 17:48:09 -08:00
tsconfig.json feat: use sveltekit pwa 2023-08-02 18:38:55 -07:00
vercel.json misc: Allow CORS in vercel.json 2023-07-04 13:31:23 -07:00
vite.config.ts misc: misc optimizations 2023-09-18 16:10:16 -07:00
vitest.config.ts feat: Add vitest 2023-07-08 14:54:02 -07:00
yarn-error.log feat: add and close #200 2023-11-29 18:51:31 -08:00
yarn.lock fix: package lock conflict 2024-02-10 16:25:09 -08:00

README.md

Photon

Jump to:

An sleek web client for Lemmy using mono-ui, a custom design system.

Screenshots

Screenshot from 2023-10-07 12-44-01 Screenshot from 2023-10-07 12-44-07

Self-hosting

Put Photon on your own domain for easier onboarding.

Running from image

# Use the env var PUBLIC_INSTANCE_URL to set the default instance URL.
docker run -p 8080:3000 -e PUBLIC_INSTANCE_URL=example.com ghcr.io/xyphyn/photon:latest

Running from repo

More unstable but latest features

Clone the repo:

git clone https://github.com/Xyphyn/photon && cd photon

and run the docker container:

docker build -t photon .

# Use the env var PUBLIC_INSTANCE_URL to set the default instance URL.
docker run -p 8080:3000 -it photon:latest

There you go, you now have an instance of Photon running.

Configuring default settings

The most common settings you'll use are PUBLIC_INSTANCE_URL. Some selfhosters with PUBLIC_SSR_ENABLED set to true might want the instance url to be different for the server. You can use the PUBLIC_INTERNAL_INSTANCE variable for that.

PUBLIC_MIGRATE_COOKIE is useful if you want to switch Photon to your default frontend. It'll convert the logged in cookie from lemmy-ui to a Photon account. It will only work if you have PUBLIC_INSTANCE_URL set, and it will login with that instance.

The following environment variables can be set to override the default settings:

Variable Values Default Value
PUBLIC_INSTANCE_URL URL lemmy.ml
PUBLIC_FAVICON URL `/img/logo-background.svg
PUBLIC_LOCK_TO_INSTANCE bool true if PUBLIC_INSTANCE_URL is set
PUBLIC_SSR_ENABLED bool false
PUBLIC_MIGRATE_COOKIE bool false
PUBLIC_THEME system|dark|light system
PUBLIC_EXPANDABLE_IMAGES bool true
PUBLIC_MARK_READ_POSTS bool true
PUBLIC_REVERT_VOTE_COLORS bool false
PUBLIC_SHOW_INSTANCES_USER bool false
PUBLIC_SHOW_INSTANCES_COMMUNITY bool true
PUBLIC_SHOW_INSTANCES_COMMENTS bool false
PUBLIC_SHOW_COMPACT_POSTS bool false
PUBLIC_DEFAULT_FEED_SORT SortType Active
PUBLIC_DEFAULT_FEED ListingType Local
PUBLIC_DEFAULT_COMMENT_SORT CommentSortType Hot
PUBLIC_HIDE_DELETED bool true
PUBLIC_HIDE_REMOVED bool false
PUBLIC_FULL_WIDTH_LAYOUT bool false
PUBLIC_EXPAND_SIDEBAR bool true
PUBLIC_DISPLAY_NAMES bool true
PUBLIC_NSFW_BLUR bool true
PUBLIC_NEW_VOTE_BUTTONS bool false
PUBLIC_RANDOM_PLACEHOLDERS bool true
PUBLIC_REMOVE_CREDIT bool false

The values for SortType, ListingType, and CommentSortType are defined by the lemmy-js-client library.

Listing Type

https://github.com/LemmyNet/lemmy-js-client/blob/main/src/types/ListingType.ts

  • All
  • Local
  • Subscribed
  • Moderator

Sort Type

(case sensitive)

https://github.com/LemmyNet/lemmy-js-client/blob/main/src/types/SortType.ts

  • Active
  • Hot
  • New
  • Old
  • TopDay
  • TopWeek
  • TopMonth
  • TopAll
  • MostComments
  • NewComments
  • TopHour
  • TopSixHour
  • TopTwelveHour
  • TopThreeMonths
  • TopSixMonths
  • TopNineMonths
  • TopYear

Comment Sort Type

https://github.com/LemmyNet/lemmy-js-client/blob/main/src/types/CommentSortType.ts values:

  • Hot
  • Top
  • New
  • Old
  • Controversial

Public Instances

Want your instance added here? Make a GitHub issue or make a PR! (this is for general purpose Photon instances.)

phtn.app is the official instance and will get updates instantly.

Instance Location Contact
phtn.app (Official) 🇺🇸 US West photon@xylight.dev
ph.opnxng.com 🇸🇬 Singapore about.opnxng.com
photon.thesanewriter.com 🇺🇸 US East thesanewriter@lemmy.thesanewriter.com
p.darrennathanael.com 🇺🇸 US East noc@darrennathanael.com
p.lemmy.ohaa.xyz 🇦🇹 Austria (???)
photon.zhenyapav.com (Has not updated since v1.9.2) 🇮🇸 Iceland zhenyapav@zhenyapav.com
ph.buckodr.ink (Has not updated since v1.21.1) 🇺🇸 US East admin@buckodr.ink
phtn.ngn.tf 🇹🇷 Turkey services@ngn.tf

Donate

You can donate at Buy me a Coffee