Skip to content

Commit

Permalink
created project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhupesh-MS authored and hai-ko committed Sep 13, 2023
1 parent 46f1cfb commit 566d5a5
Show file tree
Hide file tree
Showing 35 changed files with 1,319 additions and 3 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
"packages/web",
"packages/billboard-widget",
"packages/integration-tests",
"packages/offchain-resolver"
"packages/offchain-resolver",
"packages/messenger-widget",
"packages/messenger-demo"
],
"nohoist": [
"**/react",
Expand Down
24 changes: 24 additions & 0 deletions packages/messenger-demo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
.env
22 changes: 22 additions & 0 deletions packages/messenger-demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# dm3-web
## Getting Started

### Build

```
cd ../../ && yarn build
```


### Usage


yarn:
```
yarn start
```

npm:
```
yarn start
```
31 changes: 31 additions & 0 deletions packages/messenger-demo/config-overrides.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const webpack = require('webpack');
module.exports = function override(config) {
const fallback = config.resolve.fallback || {};
Object.assign(fallback, {
crypto: require.resolve('crypto-browserify'),
stream: require.resolve('stream-browserify'),
assert: require.resolve('assert'),
http: require.resolve('stream-http'),
https: require.resolve('https-browserify'),
os: require.resolve('os-browserify'),
url: require.resolve('url'),
path: require.resolve('path-browserify'),
});
config.module.rules.push({
test: /\.(js|mjs|jsx)$/,
enforce: 'pre',
loader: require.resolve('source-map-loader'),
resolve: {
fullySpecified: false,
},
});
config.resolve.fallback = fallback;

config.plugins = (config.plugins || []).concat([
new webpack.ProvidePlugin({
process: 'process/browser',
Buffer: ['buffer', 'Buffer'],
}),
]);
return config;
};
65 changes: 65 additions & 0 deletions packages/messenger-demo/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"name": "messenger-demo",
"version": "0.1.0",
"dependencies": {
"@popperjs/core": "^2.11.8",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.2",
"@types/node": "^16.11.41",
"@types/react": "^18.0.13",
"@types/react-dom": "^18.0.5",
"autoprefixer": "10.4.5",
"bootstrap": "^5.1.3",
"messenger-widget": "0.2.0",
"postcss": "^8.4.24",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"three": "^0.142.0",
"typescript": "^4.7.3",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "echo 'no tests'",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@testing-library/dom": "^9.3.1",
"@types/three": "^0.141.0",
"add": "^2.0.6",
"assert": "^2.0.0",
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.0",
"https-browserify": "^1.0.0",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.1",
"process": "^0.11.10",
"react-app-rewired": "^2.2.1",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"url": "^0.11.0",
"yarn": "^1.22.19"
}
}
Binary file added packages/messenger-demo/public/dark-logo.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 packages/messenger-demo/public/dm3-logo.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 packages/messenger-demo/public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions packages/messenger-demo/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />

<link rel="icon" href="%PUBLIC_URL%/favicon.png" type="image/svg+xml">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="dm3"
content="dm3 enables decentralized, open, and secure messaging using established web3 services"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/favicon.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
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>dm3</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
Binary file added packages/messenger-demo/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 added packages/messenger-demo/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.
8 changes: 8 additions & 0 deletions packages/messenger-demo/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"short_name": "dm3",
"name": "dm3 enables decentralized, open, and secure messaging using established web3 services",
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#000000"
}
3 changes: 3 additions & 0 deletions packages/messenger-demo/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
14 changes: 14 additions & 0 deletions packages/messenger-demo/src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import 'bootstrap/dist/css/bootstrap.min.css';
import 'bootstrap/dist/js/bootstrap.bundle.min.js';
//@ts-ignore
import { DM3 } from 'messenger-widget';

function App() {
return (
<>
<DM3 />
</>
);
}

export default App;
Loading

0 comments on commit 566d5a5

Please sign in to comment.