{"id":37694811,"url":"https://github.com/ahmeddelattarr/matrix","last_synced_at":"2026-01-16T12:47:01.151Z","repository":{"id":250509637,"uuid":"834275520","full_name":"ahmeddelattarr/matrix","owner":"ahmeddelattarr","description":"A simple, SSL-enabled server/client application written in Python using asyncio and ssl","archived":false,"fork":false,"pushed_at":"2024-08-23T18:57:29.000Z","size":321,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-23T22:07:02.845Z","etag":null,"topics":["asyncio","python","server","ssl"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahmeddelattarr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-26T20:26:44.000Z","updated_at":"2024-08-23T19:18:42.000Z","dependencies_parsed_at":"2024-08-22T21:27:12.057Z","dependency_job_id":"d40d83a2-d2c1-42e8-971f-e8ae0b8a054a","html_url":"https://github.com/ahmeddelattarr/matrix","commit_stats":null,"previous_names":["macdoos/matrix"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ahmeddelattarr/matrix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmeddelattarr%2Fmatrix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmeddelattarr%2Fmatrix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmeddelattarr%2Fmatrix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmeddelattarr%2Fmatrix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmeddelattarr","download_url":"https://codeload.github.com/ahmeddelattarr/matrix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmeddelattarr%2Fmatrix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncio","python","server","ssl"],"created_at":"2026-01-16T12:47:00.718Z","updated_at":"2026-01-16T12:47:01.142Z","avatar_url":"https://github.com/ahmeddelattarr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Matrix: Secure Asyncio Server/Client\n\n\u0026ensp;\n\n\u003cpicture style=\"margin-bottom: 10px;\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://mouseflow.com/wp-content/uploads/2022/01/privacy-shield.svg\"\u003e\n  \u003cimg alt=\"matrix logo\" src=\"https://mouseflow.com/wp-content/uploads/2022/01/privacy-shield.svg\" width=\"100%\"\u003e\n\u003c/picture\u003e\n\n\u0026ensp;\n\nA simple, SSL-enabled server/client application written in Python using `asyncio` and `ssl`.\n\n## Table of Contents\n- [Features](#features)\n- [Project Structure](#project-structure)\n- [Requirements](#requirements)\n- [Setup](#setup)\n- [Usage](#usage)\n- [Key Components](#key-components)\n- [Security](#security)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Features\n- Asynchronous server and client communication\n- SSL encryption for secure data transfer\n- JWT-based authentication\n- PostgreSQL database integration\n- Automatic SSL certificate generation\n\n## Project Structure\n```plaintext\nsrc/\n│\n├── ssl/\n│   ├── cert.pem\n│   ├── key.pem\n├── client.py\n├── testing.py\n├── openssl.cnf\n├── requirements.txt\n├── dbConnection.py\n└── server.py\n```\n\n- `ssl/`: Contains SSL certificate (`cert.pem`) and key (`key.pem`)\n- `client.py`: Asyncio-based client implementation\n- `openssl.cnf`: OpenSSL configuration for certificate generation\n- `requirements.txt`: Project dependencies\n- `dbConnection.py`: Database connection and table initialization\n- `server.py`: Main server code handling connections, JWT, and verification\n- `testing.py`: Main testing, runs with `pytest`\n\n## Requirements\n- Python 3.8+\n- Dependencies (installed via `requirements.txt`):\n  - asyncio\n  - ssl\n  - os\n  - subprocess\n  - pyjwt\n  - python-dotenv\n  - asyncpg\n\n## Setup\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/yourusername/matrix.git\n   cd matrix\n   ```\n\n2. Install dependencies:\n   ```bash\n   bin/install\n   ```\n\n3. Set up environment variables:\n   Create a `.env` file in the project root and add:\n   ```\n   DATABASE_URL=\u003cyour-postgresql-connection-string\u003e\n   ```\n\n## Usage\n### Starting the Server\n```bash\nbin/start\n```\n\n### Running the Client\n```bash\npython client.py\n```\n\nThe client will establish an SSL connection with the server, receive a JWT token, and can then send authenticated messages.\n\n## Key Components\n### SSL Certificate\nThe server automatically generates SSL certificates if not present in the `ssl/` directory, using the `openssl.cnf` configuration.\n\n### JWT Authentication\n- Clients receive a JWT token upon connection, valid for 1 hour\n- The server verifies the JWT token with each communication\n- Clients are notified upon token expiration\n\n### Database Integration\n- Utilizes Neon DB (PostgreSQL)\n- Initializes connection and creates `Users` and `Messages` tables on server start\n\n## Security\n- SSL encryption ensures secure data transfer\n- JWT tokens provide stateless authentication\n- Automatic certificate generation enhances ease of deployment\n\n## Contributing\nContributions are welcome! Please feel free to submit a Pull Request. Run `ruff check` and `pytest` before pushing.\n\n## License\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmeddelattarr%2Fmatrix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmeddelattarr%2Fmatrix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmeddelattarr%2Fmatrix/lists"}