Skip to content

lndgalante/subtis

Repository files navigation

Subtis | Tu buscador de subtítulos

URLs

Name Link Deeplink
Web https://subtis.io -
API https://api.subt.is -
API Docs https://api.subt.is/v1/docs -
WebSocket https://real-time-indexer.fly.dev -
Stremio https://stremio.subt.is stremio://stremio.fly.dev/manifest.json

Packages

Client-side Server-side Cross packages
Web DB Shared
CLI API
Stremio

Features

Client API search Real-time search Title search AI translation Email notifications
Web 🚧
CLI
Stremio

Development

  1. Request .env.development file from a team member

  2. Run initialization script

chmod +x ./setup.sh && ./setup.sh
  1. Install bun runtime
curl -fsSL https://bun.sh/install | bash
  1. Install project dependencies
bun install
  1. Run Subtis REST API
bun run dev:api
  1. Run Subtis Web
bun run dev:web
  1. Run any of the desired client packages (Optional)
bun run dev:cli
bun run dev:stremio
  1. Run the indexer to fill DB (Optional)
bun run dev:indexer:movies
bun run dev:indexer:tv-shows

Deployment

  • Deploy API
  1. Login to Cloudfare (if you haven't already)
wrangler login
  1. Run the following command
bun run deploy:api
  • Deploy CLI
  1. Create new release in Github Releases

  2. Update subtis.rb with the new release version and SHA256 hash and push the changes

Database

Updating Database Types and Schemas

  1. Login to Supabase (if you haven't already)
bunx supabase login
  1. Create database type definitions and zod schemas
bun run update:db:schemas

Access Database

Request access to Supabase team with the developer email.

Schema

To check how the database schema looks like go to Supabase project, under Database -> Tools -> Schema Visualizer.

CLI

Installation

brew tap lndgalante/homebrew-subtis
brew install subtis

Upgrade

brew uninstall subtis \
  && brew untap lndgalante/homebrew-subtis \
  && brew tap lndgalante/homebrew-subtis \
  && brew install subtis

Good practices

  • Generate SQL dump
bun run update:db:dump
  • Bump DB schemas

    1. Move to packages/db directory
    cd packages/db
    1. Run the following command
    bun run supabase:type:definitions
    1. Remove the following line you see repeated
      Args: Record<PropertyKey, never>;
    1. Generate new zod schemas
    bun run supabase:schemas
  • Bump project dependencies

bun run update:deps
  • Code format and lint
bun run biome:check
  • Check type errors
bun run type:check
  • Check type coverage
bun run type:coverage
  • Check test coverage
bun run test:coverage
  • Check code duplications
bun run code:duplications

API Playground

  1. Import docs/collection.json into your preferred HTTP client like Yaak within Collecitions to quickly play with all API endpoints and different scenarios

  2. Import docs/localhost.json and docs/localhost.json to your environments section in your HTTP client

  3. Select your environment to test like LOCALHOST or PRODUCTION

Diagrams

Whimsical

About

Encontrá los subtítulos para tu película

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •