{"id":30328582,"url":"https://github.com/kulapoo/libre-sine","last_synced_at":"2026-05-16T01:34:46.217Z","repository":{"id":310293327,"uuid":"1039382190","full_name":"kulapoo/libre-sine","owner":"kulapoo","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-17T05:14:34.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-17T05:27:49.064Z","etag":null,"topics":["actix-web","personal-movie-collection","rust","shuttle-rs","typescript","watch-movies"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kulapoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-17T05:14:20.000Z","updated_at":"2025-08-17T05:16:18.000Z","dependencies_parsed_at":"2025-08-17T05:27:53.040Z","dependency_job_id":"5e44bf5e-b4ee-4a65-8f3d-fdcc8eb714d8","html_url":"https://github.com/kulapoo/libre-sine","commit_stats":null,"previous_names":["kulapoo/libre-sine"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/kulapoo/libre-sine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kulapoo%2Flibre-sine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kulapoo%2Flibre-sine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kulapoo%2Flibre-sine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kulapoo%2Flibre-sine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kulapoo","download_url":"https://codeload.github.com/kulapoo/libre-sine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kulapoo%2Flibre-sine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33087028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actix-web","personal-movie-collection","rust","shuttle-rs","typescript","watch-movies"],"created_at":"2025-08-18T01:08:43.232Z","updated_at":"2026-05-16T01:34:46.212Z","avatar_url":"https://github.com/kulapoo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LibreSine - Movie Collection Management Platform\n\nA responsive web application for managing your movie collections, built with Rust (Actix-web) backend and React frontend, designed for deployment on Shuttle.rs. Works seamlessly on desktop, tablet, and mobile devices.\n\n## Author's Note\n\nThis project was created as a personal movie collection manager, initially intended to organize kids' movie libraries in a family-friendly interface. It's also my playground for having fun with Rust and exploring its ecosystem. Perfect for anyone looking to manage their home movie collection or learn from a practical Rust + React application.\n\n## Important: Video Streaming Notice\n\n**LibreSine does not host or stream videos.** The application only manages URLs that redirect to external video sources. Users must ensure:\n- Videos are hosted on their own servers or third-party platforms\n- Video URLs are publicly accessible\n- They have the necessary rights to access and share the video content\n\n## Tech Stack\n\n- **Backend**: Rust + Actix-web + PostgreSQL/SQLite\n- **Frontend**: React 19 + TypeScript + Vite + Tailwind CSS\n- **Deployment**: Shuttle.rs\n- **Database**: PostgreSQL (via Shuttle.rs)\n\n## Prerequisites\n\n- [Rust](https://www.rust-lang.org/tools/install) (latest stable version)\n- [Node.js](https://nodejs.org/) (v18 or higher)\n- [Cargo Shuttle](https://docs.shuttle.rs/introduction/installation) CLI tool\n\n## Quick Start\n\n### 1. Install Shuttle CLI\n\n```bash\ncargo install cargo-shuttle\ncargo shuttle login  # Login with GitHub\n```\n\n### 2. Clone and Setup\n\n```bash\ngit clone \u003crepository-url\u003e\ncd libre-sine\n\n# Install frontend dependencies\ncd frontend\nnpm install\ncd ..\n```\n\n## Running Locally\n\n**Note**: For local development, create a `.env` file in the project root directory with the following content:\n\n```env\nDATABASE_URL=postgres://postgres:postgres@localhost:19721/libresine\nSQLX_OFFLINE=true\n```\n\nYou'll need two terminal windows to run both the backend and frontend:\n\n### Terminal 1: Backend Server\n\n```bash\n# Run the Shuttle backend locally (includes database)\ncargo shuttle run\n# Backend will be available at http://localhost:8000\n```\n\n### Terminal 2: Frontend Development Server\n\n```bash\ncd frontend\nnpm run dev\n# Frontend will be available at http://localhost:5173\n```\n\nThe frontend is configured to proxy API requests to the backend automatically during development.\n\n## Alternative: Run Backend Without Shuttle\n\nIf you prefer to run the backend without Shuttle (using local PostgreSQL):\n\n```bash\n# Set up your PostgreSQL connection\nexport DATABASE_URL=\"postgresql://username:password@localhost/libresine\"\n\n# Run migrations\nsqlx migrate run\n\n# Run the local binary\ncargo run --bin local\n```\n\n## Building for Production\n\n### Build Frontend\n\n```bash\ncd frontend\nnpm install\nnpm run build\n# This will build the frontend to the frontend/dist directory\n```\n\n### Deploy to Shuttle.rs\n\n```bash\n# From the project root\ncargo shuttle deploy\n\n# Or use the convenience script\n./deploy.sh\n```\n\nYour app will be deployed to: `https://libresine.shuttleapp.rs`\n\n## Application Flow\n\n```mermaid\ngraph TD\n    A[User Opens App] --\u003e B[Frontend React App]\n    B --\u003e C{Page Router}\n    \n    C --\u003e D[Movies Page - Currently Working]\n    C --\u003e E[Collections Page - Coming Soon]\n    C --\u003e F[Settings Page - Coming Soon]\n    \n    D --\u003e G[IndexedDB Local Storage]\n    D --\u003e H[Backend API]\n    \n    H --\u003e I[Rust Actix Server]\n    I --\u003e J[PostgreSQL Database]\n    \n    G --\u003e L[Offline Movie Data]\n    L --\u003e D\n    \n    style D fill:#90EE90\n    style E fill:#FFB6C1\n    style F fill:#FFB6C1\n```\n\n\u003e **Note**: Currently, only the **Movies** page is fully functional. The Collections and Settings pages are under development.\n\n\u003e **Important**: Your personal movies are stored locally in your browser's IndexedDB. To backup or transfer your movies to another device, use the Import/Export feature on the Movies page to save/load your collection as a JSON file.\n\n## Project Structure\n\n```\nlibre-sine/\n src/                    # Rust backend source\n    main.rs            # Shuttle entry point\n    lib.rs             # Library module\n    bin/\n       local.rs       # Local development binary\n    handlers/          # API route handlers\n    models/            # Data models\n    services/          # Business logic\n frontend/              # React frontend\n    src/\n       components/    # React components\n       pages/         # Page components\n       services/      # API services\n    package.json       # Frontend dependencies\n frontend/dist/         # Built frontend (generated)\n migrations/            # Database migrations\n    001_movie_collections.sql  # Movie collections schema\n docs/                  # Documentation and schemas\n    movie-collection.json  # Collection schema example\n    movies.json        # Movies data format example\n Cargo.toml            # Rust dependencies\n Shuttle.toml          # Shuttle configuration\n deploy.sh             # Deployment script\n```\n\n## Database Schema\n\nThe application uses a PostgreSQL database with the following schema:\n\n```sql\nCREATE TABLE movie_collections (\n    id SERIAL PRIMARY KEY,\n    name TEXT NOT NULL,\n    url TEXT NOT NULL UNIQUE,\n    is_default BOOLEAN DEFAULT FALSE,\n    created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n    updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP\n);\n```\n\n## API Endpoints\n\n- `GET /api/v1/movie-collections` - List movie collections with pagination and search\n- `GET /api/v1/movie-collections/{id}` - Get a specific movie collection\n- `POST /api/v1/movie-collections` - Create a new movie collection\n- `PUT /api/v1/movie-collections/{id}` - Update a movie collection (cannot update default collections)\n- `DELETE /api/v1/movie-collections/{id}` - Delete a movie collection (cannot delete default collections)\n\n## Environment Variables\n\nFor production deployment on Shuttle, set secrets using:\n\n```bash\ncargo shuttle secret new ADMIN_PASSWORD\ncargo shuttle secret new JWT_SECRET\n```\n\n## Development Commands\n\n```bash\n# Backend commands\ncargo build              # Build the backend\ncargo test              # Run tests\ncargo fmt               # Format code\ncargo clippy            # Run linter\n\n# Frontend commands\ncd frontend\nnpm run dev             # Start development server\nnpm run build           # Build for production\nnpm run lint            # Run ESLint\nnpm run preview         # Preview production build\n\n# Deployment\nnpm run deploy          # Build frontend and deploy to Shuttle\n```\n\n\n\n## Data Format\n\n### Movie Collection Format\n\nEach movie collection entry follows this schema:\n\n```json\n{\n  \"id\": 1,\n  \"name\": \"Collection Name\",\n  \"url\": \"https://example.com/movies.json\",\n  \"is_default\": false,\n  \"created_at\": \"2023-01-01T00:00:00Z\",\n  \"updated_at\": \"2023-01-01T00:00:00Z\"\n}\n```\n\n### Movies JSON Format (from collection URL)\n\nThe URL in each collection should return a JSON array of movies in this format:\n\n```json\n[\n  {\n    \"name\": \"Movie Title\",\n    \"movie_url\": \"https://example.com/movie.mp4\",\n    \"image_url\": \"https://example.com/poster.jpg\",\n    \"created_at\": \"2023-01-01\",\n    \"updated_at\": \"2023-01-02\",\n    \"description\": \"Movie description\",\n    \"rating\": 4.5,\n    \"genres\": [\"Action\", \"Adventure\"],\n    \"director\": \"Director Name\",\n    \"actors\": [\"Actor 1\", \"Actor 2\"]\n  }\n]\n```\n\n## Troubleshooting\n\n### Port Already in Use\n\nIf port 8000 is already in use:\n```bash\n# Find and kill the process using port 8000\nlsof -i :8000\nkill -9 \u003cPID\u003e\n```\n\n### Database Connection Issues\n\nEnsure PostgreSQL is running if using local development:\n```bash\n# Check PostgreSQL status\nsystemctl status postgresql\n\n# Start PostgreSQL if needed\nsystemctl start postgresql\n```\n\n### Frontend Build Issues\n\nClear cache and reinstall dependencies:\n```bash\ncd frontend\nrm -rf node_modules package-lock.json\nnpm install\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is open source and available under the MIT License.\n\n## Support\n\nFor issues and questions, please open an issue on GitHub.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkulapoo%2Flibre-sine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkulapoo%2Flibre-sine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkulapoo%2Flibre-sine/lists"}