Metadata-Version: 2.3
Name: nightwatch-chat
Version: 0.10.0
Summary: The chatting application to end all chatting applications.
Project-URL: Homepage, https://github.com/iiPythonx/nightwatch
Project-URL: Issues, https://github.com/iiPythonx/nightwatch/issues
Author-email: iiPython <ben@iipython.dev>
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: emoji>=2.14.0
Requires-Dist: fastapi>=0.115.5
Requires-Dist: nanoid>=2.0.0
Requires-Dist: orjson>=3.10.11
Requires-Dist: readchar>=4.2.1
Requires-Dist: requests>=2.32.3
Requires-Dist: urwid>=2.6.16
Requires-Dist: uvicorn[standard]>=0.32.1
Requires-Dist: websockets>=14.1
Provides-Extra: serve
Requires-Dist: pydantic>=2.9.2; extra == 'serve'
Description-Content-Type: text/markdown

<h1 align = "center">Nightwatch</h1>
<div align = "center">

![Python](https://img.shields.io/badge/Python-%3E=%203.10-4b8bbe?style=for-the-badge&logo=python&logoColor=white)
![Rust](https://img.shields.io/badge/Rust-%3E=%201.60-221f1e?style=for-the-badge&logo=rust&logoColor=white)

The chatting application to end all chatting applications. 

</div>

# Installation

As an end-user, you have multiple clients to pick from when it comes to accessing Nightwatch.  
Here are two of the standard clients for you to choose from:
- Terminal Client ([based on urwid](https://urwid.org/index.html))
    - Installation is as simple as `pip install nightwatch-chat`.
    - The client can be started by running `nightwatch` in your terminal.

- Browser App
    - Available in the `nightwatch/web` folder.
    - Alternatively, access it at [nightwatch.iipython.dev](https://nightwatch.iipython.dev).

# Server Installation

Running a Nightwatch server can be a bit trickier then running the client, but follow along:

```sh
git clone https://github.com/iiPythonx/nightwatch && cd nightwatch
git checkout release
uv venv
uv pip install -e .
uvicorn nightwatch.rics:app --host 0.0.0.0
```

An example NGINX configuration:

```conf
server {

    # SSL
    listen              443 ssl;
    ssl_certificate     /etc/ssl/nightwatch.pem;
    ssl_certificate_key /etc/ssl/nightwatch.key;

    # Setup location
    server_name nightwatch.iipython.dev;
    location /api {
        proxy_pass http://192.168.0.1:8000;
        proxy_http_version 1.1;
    }
    location /api/ws {
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection upgrade;
        proxy_pass http://192.168.0.1:8000/api/ws;
        proxy_http_version 1.1;
    }
}
```

# Configuration

Configuration is available at:
- ***nix systems**: ~/.config/nightwatch
- **Windows**: %LocalAppData%\Nightwatch

Client (terminal) configuration is available at `client.json`, while the server configuration is stored in `server.json`.  
The Nightwatch client uses the JSON for username, coloring, and more. Check the `/config` command for more information. 
The backend chat server uses the config file for the server name, although more is sure to come.
