This documentation provides an overview of the architecture, as well as instructions for setting up and running the Syntron application, and basic documentation of the provided scripts.
graph TD;
subgraph Web
auth_api[Auth API]
web_ui[Web UI]
end
subgraph Game
tst[TST Server]
pub_sumo[Pub Sumo Server]
watcher[Watcher]
end
subgraph database
postgres[Postgres]
end
web_ui --> auth_api
auth_api --> postgres
tst --> watcher
pub_sumo --> watcher
watcher --> auth_api
-
Web UI: The front-end user interface, written in TypeScript, interacts with the Auth API for authentication processes. It's a Next.js application that uses React for rendering, and Tailwind CSS for styling.
-
Auth API: Also written in TypeScript, this handles all authentication requests and interacts directly with the Postgres database. Express.js is used as the server framework.
-
Watcher: A TypeScript service that monitors interactions between the TST and Pub Sumo servers and communicates with the Auth API.
-
TST Server & Pub Sumo Server: Backend servers responsible for core game logic and public summaries respectively. Shoutout to my fellow insomniac Light (https://lightron.org/) for the docker image.
-
Postgres: The database used for storing user and authentication data.
The following scripts are located in the scripts
directory of the project.
The application is containerized using Docker Compose. Below are the steps to set up and run the application.
- Docker
- Docker Compose
- Node.js (for running local TypeScript setups if necessary)
- Clone the repository to your local machine.
- Navigate to the root of the project where the
docker-compose.yml
file is located. - Ensure you have a
.env
file in the root directory with all the necessary environment variables set. - Run the following command to start all services:
docker-compose up
The application uses an ELK (Elasticsearch, Logstash, Kibana) stack for logging purposes.
- Access Logs: Visit `http://localhost:5601\` to access Kibana and view the logs.
- When developing locally, ensure all TypeScript services (Web UI, Auth API, Watcher) are compiled and up-to-date.
- Use the provided Docker setup to maintain consistency in development and production environments.
Contributions are welcome! Please fork the repository and submit pull requests with your proposed changes.
For any additional support or queries, please open an issue in the repository or contact me at [email protected].