Commit Graph

110 Commits

Author SHA1 Message Date
e4fd30a8fd feat(config): add auth generation script and turbo task
Reorganized package.json structure by moving devDependencies to the top and adding packageManager field. Introduced new script "auth:generate" for authentication key generation. Updated turbo.json with formatted structure and new "auth:generate" task for persistent execution.
2025-10-05 12:55:04 +00:00
d7a572f496 feat(dashboard): add permission check for dashboard access
Add conditional rendering in dashboard route to check admin permissions using authClient. If access is denied, display an empty state with access denied message and link back to home. This enhances security by restricting dashboard access to authorized users.
2025-10-05 12:53:15 +00:00
9c8c1f1127 refactor(ui): refactor UserMenu to use Link for dashboard navigation
Replace programmatic navigation in UserMenu with Link component for better integration with TanStack Router, ensuring the dropdown closes on navigation
2025-10-05 10:33:39 +00:00
1f9c810bef feat(dashboard): add dashboard with stats overview
Implement a new dedicated dashboard feature with server-side stats API and UI components. Added stats router for fetching overview data, dashboard layout with sidebar navigation, and pages for users, libraries, and extensions. Moved dashboard from /home/dashboard to /dashboard route.

BREAKING CHANGE: dashboard route moved from /home/dashboard to /dashboard, old route removed
2025-10-05 05:24:50 +00:00
8a7de8e271 feat(ui): add reusable empty state component
Add a new modular Empty UI component with sub-components (EmptyHeader, EmptyMedia, EmptyTitle, EmptyDescription, EmptyContent) for consistent handling of empty states. Refactored the search page to use this component in empty, error, and no-results states, replacing custom implementations to improve reusability and design consistency.
2025-10-04 09:19:49 +00:00
a8aa020506 feat(ui): add Nontara branding to page titles
Update the application title to "Nontara Media Server" and add consistent page-specific titles across all routes for better branding and user experience. This includes dynamic title updates in the details page based on loading states and data availability.
2025-10-04 09:14:32 +00:00
972e3b315d refactor(search): refactor search to use TanStack Router search params
Removed nuqs dependency and updated search functionality to use TanStack Router's native search params validation and navigation. This change simplifies the codebase, eliminates external dependency, and improves integration with the routing system by handling URL state directly through the router.
2025-10-04 08:41:36 +00:00
3c33c98234 feat(ui): increase movie card sizes and improve image fallback logic
Updated movie card dimensions for better responsiveness and enhanced image source handling to ensure proper fallback to placeholder when URL is invalid or too short. This improves visual consistency and user experience in the movie display components.
2025-10-03 19:59:42 +00:00
2f727e58ae docs(agents): update biome linter instructions for AI modifications 2025-10-03 19:59:25 +00:00
8f485fbcb1 feat(search): add search functionality for titles
Added a new search feature that allows users to query movies and series. Implemented server-side search endpoint in the titles router with Zod validation for input and output. Created a client-side search page with debounced input, query state management using nuqs, and responsive results display including loading, error, and empty states. Updated dependencies and integrated NuqsAdapter for URL state synchronization.
2025-10-03 19:59:07 +00:00
3a5b35a0b5 feat(ui): add original title and end time display to title details
Added conditional rendering for original title in title details component when it differs from the main title. Enhanced movie runtime section to display both formatted runtime and calculated end time based on current time and duration.
2025-10-03 17:57:32 +00:00
d4296e5c7b refactor(server): update metadata resolution to handle missing data with null returns
Updated metadata provider interfaces and implementations to return null instead of placeholder objects when data cannot be resolved. This improves error handling and reduces unnecessary object creation.

- Modified schema types to include null unions (e.g., ResolvedMovieMetadataResult)
- Changed runtime fields from minutes to seconds for consistency
- Removed placeholder builders in TMDB provider, returning null directly
- Optimized library scanner by removing redundant file counting and adding early exits for existing media
- Ensured type safety across services and providers

BREAKING CHANGE: Metadata resolution methods now return null for unresolved data, requiring consumers to handle null cases explicitly.
2025-10-03 12:46:59 +00:00
afbaebe4f1 fix(ui): update placeholder image fallbacks in nontara components
Update fallback image URLs in RecentlyAddedSections and TitleDetails components for consistency and correct placeholder usage.
2025-10-03 12:36:00 +00:00
80c444dd34 refactor(server): update imports and remove unused code
- Remove unused type import in auth.ts
- Clean up commented code in BaseService.ts
- Update fs and path imports to node: prefixed versions in extensions/index.ts
- Improve string formatting in main.ts and fix unused variable in language-codes test
2025-10-03 10:55:16 +00:00
078738f502 refactor(metadata): remove credit resolution functionality
Removed unused credit-related schemas, types, and methods from models, providers, services, and TMDB extension. This simplifies the codebase by eliminating deprecated individual credit resolution in favor of title-based credits fetching.

