Customizable, modular, free and open-source environment for decentralized, distributed communication and collaboration without third-party dependencies.
Development and maintenance tools for matrix rooms and spaces.
/leave
lets you leave every space or room with a given name.
/space
event lets you add a state event with a given name to a given room.
/createStructure
lets you create a nested matrix spaces tree based on a json file
Clone git repository and run npm run build
.
This will create a folder called 'out' with the static website
Installs all of the application’s dependencies.
Configuration happens in the next.config.js
file.
In the project directory, you can run:
Runs the application in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Builds a production-ready version of the application and exports it to the out
directory.
The build is minified and the filenames include the hashes.
When wrapping a <Link>
from next/link
within a styled-component, the as
prop provided by styled
will collide with the Link's as
prop and cause styled-components to throw an "Invalid tag"
error. To avoid this, you can either use the recommended forwardedAs
prop from styled-components or use a different named prop to pass to a styled
Link.
Click to expand workaround example
components/StyledLink.js
import Link from 'next/link'
import styled from 'styled-components'
const StyledLink = ({ as, children, className, href }) => (
<Link href={href} as={as} passHref>
<a className={className}>{children}</a>
</Link>
)
export default styled(StyledLink)`
color: #0075e0;
text-decoration: none;
transition: all 0.2s ease-in-out;
&:hover {
color: #40a9ff;
}
&:focus {
color: #40a9ff;
outline: none;
border: 0;
}
`
pages/index.js
import StyledLink from '../components/StyledLink'
export default () => (
<StyledLink href="/post/[pid]" forwardedAs="/post/abc">
First post
</StyledLink>
)
The Create Structure Route is expecting a json file as an array of objects with following keys :
- name – String
- template – String
- type – String
- parentNames – Array of Strings
- persons – Array of Objects
- name – String
- mail – String
Example:
[
{
"name": "root context name",
"template": "root",
"type": "context",
"parentNames": [
""
],
"persons": [
{
"name": "Firstname Lastname",
"mail": "[email protected]"
}
]
},
{
"name": "sub context name",
"template": "sub",
"type": "context",
"parentNames": [
"root context name"
],
"persons": [
{
"name": "Some-Other Name",
"mail": "[email protected]"
}
]
}
]
- Clone or download the repository.
- Install Node.js.
- Run the tool with your structure file, matrix base_url, matrix server_name, and access_token.
node ./cli/createStructure.js \
-f ./examples/structure.example.json \
-b https://matrix.example.org \
-s example.org \
-t syt_access_token_foo_bar_baz_etc_lorem_ipsum \
- The tool will create the nested matrix spaces based on the input data.
- The output JSON can be used for further usage.
For help, use:
node ./cli/createStructure.js -h