Commit Graph

188 Commits

Author SHA1 Message Date
dc062753a3 feat(client): add hidePreloader utility function
Add a new utility function to hide the preloader element by adding a "hidden" class, improving user experience during media player interactions.
2025-11-02 09:52:58 +00:00
a8179909d9 feat(auth): add bearer token authentication to API clients
Migrate authentication from cookie-based to Bearer token-based approach.
Update axios HTTP client to include Authorization header with session token.
Modify auth client to use Bearer token in fetch options and handle token storage in localStorage.
2025-11-02 09:52:06 +00:00
1148af17e5 feat(client): add recently added movies section and authentication checks
- Add MovieCard component for displaying movie posters and details
- Add RecentlyAddedSections component with horizontal scrolling for recently added movies
- Add HorizontalScrollList layout component for smooth horizontal scrolling
- Update SignInForm to auto-navigate authenticated users to home
- Update home layout to redirect unauthenticated users to login
- Update auth configuration to use bearer plugin
- Update media API model to default limit to 10
2025-11-02 09:51:10 +00:00
1cebbc4282 feat(client): add no-scrollbar utility class
Adds a new Tailwind CSS utility class to hide scrollbars across browsers, improving UI consistency in scrollable components.
2025-11-02 09:39:32 +00:00
77e5fed73e feat(auth): add redirect to login for unauthenticated users
- Add else clause to navigate to "/login" when authentication check fails
- Ensures users are redirected appropriately in the client app
2025-11-02 07:25:23 +00:00
21e171e920 refactor(client): migrate Header component to use http client 2025-11-02 07:21:13 +00:00
78199d0599 refactor(client): migrate HTTP client from ky to axios
- Replace ky with axios in package.json and update API client implementation
- Update all HTTP requests in client components to use axios syntax
- Adjust model imports in server files to relative paths
- Fix library type labels in onboard setup (Movies -> Movie, Series -> Serie)
2025-11-02 07:19:13 +00:00
a1f21c38e4 feat(server): add dashboard library management API with admin middleware
Add admin middleware to enforce authentication and permission checks for dashboard access.

Implement API models and routes for library CRUD operations, including listing, getting, creating, updating, and deleting libraries with validation and error handling.
2025-11-01 15:32:30 +07:00
d6b4fb128f feat(config): enable TypeScript experimental tsgo compiler 2025-11-01 15:21:49 +07:00
b60a3bd92f Update zed settings to use tsgo and change bun installation mode into
hoisted
2025-11-01 14:32:57 +07:00
f27eea43bb Update Zed setings 2025-10-31 15:32:02 +07:00
87d2e8d337 feat(server): add playback API models and routes
Add Zod schemas for playback inputs/outputs including codecs, resolutions, and status enums.
Implement Hono router endpoints for creating, stopping, seeking, listing, and getting status of playback sessions.
2025-10-31 07:37:01 +00:00
ed6caf5dc1 feat(server): add media and library API routes with query parameter validation
- Add MediaRouter and LibraryRouter imports and routes in main.ts
- Fix parameter validation from "param" to "query" in library and media routes
- Ensure proper query parameter handling for titles, recently added, and tracks endpoints
2025-10-30 16:03:43 +00:00
83804d9860 feat(server): add title API endpoints and metadata schemas
- Add new API models for title details and seasons in `models/api/title.ts`
- Create common, movie, and series metadata schemas in `models/internals/metadata/`
- Implement title router with endpoints for details and season episodes in `routes/title.ts`
- Update main.ts to include the new title routes

