Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 21 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build
/dist

# OS
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Local git
output/
# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
static/dist
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
bun.lock
bun.lockb

# Miscellaneous
/static/
15 changes: 15 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
5 changes: 4 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"recommendations": ["svelte.svelte-vscode"]
"recommendations": [
"svelte.svelte-vscode",
"ardenivanov.svelte-intellisense"
]
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"search.exclude": {
"LICENSE": true,
"pnpm-lock.yaml": true
}
}
52 changes: 52 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
Here's a simple **Code of Conduct** for your repository that sets clear expectations for contributors and helps maintain a positive community atmosphere.

---

# Code of Conduct

## Our Pledge

As contributors and maintainers of this project, we pledge to make participation in our project a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

We are committed to providing a welcoming and supportive environment for all people.

## Our Standards

Examples of behavior that contribute to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy toward other community members

Examples of unacceptable behavior by participants include:

* The use of offensive or discriminatory language
* Personal attacks or insulting comments
* Harassment or trolling in any form
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, or harmful.

## Scope

This Code of Conduct applies within all project spaces, including but not limited to GitHub repositories, discussion forums, and chat channels. It also applies when an individual is representing the project in public spaces or events related to the project.

## Enforcement

Instances of unacceptable behavior may be reported by contacting the project maintainers at \[your email/contact info]. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident.

## Acknowledgements

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1.

---

This is a simple but effective Code of Conduct that ensures everyone has a clear understanding of acceptable behavior and how issues should be handled. Let me know if you'd like to add or adjust anything!
113 changes: 113 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Contributing to LiveMatrix Client

Thank you for your interest in contributing to the **LiveMatrix Client**! We encourage you to follow the guidelines below to help us keep things organized and efficient.

## Development Setup

### 1. Clone the Repository

First, clone the repository to your local machine:

```bash
git clone https://github.com/livematrix/client.git
cd client
```

### 2. Install Dependencies with `pnpm`

We use [pnpm](https://pnpm.io/) as our package manager. To install all necessary dependencies, run:

```bash
pnpm install
```

### 3. Run the Development Server

To preview the application locally, you can use the following command:

```bash
pnpm run dev
```

This will start a development server. You can view the app in your browser by navigating to `http://localhost:5173` (or the port specified in your terminal).

### 4. Build the Standalone Application

To build the product for production (a standalone version), run:

```bash
pnpm run standalone
```

This will generate the final build, which can be deployed as a standalone application.

---

## Folder Structure and Component Breakdown

The source code for the project is located in the `src` directory. Below is an explanation of the different components and their purpose.

### `src/routes/` - Development Preview

The `routes/` directory is where we define the routes used to show different development previews and pages within the application. It serves as the entry point for hosting the development environment.

### `src/_standalone/` - Build Configuration

The `_standalone/` directory contains configuration files used specifically for building the final standalone application. These configurations define how the app should be bundled and optimized for production environments.
It had been created using `pnpm exec standalone create` and should be re-creatable with this function.

### `src/lib/` - Components of the Final Application

The `lib/` directory contains the core components that make up the final product. Below is a breakdown of the most important components:

#### **Bubble.svelte**

* This is the component responsible for displaying the **Bubble** element in the UI. It is a key visual element that can be customized or extended.

#### **Chatbox.svelte**

* This component is responsible for the entire **Chatbox** feature, which encompasses the interactive messaging system.

* **Header.svelte**: The header section that remains constant across all views of the Chatbox.
* **Session.svelte**: The form presented to the user when they have not yet logged in. This typically asks for login credentials or invites the user to register.
* **Messages.svelte**: The view that appears once the user has logged in. It contains the messaging interface and allows users to send and receive messages.

### `src/lib/state.svelte.ts` - Global State Management

The `state.svelte.ts` file handles the **global state** of the application. It manages shared data between components and allows them to communicate seamlessly. This file holds important application state, such as user authentication status and other global variables.

### `src/lib/websocket.ts` - Client-Side WebSocket Communication

The `websocket.ts` file is responsible for handling the **WebSocket** communication with the server. It establishes a connection, listens for events, and sends messages back and forth. This file is crucial for real-time updates in the chat application.

### `src/lib/websocket.server.ts` - Server-Side WebSocket Communication

The `websocket.server.ts` file contains the server-side code that manages the **WebSocket** connection with the Matrix bot. It facilitates communication between the client and the bot, allowing for sending and receiving messages in real time.

---

## Contribution Guidelines

We encourage you to contribute to the project by following these steps:

1. **Fork the repository**: If you haven’t done so already, fork this repository and clone your fork locally.
2. **Create a new branch**: Make sure to create a new branch for your work. Use a descriptive name for the branch, e.g., `fix-bubble-component` or `feature/new-chatbox-header`.
3. **Make your changes**: Write your code, ensuring that it adheres to the project’s coding standards. If you are unsure about style guidelines, please refer to the existing code.
4. **Test your changes**: Make sure to test any changes you make to ensure that they work as expected. Run the development server (`pnpm run dev`) to preview and test locally.
5. **Commit your changes**: Use meaningful commit messages following the [Conventional Commits](https://www.conventionalcommits.org/) format (e.g., `feat: add new chat bubble design`).
6. **Push to your fork**: Push your changes to your fork on GitHub.
7. **Submit a Pull Request**: Create a pull request to the `main` branch of this repository. Be sure to include a clear description of the changes you’ve made and any relevant issues you’ve addressed.

---

## Code of Conduct

By contributing to this project, you agree to adhere to our [Code of Conduct](CODE_OF_CONDUCT.md). Please be respectful, constructive, and collaborative in all your interactions.

---

If you have any questions or need help with something, feel free to reach out via GitHub Issues or the discussion forums. Thank you for contributing to the LiveMatrix Client!

---

This should give developers all the necessary information to contribute to the project. Let me know if you’d like to adjust anything or add more detail!
Loading