diff --git a/README.md b/README.md index 5356b998b..ab3fbca9e 100644 --- a/README.md +++ b/README.md @@ -198,6 +198,23 @@ The source code lives in `/root/code/cinny`. All changes should be made on the ` See [LOTUS_FEATURES.md](LOTUS_FEATURES.md) for the full feature changelog and [LOTUS_TODO.md](LOTUS_TODO.md) for the work backlog. +### Local Development + +Lotus Chat is a **pure client — there is no backend of its own to run.** It talks directly to a Matrix homeserver (Synapse) over HTTPS, so the only thing you run locally is the Vite dev server; it connects to a real homeserver for all data. If you were looking for "the backend to pair with it," there isn't one — that's the homeserver. + +**Prerequisites:** Node 20+ (CI builds on Node 24) and npm. + +```bash +npm ci # deps; @lotusguild/* come from our Gitea npm registry (public read — no auth/token needed) +npm start # Vite dev server → http://localhost:8080 +``` + +The dev server defaults to **port 8080** (`vite.config.js`); if 8080 is already in use it falls through to 8081+, so check the "Local:" URL Vite prints on startup. If it boots but the page renders blank, it's almost always a failed module/asset resolution, not a "missing backend" — open the devtools console and read the first error. + +**Which homeserver / logging in:** `config.json` sets `defaultHomeserver: 0` → `matrix.lotusguild.org`, so you sign in with your normal `@you:matrix.lotusguild.org` account. That homeserver is **live production** — anything you send is real, so keep test traffic to a DM with yourself or a throwaway room. To develop fully isolated instead, point `config.json` at a throwaway `matrix.org` account (already in `homeserverList`) or a local Synapse. + +- **SSO / OIDC works from localhost.** Login goes through Authelia via OIDC dynamic registration; the provider redirects back to `http://localhost:8080/…` and the client registers that redirect on the fly, so no server-side allow-listing is needed. After the callback you may see a `GET …/_matrix/media/v1/thumbnail/… 404` — that's just a missing avatar thumbnail, **not** a login failure. + ### 🔱 Element Call fork ("Lotus Call") — LIVE Voice/video channels embed **Element Call**, which is now our **self-built fork** diff --git a/src/app/features/settings/about/About.tsx b/src/app/features/settings/about/About.tsx index 246f871a3..3c5fdf357 100644 --- a/src/app/features/settings/about/About.tsx +++ b/src/app/features/settings/about/About.tsx @@ -4,12 +4,12 @@ import { Page, PageContent, PageHeader } from '../../../components/page'; import { SequenceCard } from '../../../components/sequence-card'; import { SequenceCardStyle } from '../styles.css'; import { SettingTile } from '../../../components/setting-tile'; +import { getOriginBaseUrl, withOriginBaseUrl } from '../../../pages/pathUtils'; import pkg from '../../../../../package.json'; import { clearCacheAndReload } from '../../../../client/initMatrix'; import { useMatrixClient } from '../../../hooks/useMatrixClient'; -import { getOriginBaseUrl, withOriginBaseUrl } from '../../../pages/pathUtils'; -const LotusLogo = withOriginBaseUrl(getOriginBaseUrl(), '/Lotus.png'); +const LotusLogo = withOriginBaseUrl(getOriginBaseUrl(), '/public/res/Lotus.png'); type MSC1929Contact = { matrix_id?: string; diff --git a/src/app/pages/auth/AuthLayout.tsx b/src/app/pages/auth/AuthLayout.tsx index b57f82984..a448f75b4 100644 --- a/src/app/pages/auth/AuthLayout.tsx +++ b/src/app/pages/auth/AuthLayout.tsx @@ -20,6 +20,7 @@ import { } from '../../hooks/useClientConfig'; import { AsyncStatus, useAsyncCallback } from '../../hooks/useAsyncCallback'; import { LOGIN_PATH, REGISTER_PATH, RESET_PASSWORD_PATH } from '../paths'; +import { getOriginBaseUrl, withOriginBaseUrl } from '../pathUtils'; import { ServerPicker } from './ServerPicker'; import { AutoDiscoveryAction, autoDiscovery } from '../../cs-api'; import { SpecVersionsLoader } from '../../components/SpecVersionsLoader'; @@ -29,9 +30,8 @@ import { AuthFlowsLoader } from '../../components/AuthFlowsLoader'; import { AuthFlowsProvider } from '../../hooks/useAuthFlows'; import { AuthServerProvider } from '../../hooks/useAuthServer'; import { tryDecodeURIComponent } from '../../utils/dom'; -import { getOriginBaseUrl, withOriginBaseUrl } from '../pathUtils'; -const LotusLogo = withOriginBaseUrl(getOriginBaseUrl(), '/Lotus.png'); +const LotusLogo = withOriginBaseUrl(getOriginBaseUrl(), '/public/res/Lotus.png'); const currentAuthPath = (pathname: string): string => { if (matchPath(LOGIN_PATH, pathname)) { diff --git a/src/app/pages/auth/oidc/oidcConfig.ts b/src/app/pages/auth/oidc/oidcConfig.ts index 69733eb16..0e4ff4e4e 100644 --- a/src/app/pages/auth/oidc/oidcConfig.ts +++ b/src/app/pages/auth/oidc/oidcConfig.ts @@ -2,7 +2,7 @@ import type { OidcRegistrationClientMetadata } from 'matrix-js-sdk'; import { OIDC_CALLBACK_PATH } from '../../paths'; import { getOriginBaseUrl, withOriginBaseUrl } from '../../pathUtils'; -const LotusLogo = withOriginBaseUrl(getOriginBaseUrl(), '/Lotus.png'); +const LotusLogo = withOriginBaseUrl(getOriginBaseUrl(), '/public/res/Lotus.png'); /** * Absolute URL the OIDC provider redirects back to after authorization. diff --git a/src/app/pages/client/ClientNonUIFeatures.tsx b/src/app/pages/client/ClientNonUIFeatures.tsx index e6863f3d5..30300b8a9 100644 --- a/src/app/pages/client/ClientNonUIFeatures.tsx +++ b/src/app/pages/client/ClientNonUIFeatures.tsx @@ -76,6 +76,10 @@ const LogoHighlightSVG = withOriginBaseUrl(getOriginBaseUrl(), '/lotus-highlight // Grace period after the initial sync settles before invite notifications arm, so // the async invite-atom population lands first and isn't mistaken for new invites. +const LogoSVG = withOriginBaseUrl(getOriginBaseUrl(), '/public/res/lotus.png'); +const LogoUnreadSVG = withOriginBaseUrl(getOriginBaseUrl(), '/public/res/lotus-unread.png'); +const LogoHighlightSVG = withOriginBaseUrl(getOriginBaseUrl(), '/public/res/lotus-highlight.png'); + const INVITE_NOTIFY_ARM_DELAY_MS = 3000; function SystemEmojiFeature() { diff --git a/src/app/pages/client/WelcomePage.tsx b/src/app/pages/client/WelcomePage.tsx index 20dfe3b4c..f1498f9cb 100644 --- a/src/app/pages/client/WelcomePage.tsx +++ b/src/app/pages/client/WelcomePage.tsx @@ -1,10 +1,10 @@ import React from 'react'; import { Box, Button, Icon, Icons, Text, config, toRem } from 'folds'; import { Page, PageHero, PageHeroSection } from '../../components/page'; -import pkg from '../../../../package.json'; import { getOriginBaseUrl, withOriginBaseUrl } from '../pathUtils'; +import pkg from '../../../../package.json'; -const LotusLogo = withOriginBaseUrl(getOriginBaseUrl(), '/Lotus.png'); +const LotusLogo = withOriginBaseUrl(getOriginBaseUrl(), '/public/res/Lotus.png'); export function WelcomePage() { return (