โ˜”๐ŸŽ€ Translation made with simplicity, yet robust. ~ Backend portion of Arisu, made in Go.

โ˜” Tsubaki

Website โ€ข Discord โ€ข Discussions

Translation made with simplicity, yet robust. Made with ๐Ÿ’– using TypeScript, React with Next.js.

Tsubaki is the backend portion of Arisu. This has been moved from Arisu/app because of two reasons:

  • The JavaScript port will not work in scalability, so this is a re-worked version in a good language for managing HTTP services.
  • The more complex Arisu gets, I don't think that keep maintaining the code will be matured in the long run.

The frontend repository and the GitHub bot will reside in the main repository.

Features

  • :octocat: Open Source and Free โ€” Arisu is 100% free and open source, so you can host your own instance if you please!
  • โœจ Monorepos โ€” Create multiple subprojects into a single repository without having to maintain multiple repositories.
  • โšก Robust โ€” Arisu makes your workflow way easier and manageable without any high latency.

Tech Stack

Backend

APIs

Frontend

Projects

Arisu is split into multiple projects to reduce workloads.

  • telemetry-server - Telemetry server to track error reports and data usage between services
  • :octocat: github-bot - GitHub bot to sync your translation from both parties.
  • fubuki - Website portion of Arisu, made with React + Next.js
  • ๐Ÿณ docs - Documentation site for Arisu.
  • โ›ด cli - CLI to connect your Arisu project with your machine or any CI service.

Installation

You have four options to run Tsubaki:

Prerequisites

Before running your own instance of Arisu, you are required to have:

  • PostgreSQL
  • Redis
  • Go
  • 1GB of RAM higher on your system
  • 2 CPU cores or higher on your system

Any optional software to optimize the experience of Arisu:

Installation: Docker

Before we get started, you will need Docker required to be running, optionally Docker Desktop for Mac or Windows.

You are allowed to use a SemVer version from our Releases in the Docker image.

# 1. Pull our Docker image to your machine
$ docker pull arisuland/tsubaki:latest # Replace `:latest` with the version, i.e, `:1.0.0`

# 2. Create a network to run the application under localhost
$ docker network create <name> --bridge app-tier

# 3. Run the image with the network attached
$ docker run -d -p 8787:8787 --name tsubaki \
  -v <path to config.yml>:/opt/arisu/tsubaki/config.yml \
  -e TSUBAKI_PORT=8787 \
  arisuland/tsubaki:latest -c /opt/arisu/tsubaki/config.yml

Installation: Locally

You are required to have Git on your machine before contributing / continuing.

# 1. Pull the repository down to your machine
$ git pull https://github.com/arisuland/tsubaki

# 2. Change the directory to `tsubaki` and run `go get`
$ cd tsubaki && go get

# 3. Build the binary with GNU Make
# If you're using Windows, install Make with Chocolatey: `choco install make`
$ make build

# 4. Run the binary
$ ./build/tsubaki -c config.yml # Add `.exe` if running on Windows

Configuration

Tsubaki's configuration file can be set in any directory with the .yml extension, you can also use environment variables prefixed with TSUBAKI_ to override them from config.yml or set them if it doesn't exist in config.yml.

# If registrations should be enabled on the server. If not, you are
# required to create a user on the administration dashboard.
#
# Type: Boolean
# Default: true
# Variable: TSUBAKI_REGISTRATIONS
registrations: Boolean

# DSN URI to link up Sentry to Tsubaki. This will output GraphQL, request, and database
# errors towards Sentry.
#
# Type: String?
# Default: nil
# Variable: TSUBAKI_SENTRY_DSN
sentry_dsn: String?

# If Tsubaki should send telemetry events to Arisu, read up on what we do
# before enabling: https://docs.arisu.land/telemetry
#
# Type: Boolean
# Default: false
# Variable: TSUBAKI_ENABLE_TELEMETRY
telemetry: Boolean

# Returns the site-name to embed on the navbar of your Fubuki instance.
#
# Type: String?
# Default: Arisu
# Variable: TSUBAKI_SITE_NAME
site_name: String?

# Returns the site icon to use when displayed on the website.
#
# Type: String?
# Default: https://cdn.arisu.land/lotus.png
# Variable: TSUBAKI_SITE_ICON
site_icon: String?

# Returns a number on how many retries before panicking on an unavailable port
# to run Tsubaki on. To disable this, use `-1` as the value.
#
# Type: Int
# Default: 5
# Max: 15
# Min: -1
# Variable: TSUBAKI_PORT_RETRY
port_retry: Int