BREAKING CHANGE: Removed resolveCredits method and associated schemas, which may affect integrations relying on individual credit resolution.
2025-10-03 09:56:26 +00:00
e2dd40b06b refactor(library-scanner): replace recursive directory scanning with Bun.Glob
Use Bun.Glob for efficient recursive video file discovery, eliminating manual recursion and depth tracking. This simplifies the scanning logic, reduces complexity, and improves performance by leveraging Bun's optimized glob implementation.
2025-10-03 09:36:13 +00:00
92efe78159 perf(library-scanner): add file count optimization to skip redundant scans
Compare video file count in directory with database titles count before scanning. If counts match and titles exist, skip the scan to improve performance and reduce unnecessary processing.
2025-10-02 18:07:19 +00:00
0cf143c09e refactor(db): consolidate rating fields and enhance metadata schema
Updated titles schema to use a single 'rating' field instead of 'voteAverage' and 'voteCount', made 'originalTitle' required, and added index on rating. Removed deprecated fields from metadata models and TRPC schemas. Enhanced TMDB metadata provider to include additional fields like homepage, original language, popularity, and tagline. Updated library scanner and routers to reflect these changes for improved data consistency and completeness.
2025-10-02 17:25:09 +00:00
ce250ad254 refactor(ui): replace inline card with MovieCard component
Simplify SimilarTitlesSection by using the dedicated MovieCard component instead of custom inline JSX. This improves code reusability and maintainability while preserving the same visual output.
2025-10-02 17:24:21 +00:00
4498310b70 fix(ui): handle missing movie images with placeholders
Updated MovieCard and TitleDetails components to use optional imageUrl and fallback to movie-placeholder.svg when images are unavailable, improving robustness for missing poster data.
2025-10-02 17:23:58 +00:00
2ff8d60560 Reset migrations 2025-10-02 17:23:26 +00:00
b158ac795f feat(auth): add authentication checks to routes and middleware
Add session validation in server-side TRPC middleware to enforce authentication for protected endpoints. Implement client-side route guards in web app to redirect unauthenticated users to login page, ensuring proper access control for home and index routes.
2025-10-02 10:35:05 +00:00
7c80bd3c74 feat(ui): add TRPC error parsing utility
Add a new TRPC error parsing utility in `apps/web/src/lib/trpc-errors.ts` to standardize error handling across the web app. This utility categorizes TRPC errors into user-friendly messages for better UX. Updated the title details page to use this utility instead of manual error checking, improving maintainability and consistency in error display.
2025-10-02 10:34:32 +00:00
cdda5108dd feat(ui): add scroll area component and navigation enhancements
Add ScrollArea UI component using Radix UI for better content scrolling.
Enhance header navigation with back button and conditional home button display.
Update dependencies including @radix-ui/react-scroll-area and reorganize @nontara/server.
2025-10-02 09:16:38 +00:00
a44c4afbc3 feat(titles): add title details page with cast, crew, and similar titles
Implement a comprehensive title details feature including backend API and frontend UI components. Add tRPC router for fetching title data, genres, cast, crew, and similar titles using Zod schemas for validation. Create new UI components for displaying cast, crew, similar titles, and detailed title information with a new route for the details page. Include utility functions for formatting and placeholder assets for better user experience.
2025-10-02 07:35:00 +00:00
44d4d3f567 feat(metadata): add provider IDs and title credits resolution to TMDB metadata provider
Add TMDB and IMDB provider IDs to movie metadata responses for better external reference tracking. Introduce resolveTitleCredits method to fetch and map cast and crew information from TMDB API, enhancing metadata completeness for movies and TV shows.
2025-10-01 20:29:02 +00:00
124705ca84 docs(agents): add IDE diagnostics requirement before linting
Add a new section to AGENTS.md emphasizing the need to check IDE diagnostics first using the `getIdeDiagnostics` tool, resolve all TypeScript errors and warnings, and only then run the Biome linter to ensure type safety before addressing cosmetic issues.
2025-10-01 11:08:53 +00:00
a23b25c953 chore(config): update configs and bump dependencies
Update Biome linter configuration for cleaner formatting.

Format BTS configuration file for consistency.

Bump versions for tailwindcss and tw-animate-css in lockfile.

Update package.json scripts to use @nontara/server.
2025-10-01 11:06:04 +00:00
78f1855ce4 feat(metadata): add credits and provider metadata support
Simplify people roles to CAST/CREW and integrate external metadata providers (TMDB, IMDB, etc.) for enhanced movie and series information. Updated database schemas, models, and services to handle credits, ratings, and provider IDs, enabling richer metadata resolution and storage.