This introduces functionality to fetch detailed information about movies and series, including cast, crew, genres, and episode data for series.
2025-10-30 15:33:30 +00:00
3aca5bc19f feat(server): add media API endpoints and schemas
- Add Zod schemas for recently added media and media tracks inputs/outputs
- Add internal schemas for media items and track types (video, audio, subtitle)
- Implement GET /recentlyAdded endpoint to fetch titles added in last 7 days
- Implement GET /tracks endpoint to retrieve media tracks for movies or episodes
- Include filtering logic to exclude image streams from video tracks
2025-10-30 14:30:29 +00:00
52f4d5e978 refactor(server): extract authentication middleware to reusable module
Move authentication logic from inline middleware in library routes to a dedicated
authenticated middleware file for better reusability and maintainability. This
includes creating a new middleware that handles session validation and error
handling, and updating the library router to use the imported middleware.
2025-10-30 13:54:41 +00:00
1f541c43b5 feat(client): add header component with navigation, user menu, and home routes
- Implement Header component with responsive navigation sheet, back/home buttons, and search link
- Add ThemeModeSwitcher for dark/light mode toggle
- Create UserMenu with avatar, dropdown, and logout functionality
- Add UI components: Avatar, Sheet, and Skeleton
- Update Providers to remove TRPC integration and configure QueryClient
- Add home layout and index routes with Header wrapper
- Update dependencies including @radix-ui/react-avatar
2025-10-30 13:40:17 +00:00
2ba4afa252 feat(server): add library API endpoints and schemas
- Add Zod schemas for library titles and all libraries in models/api/library.ts
- Create new library router with /all and /titles endpoints
- Update onboard router to use namespaced API imports
- Export API models as namespace in models/index.ts
2025-10-30 13:39:58 +00:00
66dc94bc22 feat(client): add user authentication with sign-in and sign-up forms
- Implement SignInForm and SignUpForm components using TanStack Form and Zod validation
- Add auth client configuration with better-auth and access control
- Create login and signup routes with navigation
- Update preloader logic to hide on non-root paths and improve accessibility
- Add better-auth and zod dependencies, update eslint-plugin-react-hooks version
2025-10-30 09:46:47 +00:00
b8cf8dae0b chore(server): update CORS origin to localhost:3002 and enable credentials 2025-10-30 09:31:04 +00:00
9f25d0e435 build(deps): update dependencies and biome configuration
- Add TypeScript to devDependencies
- Update bun.lock with latest package versions
- Configure biome.json for CSS parser and Tailwind directives
2025-10-30 04:04:59 +00:00
3b64c07c6e refactor(server): restructure app setup and onboard router using Hono factory pattern
- Migrate main.ts to use createFactory for better app composition
- Refactor onboard router to chained method calls for cleaner structure
- Add OnboardFolderInput and OnboardFolderOutput schemas for folder browsing API
- Define METADATA_PROVIDER_TYPES and LIBRARY_TYPES locally in respective model files to reduce dependencies
2025-10-30 04:04:24 +00:00
73bcb04725 feat(apps/client): add complete React client with onboarding flow
- Implement full client application using React, TypeScript, and Vite
- Add onboarding wizard with account creation, library setup, and language preferences
- Include UI components, routing, and state management for setup process
- Configure build tools, linting, and styling with Tailwind CSS and shadcn/ui
- Add folder explorer component for media library configuration
- Integrate with server APIs for onboarding completion

BREAKING CHANGE: Introduces new client application requiring server API endpoints for onboarding
2025-10-30 04:04:02 +00:00
c3115f1b58 feat(server): add api export to models index 2025-10-29 08:45:15 +00:00
40439a2e44 feat(server): add onboarding API with folder browsing and completion
Add new onboarding functionality to the server, including API endpoints for checking onboarding status, browsing directories, and completing the onboarding process. Introduces Zod schemas for request/response validation, error handling utilities, and Hono router integration. Includes dependency on @hono/zod-validator for validation.
2025-10-29 08:44:03 +00:00
8f067454f7 chore(config): update Zed editor settings for TypeScript language servers
Add language_servers configuration for TypeScript and TSX to use biome and typescript-language-server, excluding vtsls. This improves code formatting and type checking in the editor.
2025-10-28 05:47:35 +00:00
59bdf356e4 build(deps): update biome and other dependencies 2025-10-28 05:47:25 +00:00
1bec6e8ec2 feat(player): add HLS media player with subtitle support
- Implement new HLSPlayer component using media-chrome and react-player
- Refactor PlaybackSession to support multiple FFmpeg processes for AV and subtitle streams
- Add master playlist generation with subtitle renditions
- Update playback service to handle subtitle tracks and burn-in options
- Modify server routes to use Bun.serve with dynamic playback endpoints
- Add codec detection utilities and player state components
- Update web routes to pass track selections via search params

BREAKING CHANGE: Playback API routes have been restructured, requiring client updates for session-based streaming.
2025-10-28 05:46:59 +00:00
7849af8484 chore(player): remove HLS media player components 2025-10-28 05:35:33 +00:00
adb4e4c1b4 Init Media Player with HLS (experimental) 2025-10-25 18:03:10 +07:00
a35c015cfb feat: add media track selection for movies
- Add tRPC endpoint to fetch video/audio/subtitle tracks
- Implement MediaTracksSelector component with auto-selection
- Filter out image streams from track listings
- Integrate track selector into movie detail page
- Support querying tracks by titleId or episodeId
2025-10-24 16:22:00 +07:00
88a779d1f2 feat: improve mobile responsiveness of title details page
- Add responsive breakpoints for backdrop height and container padding
- Make title text scale appropriately across device sizes
- Stack action buttons vertically on mobile
- Adjust spacing, gaps, and font sizes for better mobile UX
- Make buttons full-width on mobile, auto-width on larger screens
2025-10-23 13:56:10 +07:00
a14e09ee42 feat: add library browsing with dynamic navigation
- Add library tRPC router with getAll and getTitles endpoints
- Implement paginated title fetching with library validation
- Update header to dynamically display libraries from database
- Add library detail page route (/home/library/$id)
- Replace static media library list with dynamic rendering based on
  library type
2025-10-23 12:40:17 +07:00
4b7eaea60c chore: format codebase with tabs and update config files
- Apply tab indentation across all TypeScript files
- Reformat biome.json, tsconfig.json, and turbo.json
- Update component and schema files for consistency
2025-10-22 18:47:18 +07:00
366b4a728a perf(scanner): implement concurrent processing with queue management
Add p-queue dependency and implement controlled concurrent processing for library scanning operations. Introduce separate queues for directory processing, file processing, metadata API calls, and database operations to prevent system overload and improve scanning performance.