# Uses a host URI when launching the HTTP server. If you wish to keep Tsubaki
# running internally, you can use `127.0.0.1` instead of the default `0.0.0.0`.
#
# Type: String
# Default: "0.0.0.0"
# Variable: TSUBAKI_HOST or HOST
host: String

# Uses a different port other than 2809. If the port is taken, it will
# try to find an available one round-robin style and use that one that
# isn't taken. You can set how many tries using the `port_retry` config
# variable.
#
# Type: Int
# Default: 28093
# Range: 80-65535 on root; 1024-65535 on non-root
port: Int

# Returns the configuration for using the filesystem, S3,
# or Google Cloud Storage to backup your projects.
#
# Type: FilesystemConfig
# Default:
#   fs:
#     directory: <cwd>/.arisu
# Prefix: TSUBAKI_STORAGE
storage:
  # Configures using the filesystem to host your projects, once the data
  # is removed, Arisu will fix it but cannot restore your projects.
  # If you're using Docker or Kubernetes, it is best assured that you
  # must create a volume so Arisu can interact with it.
  #
  # Type: FileSystemStorageConfig
  # Aliases: `fs`
  # Variable: TSUBAKI_STORAGE_FS_*
  filesystem:
    # Returns the directory to store your projects in. Arisu will attempt
    # to create a `arisu.lock` file to show that the directory can be used.
    #
    # Type: String
    # Variable: TSUBAKI_STORAGE_FS_DIRECTORY
    # Default: <cwd>/.arisu
    directory: String

  # Configures using S3 to host your projects, once the bucket is gone,
  # Arisu will attempt to create the bucket but your data will be lost.
  #
  # Type: S3StorageConfig
  s3:
    # Returns the provider to use when authenticating to S3. Arisu supports
    # Amazon S3, Wasabi, or using Minio. By default, it will attempt to use
    # Amazon S3.
    #
    # Type: S3Provider?
    # Variable: TSUBAKI_STORAGE_S3_PROVIDER
    # Default: S3Provider.AMAZON
    provider: S3Provider

    # Returns the bucket to use when storing files. If this bucket
    # doesn't exist, Arisu will attempt to create the bucket.
    # By default, Arisu will use `arisu` as the default bucket name
    # if this is not set.
    #
    # Type: String
    # Variable: TSUBAKI_STORAGE_S3_BUCKET
    # Default: "arisu"
    bucket: String

    # Returns the access key for authenticating to S3. If this isn't provided,
    # it will attempt to look for your credentials stored in `~/.aws`. This is a
    # recommended variable to set if using the S3 provider.
    #
    # Type: String
    # Variable: TSUBAKI_STORAGE_S3_ACCESS_KEY
    # Default: "access_key" key in ~/.aws/tsubaki_config
    access_key: String

    # Returns the secret key for authenticating to S3. If this isn't provided,
    # it will attempt to look for your credentials stored in `~/.aws`. This is a
    # recommended variable to set if using the S3 provider.
    #
    # Type: String
    # Variable: TSUBAKI_STORAGE_S3_SECRET_KEY
    # Default: "access_key" key in ~/.aws/tsubaki_config
    secret_key: String

    # Returns the region to host your bucket, this is dependant on if you
    # created the bucket without running Tsubaki. This is required to set to
    # so no errors will occur while authenticating to S3.
    #
    # Type: String
    # Variable: TSUBAKI_STORAGE_S3_REGION
    # Default: "us-east1"
    region: String

# Configuration to setup a Kafka producer to use for messaging queues.
# This is required if you're running the GitHub bot.
#
# Type: KafkaConfig
# Default: nil
# Prefix: TSUBAKI_KAFKA
kafka:
  # If the producer should auto create the topic for you.
  #
  # Type: Boolean
  # Variable: TSUBAKI_KAFKA_AUTO_CREATE_TOPICS
  # Default: true
  auto_create_topics: Boolean

  # A list of brokers to connect to. This returns a List of `host:port` strings. If you're
  # using an environment variable to set this, split it with `,` so it can be registered properly!
  #
  # Type: List<String>
  # Variable: TSUBAKI_KAFKA_BROKERS
  # Default: localhost:9092
  brokers: List<String>

  # Returns the topic to send messages towards the GitHub bot to Tsubaki.
  # Warning: This must be the same as the one you set on the GitHub bot configuration
  # or it will not receive messages.
  #
  # Type: String
  # Variable: TSUBAKI_KAFKA_TOPIC
  # Default: `arisu:tsubaki`
  topic: String