BREAKING CHANGE: PEOPLE_ROLE_TYPES enum simplified from specific roles to "CAST" and "CREW", requiring updates to any code depending on detailed role types.
2025-10-01 11:04:46 +00:00
fdcb245997 chore(config): update Biome configuration ignore patterns and formatting
Updated Biome.json to include new ignore patterns for meta files and packages/tmdb-ts, reformatted assist and linter sections for better readability, and ensured consistent JSON structure.
2025-09-30 17:55:41 +00:00
0711363727 Reset migrations 2025-09-30 16:58:59 +00:00
dec927693a feat(tmdb-metadata): add credit and person resolution methods
Add resolveCredits and resolvePeople methods to TMDBMetadataProviderExtension to fetch detailed credit and person information from TMDB API. These methods handle client configuration checks, API calls, and proper error handling while transforming TMDB responses to application models.

Also improve number parsing in search methods by adding radix parameter to parseInt calls for better compatibility.
2025-09-30 17:40:05 +07:00
9d0d644e81 feat(server): add credits and people models with metadata provider extensions
Add comprehensive TypeScript schemas for Credits and People entities using Zod v4 syntax, establishing proper type definitions for cast, crew, and person details. Extend the MetadataProvider abstract class with new methods for resolving credits and people data to support enhanced metadata functionality.
2025-09-30 17:16:33 +07:00
5030045892 build(deps): update tmdb-ts dependency to workspace version 2025-09-30 17:16:05 +07:00
f7082c58fb chore(deps): update tmdb-ts dependency to workspace version 2025-09-30 17:14:16 +07:00
5d31a4a1c2 chore(deps): update tmdb-ts submodule to latest commit 2025-09-30 16:49:27 +07:00
ff8e2b6e94 chore(deps): add tmdb-ts submodule as external dependency 2025-09-30 16:30:27 +07:00
a9a8d1f7ff style: format code with biome linter across server modules 2025-09-30 14:48:29 +07:00
065ebe1625 style: format code with biome linter across multiple packages 2025-09-30 14:47:22 +07:00
d28c9520ee style(web): format code with biome linter 2025-09-30 14:45:41 +07:00
663e75aadc chore(config): update vscode settings for typescript tsgo and memory 2025-09-30 12:52:28 +07:00
12549b77bd docs: add biome linter rules and requirements to AGENTS.md 2025-09-30 12:52:11 +07:00
d663ac0a5e build(deps): update drizzle-kit to v0.31.5 2025-09-30 12:50:47 +07:00
2471e961ce refactor(models): remove metadata-search export from index 2025-09-30 12:50:17 +07:00
dd945d38f4 refactor(media): update recently added query to use titles table instead of movies
Modified the media router to query from the titles table instead of movies, extending the recently added functionality to include both movies and series. Updated the date range to 7 days instead of 1 day for better content discovery. Also changed the id type from number to string to match the new titles schema.
2025-09-30 12:49:46 +07:00
138c98038b fix(folder-explorer): add comprehensive error handling for directory access
Improve robustness of folder exploration by adding detailed error handling for filesystem operations. Handle permission issues, invalid paths, and filesystem errors gracefully with appropriate user feedback. Enhance both server and client components to provide clear error messages and recover gracefully from failures.
2025-09-30 12:49:22 +07:00
ece4703a9b feat(database): introduce titles schema to normalize movie and series metadata
Extract common metadata fields from movies and series into a new titles schema, establishing a proper relationship between entities. This refactoring eliminates data duplication and provides a cleaner data model for shared title information like name, description, year, and poster. The movies and series tables now reference titles through a foreign key relationship, while all genre associations are centralized at the title level.
2025-09-30 12:48:34 +07:00
176872e1fd refactor(server): move metadata types to models and import from there
Reorganize imports in metadata provider to use types from @/models, removing local type definitions for MetadataSearchResult and MetadataSearchQuery. This aligns with schema organization rules requiring all types to be defined as Zod schemas in models for runtime validation and type safety.
2025-09-29 12:19:33 +00:00
58d17978cb refactor(server): change ID fields from number to string in library scanner
Update genreId, seriesId, and seasonId types to string to align with new database schemas using UUIDs. Removed deprecated sortTitle field. This ensures consistency with the modular schema organization and Zod validation requirements.
2025-09-29 12:18:57 +00:00
7bf346ac34 feat(server): add metadata search and credits schemas
Add Zod schemas and types for metadata search functionality, including search queries, results, and related items. Introduce credits schemas for cast and crew information. Enhance existing details schemas with similar titles and type exports for better type safety and runtime validation in the media library system.
2025-09-29 12:17:29 +00:00