2026-02-01 21:37:07 +07:00
2025-08-10 23:55:32 +07:00
2025-07-18 23:20:15 +07:00
2026-03-03 21:25:59 +07:00
2026-01-31 18:41:09 +07:00
2025-06-14 15:05:20 +07:00
2026-01-28 23:49:16 +07:00
2025-06-14 15:05:20 +07:00
2025-06-14 15:05:20 +07:00
2026-01-31 09:03:32 +07:00
2026-01-09 15:12:17 +07:00
2026-01-23 21:08:10 +07:00
2025-06-14 15:05:20 +07:00

A simple anime streaming platform with community feature integration

Overview

Syzne TV was born from a simple frustration: watching anime online shouldnt feel like fighting through layers of intrusive ads and popups. Many platforms today prioritize aggressive monetization over user experience, and somewhere along the way, the joy of watching got lost.

Tech Stack

  • Runtime: Bun (v1.3)
  • Framework: Elysia (latest)
  • Database: PostgreSQL 18
  • ORM: Prisma (v7.0)
  • Caching: Redis (v8.4)
  • Authentication: JWT
  • Monitoring: Sentry

Getting Started

⚠️ Docker support is planned but not fully implemented yet. Full containerized deployment will be finalized once the backend reaches production readiness. For now, please follow the manual setup below.

1 Clone the repository

git clone https://github.com/rafiarrafif/SyzneTV-backend.git
cd SyzneTV-backend

2 Prepare Environment Variables

Copy the example environment file:

cp .env.example .env

Then configure .env properly:

  • Database credentials
  • Redis configuration
  • SMTP configuration
  • Admin account credentials
  • Any other required environment variables

⚠️ Make sure all required variables are filled correctly. The application will fail to start if any critical configuration is missing.

3 Install Dependencies

bun install

4 Run Database Migrations

bunx prisma deploy

5 Seed Initial Data

bun run prisma:seed

6 Run the Application

Development Mode

bun run dev

Production Mode

Build the application:

bun run build

Make the binary executable:

chmod +x ./dist/server

Run the server:

./dist/server

Project Structure

root/
├── prisma/
│   ├── dbml/                # DBML schema generated from Prisma
│   ├── migrations/          # Database migration history
│   └── seed/                # Database seeding scripts
│       └── (run with: bun run prisma:seed)
│
├── scripts/                 # Automation & maintenance scripts (⚠️ do not modify unless necessary)
│
└── src/
    ├── config/              # Non-secret system configuration
    │                         # ⚠️ Never store secrets here — use .env instead
    │
    ├── constants/           # Editable system keys (e.g., cookie names, Redis keys)
    │
    ├── helpers/             # Reusable helper functions (cross-module usage)
    │
    ├── middleware/          # All application middlewares
    │
    ├── modules/             # Domain-based modules (auth, user, media, etc.)
    │
    ├── utils/               # External service utilities
    │                         # (database, bucket storage, SMTP, etc.)
    │
    ├── route.ts             # Root route aggregator (registers all modules)
    │
    └── index.ts             # Application entry point

This structure keeps the core system separated from domain logic, automation tools, and infrastructure-related utilities. Making the project easier to scale, debug, and maintain over time.

Architecture Overview

Syzne TV uses a modular architecture to keep the codebase clean, scalable, and easy to maintain. Each feature is separated by domain (e.g., auth, user, media) and stored inside:

./src/modules

Every module follows the same internal structure:

module-name/
├── controllers/
├── services/
├── repositories/
├── validations/
├── types.ts
└── index.ts

Folder Responsibilities

  • Controllers: Handle incoming HTTP requests and responses. Every file must end with: *.controller.ts
  • Services: Contain the core business logic. Every file must end with: *.service.ts
  • Repositories: Interact with the database using Prisma. Every file must end with: *.repository.ts
  • Validations: Define request validation schemas using Zod. Every file must end with: *.schema.ts
  • types.ts: Contains module-specific TypeScript types.
  • index.ts: Defines the module routes and route prefix (e.g., /auth).

Important

Whenever you create a new module and configure its routes, you must run:

bun run route:sync

This command registers the module route into the root route automatically. This structure ensures consistency across the project and makes it easier to scale without turning the codebase into a mess.

API Endpoints

Due to the large number of routes and their complexity, listing every endpoint directly in this README would quickly become messy and hard to maintain.

Instead, we provides an OpenAPI-based documentation page that can be accessed at:

/openapi

Accessing the OpenAPI Documentation

Before accessing the documentation, you need to temporarily disable the application protector.

Open your .env file and change:

ENABLED_APP_TOKEN=false

After that, start the server and open the /openapi route in your browser.

Current Status

The OpenAPI documentation is still in an early stage and may look a bit rough at the moment. It will be improved and structured more clearly as the project evolves.

For now, it serves as a reference for exploring available routes and understanding how the API is structured.

License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).

You are free to use, modify, and distribute this project under the terms of the license. However, if you run a modified version of this software as a service, you must also make the source code available under the same license.

For the full license text, please see the LICENSE file in this repository.

Description
No description provided
Readme AGPL-3.0 1.2 MiB
Languages
TypeScript 99.6%
JavaScript 0.2%
Dockerfile 0.2%