Skip to content

Commit

Permalink
updated dogechat
Browse files Browse the repository at this point in the history
  • Loading branch information
cf committed Aug 24, 2024
1 parent 4f02fd6 commit 22c3a87
Show file tree
Hide file tree
Showing 88 changed files with 514 additions and 108 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# NostrChat
# DogeChat

<img src="public/logo192.png" width="100">

NostrChat is one of the most decentralized chat apps ever built.
DogeChat is one of the most decentralized chat apps ever built.

NostrChat is built on Nostr, and therefore doesn't rely on any centralized servers, just Nostr relays. Everyday users of NostrChat can immediately benefit from Nostr’s decentralized network. Power users can choose to further decentralization by running their own NostrChat client or Nostr relay.
DogeChat is built on Nostr, and therefore doesn't rely on any centralized servers, just Nostr relays. Everyday users of DogeChat can immediately benefit from Nostr’s decentralized network. Power users can choose to further decentralization by running their own DogeChat client or Nostr relay.

Our ReadMe is a summary about NostrChat, what it looks like, and how to use it.
Our ReadMe is a summary about DogeChat, what it looks like, and how to use it.

[Join NostrChat](https://www.nostrchat.io/)
[Join DogeChat](https://dogechat.org/)

## What is Nostr?

[Nostr](https://github.com/nostr-protocol/nostr) is a simple open protocol for creating censorship-resistant global networks.

## How to log into NostrChat
## How to log into DogeChat

From the [Nostrchat.io](https://www.nostrchat.io/) homepage choose one of the following:
From the [Nostrchat.io](https://dogechat.org/) homepage choose one of the following:

**Create Nostr Account** (easiest option for first time users) — Click the button to “Create Nostr Account.” Instantly you’ll be given a new Nostr account. Once you login, it is highly recommended that you go to “Settings -> Keys” and save both your public and private keys. These keys are your access to your Nostr account, and you will need them again in the future.

**Use NIP-07 Wallet** (recommended for return users) — Choose the button “Use NIP-07 Wallet.” Install the Alby wallet browser extension. Once you install Alby you will be able to log into NostrChat. The benefit of the NIP-07 login is that you will manage your private keys locally in the Alby extension.
**Use NIP-07 Wallet** (recommended for return users) — Choose the button “Use NIP-07 Wallet.” Install the Alby wallet browser extension. Once you install Alby you will be able to log into DogeChat. The benefit of the NIP-07 login is that you will manage your private keys locally in the Alby extension.

## How to use NostrChat
## How to use DogeChat

Once you enter NostrChat you can chat in the global chat, or create your own chat channel where you can invite others.
Once you enter DogeChat you can chat in the global chat, or create your own chat channel where you can invite others.

## How to run NostrChat locally
## How to run DogeChat locally

Install dependencies
```bash
Expand All @@ -38,7 +38,7 @@ Start
$ yarn start
```

NostrChat will open in your browser.
DogeChat will open in your browser.

## Roadmap 🛣️

Expand Down
Binary file modified assets/logo-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion capacitor.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { CapacitorConfig } from '@capacitor/cli';

const config: CapacitorConfig = {
appId: 'org.nostrchat.app',
appName: 'NostrChat',
appName: 'DogeChat',
webDir: 'build',
backgroundColor: '#343434',
server: {
Expand Down
Binary file modified icons/icon-128.webp
Binary file not shown.
Binary file modified icons/icon-192.webp
Binary file not shown.
Binary file modified icons/icon-256.webp
Binary file not shown.
Binary file modified icons/icon-48.webp
Binary file not shown.
Binary file modified icons/icon-512.webp
Binary file not shown.
Binary file modified icons/icon-72.webp
Binary file not shown.
Binary file modified icons/icon-96.webp
Binary file not shown.
4 changes: 2 additions & 2 deletions ios/App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = 3CK9WUFA83;
INFOPLIST_FILE = App/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = NostrChat;
INFOPLIST_KEY_CFBundleDisplayName = DogeChat;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand All @@ -372,7 +372,7 @@
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = 3CK9WUFA83;
INFOPLIST_FILE = App/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = NostrChat;
INFOPLIST_KEY_CFBundleDisplayName = DogeChat;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand Down
2 changes: 1 addition & 1 deletion ios/App/App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>NostrChat</string>
<string>DogeChat</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,6 @@
"last 1 firefox version",
"last 1 safari version"
]
}
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
Binary file added public/apple-touch-icon-114x114.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon-120x120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon-152x152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon-57x57.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon-60x60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon-72x72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon-76x76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions public/config/chat-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"updatedAt": "2024-08-24T03:21:11.699Z",
"version": "0.1.0",
"motd": "Welcome to DogeChat - A place for dogecoin enthusiasts to chat and share ideas.",
"blockedWords": [
"/t.me/"
],
"allowedLinkHostnames": [
"github.com",
"www.github.com",
"gist.github.com",
"qedprotocol.com",
"www.qedprotocol.com",
"blog.qedprotocol.com",
"gitlab.com",
"www.gitlab.com",
"bitbucket.org",
"www.bitbucket.org",
"*.qed.me",
"*.doge.toys"
],
"allowedImageHostnames": [
"*.qed.me"
],
"allowedVideoHostnames": [
"*.qed.me"
],
"userDefs": [
{
"id": "c3ee95cac6806bdbd2262e8f486c81ec0d2420c6bfeff34f02c54d41f3c5c731",
"verifiedGroups": ["staff"],
"role": "admin",
"verifiedDescription": "Creator of DogeChat",
"github": "cf",
"twitter": "cmepeq",
"profileNameClass": "staff",
"inlineIcon": "staff_verified"
}
],
"defaultChannels": [
{
"id": "d6e3172b630ef52fe07e922f54678028213676579eb73ef36a1bc3bfc24e101c",
"name": "Dogecoin Core",
"description": "Discuss all things related to Dogecoin Core Development",
"creator": "c3ee95cac6806bdbd2262e8f486c81ec0d2420c6bfeff34f02c54d41f3c5c731",
"created": 1678198928,
"picture": ""
},
{
"id": "35a06e207f4fdcc2aae311bcf2d237c14b58dd6991a7ecaacd8238f61f88f90f",
"name": "Dogecoin Ecosystem Dev",
"description": "Discuss any Dogecoin Ecosystem development topics here including SDKs, Wallets, Indexers and Layer 2s",
"creator": "c3ee95cac6806bdbd2262e8f486c81ec0d2420c6bfeff34f02c54d41f3c5c731",
"created": 1724475440,
"picture": ""
}
]
}
Binary file added public/favicon-128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-196x196.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/favicon.ico
Binary file not shown.
6 changes: 3 additions & 3 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>NostrChat</title>
<title>DogeChat</title>
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="NostrChat"/>
<meta name="twitter:title" content="DogeChat"/>
<meta name="twitter:description" content="A decentralized chat application"/>
<meta name="twitter:image" content="https://www.nostrchat.io/logo512.png"/>
<meta name="twitter:image" content="https://dogechat.org/logo512.png"/>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
Binary file modified public/logo-large-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/logo-large-white1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/logo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"short_name": "NostrChat",
"name": "NostrChat",
"short_name": "DogeChat",
"name": "DogeChat",
"description": "A decentralized chat application",
"icons": [
{
Expand Down
Binary file added public/mstile-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mstile-310x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mstile-310x310.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mstile-70x70.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 3 additions & 1 deletion src/atoms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
} from 'types';
import {GLOBAL_CHAT} from 'const';
import Raven from 'raven/raven';
import type { DogeChatConfig } from 'util/dogeChatConfig';

export * from 'atoms/ui';

Expand Down Expand Up @@ -47,4 +48,5 @@ export const backupWarnAtom = atom<boolean>(false);
export const activeMessageAtom = atom<string | null>(null);
export const readMarkMapAtom = atom<ReadMarkMap>({});
export const showRequestsAtom = atom<boolean>(false);
export const spammersAtom = atom<Record<string, number>>({});
export const spammersAtom = atom<Record<string, number>>({});
export const dogeChatConfigAtom = atom<DogeChatConfig | null>(null);
8 changes: 4 additions & 4 deletions src/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ export const ACCEPTABLE_LESS_PAGE_MESSAGES = 5;
export const SCROLL_DETECT_THRESHOLD = 5;

export const GLOBAL_CHAT: Channel = {
id: 'f412192fdc846952c75058e911d37a7392aa7fd2e727330f4344badc92fb8a22',
name: 'Global Chat',
about: 'Whatever you want it to be, just be nice',
id: 'd6e3172b630ef52fe07e922f54678028213676579eb73ef36a1bc3bfc24e101c',
name: 'Dogecoin Core',
about: 'Discuss all things related to Dogecoin Core Development',
picture: '',
creator: 'aea59833635dd0868bc7cf923926e51df936405d8e6a753b78038981c75c4a74',
creator: 'c3ee95cac6806bdbd2262e8f486c81ec0d2420c6bfeff34f02c54d41f3c5c731',
created: 1678198928
};

Expand Down
22 changes: 22 additions & 0 deletions src/hooks/use-render-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,27 @@ import {notEmpty} from 'util/misc';
const imgReg = /(https:\/\/)([^\s(["<,>/]*)(\/)[^\s[",><]*(.png|.jpg|.jpeg|.gif|.webp)(\?[^\s[",><]*)?/;
const channelReg = new RegExp(`^${window.location.protocol}//${window.location.host}/channel/[a-f0-9]{64}$`, 'm');

const ALLOWED_LINK_DOMAINS = [
'dogechat.org',
'www.dogechat.org',
'github.com',
'www.github.com',
'gist.github.com',
'gitlab.com',
'www.gitlab.com',
'qedprotocol.com',
'www.qedprotocol.com',
'doge-testnet-explorer.qed.me',
'doge-explorer.qed.me',
];

function isValidLink(url: string){
if(url.indexOf('https://') !== 0) return false;
const parsed = new URL(url);
if(ALLOWED_LINK_DOMAINS.includes(parsed.hostname)) return true;
return false;
}

const useRenderContent = () => {
const [, showModal] = useModal();
const styles = useStyles();
Expand All @@ -29,6 +50,7 @@ const useRenderContent = () => {

const renderLink = (args: IntermediateRepresentation) => {
const {href} = args.attributes;
if(!isValidLink(href)) return <span className='badLink'>[Link Removed]</span>;

if (href.match(channelReg)) {
const s = href.split('/');
Expand Down
3 changes: 2 additions & 1 deletion src/hooks/use-styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ const useStyles = () => {
overflowX: 'hidden'
},
sideBarWidth: '270px',
sideBarFooterHeight: '50px',
sideBarFooterHeight: '60px',
sideBarFooterImageHeight: '40px',
headerHeight: '88px'
}
}
Expand Down
107 changes: 87 additions & 20 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,68 @@ body {
}


body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
/* comic-neue-300 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Comic Neue';
font-style: normal;
font-weight: 300;
src: url('assets/fonts/ComicNeue/comic-neue-v8-latin-300.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
url('assets/fonts/ComicNeue/comic-neue-v8-latin-300.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */
}

/* comic-neue-300italic - latin */
@font-face {
font-weight: 400;
font-family: 'Faktum';
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Comic Neue';
font-style: italic;
font-weight: 300;
src: url('assets/fonts/ComicNeue/comic-neue-v8-latin-300italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
url('assets/fonts/ComicNeue/comic-neue-v8-latin-300italic.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */
}
/* comic-neue-regular - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Comic Neue';
font-style: normal;
src: url('assets/fonts/faktum/FaktumWideMedium.otf') format('opentype'),
url('assets/fonts/faktum/FaktumWideMedium.woff') format('woff'),
url('assets/fonts/faktum/FaktumWideMedium.woff2') format('woff2');
font-display: block;
font-weight: 400;
src: url('assets/fonts/ComicNeue/comic-neue-v8-latin-regular.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
url('assets/fonts/ComicNeue/comic-neue-v8-latin-regular.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */
}

/* comic-neue-italic - latin */
@font-face {
font-weight: 600;
font-family: 'Faktum';
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Comic Neue';
font-style: italic;
font-weight: 400;
src: url('assets/fonts/ComicNeue/comic-neue-v8-latin-italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
url('assets/fonts/ComicNeue/comic-neue-v8-latin-italic.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */
}
/* comic-neue-700 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Comic Neue';
font-style: normal;
src: url('assets/fonts/faktum/FaktumWideSemiBold.otf') format('opentype'),
url('assets/fonts/faktum/FaktumWideSemiBold.woff') format('woff'),
url('assets/fonts/faktum/FaktumWideSemiBold.woff2') format('woff2');
font-display: block;
font-weight: 700;
src: url('assets/fonts/ComicNeue/comic-neue-v8-latin-700.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
url('assets/fonts/ComicNeue/comic-neue-v8-latin-700.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */
}
/* comic-neue-700italic - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Comic Neue';
font-style: italic;
font-weight: 700;
src: url('assets/fonts/ComicNeue/comic-neue-v8-latin-700italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
url('assets/fonts/ComicNeue/comic-neue-v8-latin-700italic.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */
}

body {
font-family: 'Comic Neue', 'Comic Sans MS', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
#root {
height: 100%;
}
Expand Down Expand Up @@ -83,3 +117,36 @@ em-emoji-picker {
color: #FFD60A;
}
}

.message {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.profileName {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.profileNameGithub, a.profileNameGithub:visited {
display: inline;
color:inherit;
align-items: flex-end;
justify-content: flex-end;
font-weight: 500;
font-size:0.9em;
text-decoration: none;
margin-left: 4px;
padding:2px 6px;
border-radius: 3px;
background:rgba(200,200,200,0.25);
color:#fff;

.profileGithubIcon {
height:0.75em;
padding-right:0.35em;
}
}

.MuiDialog-paper {
background:#1f1f1f;
background-image: none !important;
}
Loading

0 comments on commit 22c3a87

Please sign in to comment.