Key improvements:
- Directory queue with 15 concurrent directory processing limit
- File processing queue with 5 concurrent files
- Rate-limited metadata queue (40 requests per 10 seconds for TMDB)
- Database queue matching connection pool size
- Batch database operations to reduce query count
- Progress tracking and queue statistics
- Optimized credit insertion with batch operations
2025-10-22 17:19:17 +07:00
a3144c1796 style(config): reformat biome.json with consistent spacing 2025-10-19 18:05:17 +07:00
cd379d3956 Add Zed settings.json 2025-10-19 18:03:03 +07:00
babdbf0fb3 refactor(db): replace custom ID generation with UUIDs
Update ID generation in metadata schema tables (credits, genres, movies,
series, titles) to use Bun.randomUUIDv7() for standardized UUIDs instead
of custom prefixed random numbers, improving uniqueness and consistency.
2025-10-18 11:25:11 +07:00
fc67a563c1 refactor(tmdb): simplify movie search results 2025-10-17 18:00:19 +07:00
2d77385802 refactor(server): restructure metadata models into separate files
- Split monolithic metadata.ts into focused modules
- Create metadata/ directory with movie, series, search, and provider
  models
- Maintain same functionality with improved organization
2025-10-17 17:58:56 +07:00
kenzuya
d9b9b5fd61 feat(series): add episode details and credits support for TV series
Enhance series handling with episode-level metadata, credits resolution, and UI components for displaying episodes. Includes updates to models, scanners, providers, and new TRPC endpoints for fetching season episodes.
2025-10-16 21:46:22 +07:00
kenzuya
126c59649f feat(db): add background_path column to episodes table
Add a new optional text column to the episodes table to store background image paths, enhancing metadata support for episodes.
2025-10-16 21:07:03 +07:00
kenzuya
cc31c93b5d refactor(utils): enhance logger with colored output support
Added chalk dependency and refactored the logger reporter to a class-based implementation with color support for development environments. This improves console output readability without affecting production logging.
2025-10-15 23:49:48 +07:00
kenzuya
00c09b90b4 fix(db): add CompressionStream polyfill for Drizzle Studio compatibility
This change adds a polyfill for the CompressionStream API to resolve a compatibility issue where Drizzle Studio throws a ReferenceError due to Bun's lack of native CompressionStream support. The polyfill uses Node.js zlib streams to provide deflate, deflate-raw, and gzip compression formats, ensuring Drizzle Kit can function properly in the Bun runtime environment.
2025-10-15 17:38:23 +07:00
kenzuya
35192753ee feat(tmdb): implement TV series metadata resolution
Implement TV series metadata resolution in TMDB provider with multi-page search, language matching, and translation support. Add caching and batch operations in SeriesLibraryScanner for improved performance. Optimize genre and provider ID insertions in BaseLibraryScanner. Fix path handling for Linux in onboard router.

- Add resolve method in TMDBSeriesProvider to search and fetch detailed TV show, season, and episode metadata
- Introduce series cache in SeriesLibraryScanner to reduce database queries and handle duplicate episodes
- Refactor insertGenres and insertProviderIds to use batch operations for efficiency
- Ensure absolute paths on Linux by prepending '/' in onboard path joining
2025-10-15 12:53:53 +07:00
2b99c61c51 refactor(media): handle nullable poster and backdrop URLs
Updated metadata schemas and related code to properly handle nullable poster and backdrop URLs across server models, library scanner, web components, and TMDB provider. This improves type safety and prevents potential null reference errors by making URLs nullable in Zod schemas, defaulting to null in scanners, conditionally rendering in UI, and using conditional checks in providers.
2025-10-12 18:07:47 +00:00
39e1959cf4 refactor(db): update database configuration to use configurable data directory
Add getDataDirectory utility to handle DATA_DIRECTORY environment variable, ensuring the directory exists and is used for database file paths in drizzle config and database setup. This improves environment flexibility and prevents hardcoded paths.
2025-10-12 14:07:59 +00:00
b73745c56c refactor(db): extract database configuration to separate file
Move database setup logic from index.ts to a dedicated database.ts file for better modularity. Update index.ts to re-export from the new file and adjust import in migrations.ts accordingly.
2025-10-12 12:35:37 +00:00
b28b9fbfa2 refactor(server): extract formatBytes to utils and improve logging
Moved the formatBytes function from main.ts to a new utils/formatter.ts file for better code organization. Replaced console.log statements in signal handlers with a proper logger for consistent logging. Updated server initialization to use Bun.serve directly instead of exporting the app, enhancing modularity and startup efficiency.
2025-10-12 12:34:47 +00:00
86057aa1dd refactor(db): remove TMDB and IMDB IDs from people table
Remove tmdb_id and imdb_id columns along with associated indexes and unique constraints from the people table to simplify the schema and eliminate external API syncing dependencies.

BREAKING CHANGE: tmdb_id and imdb_id fields are no longer available in the people table, which may affect any code relying on these external identifiers.
2025-10-11 19:38:54 +00:00