# Returns the configuration for using Redis to cache user sessions.
# Sentinel and Standalone are supported.
#
# Type: RedisConfig
# Default:
#   redis:
#     host: localhost
#     port: 6379
# Prefix: TSUBAKI_REDIS
redis:
  # Sets a list of sentinel servers to use when using Redis Sentinel
  # instead of Redis Standalone. The `master` key is required if this
  # is defined. This returns a List of `host:port` strings. If you're
  # using an environment variable to set this, split it with `,` so it can be registered properly!
  #
  # Type: List<String>?
  # Variable: TSUBAKI_REDIS_SENTINEL_SERVERS
  # Default: nil
  sentinels: List<String>?

  # If `requirepass` is set on your Redis server, this property will authenticate
  # Tsubaki once the connection is being dealt with.
  #
  # Type: String?
  # Variable: TSUBAKI_REDIS_PASSWORD
  # Default: nil
  password: String?

  # Returns the master name for connecting to any redis sentinel servers.
  #
  # Type: String?
  # Variable: TSUBAKI_REDIS_SENTINEL_MASTER
  # Default: nil
  master: String?

  # Returns the database index to use so you don't clutter your server
  # with Tsubaki-set configs.
  #
  # Type: Int
  # Variable: TSUBAKI_REDIS_DATABASE_INDEX
  # Default: 5
  index: Int

  # Returns the host for connecting to Redis.
  #
  # Type: String
  # Default: "localhost"
  # Variable: TSUBAKI_REDIS_HOST
  host: String

  # Returns the port to use when connecting to Redis.
  #
  # Type: Int
  # Default: 6379
  # Range: 80-65535 on root; 1024-65535 on non-root
  # Variable: TSUBAKI_REDIS_PORT
  port: Int

License

Tsubaki is released under the GPL-3.0 License by Noelware. If you wish to view the whole license, read the LICENSE file.

Owner
Arisu
โ˜” Translation made with simplicity, yet robust.
Arisu
Similar Resources

A simple self-hostable Machine Translation service, powered by spaGO

A simple self-hostable Machine Translation service, powered by spaGO

Nov 9, 2022

Python library for the DeepL language translation API.

The DeepL API is a language translation API that allows other computer programs to send texts and documents to DeepL's servers and receive high-quality translations.

Jan 6, 2023

Read from standard input and output a Haags translation of the given input.

haags Read from standard input and output a Haags translation of the given input. Building make && sudo make install You may also run go build on syst

Oct 23, 2022

An easy-to-use OCR and Japanese to English translation tool

An easy-to-use OCR and Japanese to English translation tool

Manga Translator An easy-to-use application for translating text in images from Japanese to English. The GUI was created using Gio. Gio supports a var

Dec 28, 2022

Azure translation SDK For Golang

azure-translate Azure translation SDK Example key := "YOUR-SUBSCRIPTION-KEY" location := "global" client := translate.NewClient(key, location) result

Mar 15, 2022

Prosper - General app launcher with support for translation, calc, currency and unit conversion.

Prosper - General app launcher with support for translation, calc, currency and unit conversion.

Prosper Description General app launcher with support for translation, calc, currency and unit conversion. Global shortcut is Option (Alt) + Space Fea

Dec 6, 2022

DuckAGoGo - CLI Application for quick searches and translation

DuckAGoGo - CLI Application for quick searches and translation

DuckAGoGo CLI Application for quick searches and translation DuckAGoGo lets you

Jan 10, 2022

Complete Translation - translate a document to another language

 Complete Translation - translate a document to another language

Complete Translation This project is to translate a document to another language. The initial target is English to Korean. Consider this project is no

Feb 25, 2022

HIDI - flexible HID to MIDI translation layer

HIDI - flexible HID to MIDI translation layer

This application is a translation layer between HID devices like keyboards or gamepads and MIDI interface

Dec 1, 2022

An extensive Philips Hue client library for Go with an emphasis on simplicity

An extensive Philips Hue client library for Go with an emphasis on simplicity

Huego An extensive Philips Hue client library for Go with an emphasis on simplicity. It is designed to be clean, unbloated and extensible. With Huego

Dec 28, 2022

Fluux XMPP is a Go XMPP library, focusing on simplicity, simple automation, and IoT.

Fluux XMPP is a Go XMPP library, focusing on simplicity, simple automation, and IoT. The goal is to make simple to write simple XMPP client

Dec 14, 2022

GO2P is a P2P framework, designed with flexibility and simplicity in mind

GO2P is a P2P framework, designed with flexibility and simplicity in mind

go2p golang p2p framework By v-braun - viktor-braun.de. Description GO2P is a P2P framework, designed with flexibility and simplicity in mind. You can

Jan 5, 2023

A scalable overlay networking tool with a focus on performance, simplicity and security

What is Nebula? Nebula is a scalable overlay networking tool with a focus on performance, simplicity and security. It lets you seamlessly connect comp

Dec 29, 2022

A fast port scanner written in go with a focus on reliability and simplicity. Designed to be used in combination with other tools for attack surface discovery in bug bounties and pentests

A fast port scanner written in go with a focus on reliability and simplicity. Designed to be used in combination with other tools for attack surface discovery in bug bounties and pentests

Naabu is a port scanning tool written in Go that allows you to enumerate valid ports for hosts in a fast and reliable manner. It is a really simple to

Dec 31, 2022

A tiny Nano wallet, focused on ease of use through simplicity

atto is a tiny Nano wallet, which focuses on ease of use through simplicity. Disclaimer: I am no cryptographer and atto has not been audited. I cannot

Nov 14, 2022

gosq is a parsing engine for a simplicity-focused, template-based SQL query builder for Go.

gosq is a parsing engine for a simplicity-focused, template-based SQL query builder for Go.

Oct 24, 2022

fofax is a fofa query tool written in go, positioned as a command-line tool and characterized by simplicity and speed.

fofax is a fofa query tool written in go, positioned as a command-line tool and characterized by simplicity and speed.

fofaX 0x00 Introduction fofax is a fofa query tool written in go, positioned as

Jan 8, 2023

Goph - A lightweight Go SSH client focusing on simplicity

Goph - A lightweight Go SSH client focusing on simplicity

Golang SSH Client. Fast and easy golang ssh client module. Goph is a lightweight

Oct 30, 2022

Modern YouTube converter, that combines simplicity and effectiveness

Modern YouTube converter, that combines simplicity and effectiveness

Modern YouTube converter, that combines simplicity and effectiveness. How to use it? Go to TubeConv.com Paste a link to a video, or use the search bar

Jul 25, 2022
Quiz master - Code Submission for Testing Backend Skills

Quiz Master Code Submission for Testing Backend Skills Running App Setting up ./

Jan 12, 2022
atwhy is a tool to describe your decisions inside the code where they are actually made and still get a readable documentation.

atwhy What is atwhy atwhy can be used to generate a documentation out of comments in the code. That way you can for example describe all available opt

Oct 30, 2022
Simple translation tool using google translation api.

Translator Simple translation tool using google translation api. To use it you have to provide a valid service account as json file with path in the e

Feb 1, 2022
Yet another Go package for working with *.golden test files, with a focus on simplicity.

go-golden Yet another Go package for working with *.golden test files, with a focus on simplicity. Import import "github.com/jimeh/go-golden" Usage fu

Aug 3, 2022
Andrews-monitor - A Go program to monitor when times were available to order for Brown's Andrews dining hall. Used during the portion of the pandemic when the dining hall was only available for online order.

Andrews Dining Hall Monitor A Go program to monitor when times were available to order for Brown's Andrews dining hall. Used during the portion of the

Jan 1, 2022
Code portion for Distributed System Final exam for Viktor Mรกni Mรธnster

DISYS Final Exam (Distributed Hash Table) How to run There are two components of the system, which need to be run in separate ways. As this is a distr

Jan 5, 2022
๐ŸฎBlazing fast URL shortener made with simplicity in mind

klein Blazing fast URL shortener made with simplicity in mind Structures The project is what people would call a "monolith".

Feb 16, 2022
๐Ÿฎ โ€• Blazing fast URL shortener made with simplicity in mind

klein Blazing fast URL shortener made with simplicity in mind Run As easy as filling out config/config.yaml and running make. Of course, you need to h

Feb 16, 2022
Polarite is a Pastebin alternative made for simplicity written in Go.
 Polarite is a Pastebin alternative made for simplicity written in Go.

Polarite is a Pastebin alternative made for simplicity written in Go. Usage Web Interface Visit https://polarite.teknologiumum.com API Send a POST req

Dec 1, 2022
Go online translation package

Translate Go online translation package Install go get github.com/nuveo/translate Available Translator API's Microsoft or send us the next Translator

Nov 27, 2022