{"id":27946009,"url":"https://github.com/iamanishsrivastava/scriptor","last_synced_at":"2025-12-30T23:05:05.831Z","repository":{"id":291779630,"uuid":"978323748","full_name":"iamanishsrivastava/scriptor","owner":"iamanishsrivastava","description":"Scriptor is a full-stack AI-driven application that converts scripts to voice and vice versa. Built with Next.js, Prisma, and PostgreSQL, it enables efficient script management and transcription with a focus on scalability and AI integration.","archived":false,"fork":false,"pushed_at":"2025-05-06T13:10:49.000Z","size":135,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T14:30:05.365Z","etag":null,"topics":["ai","ai-driven","api","app","full-stack","jest","llm","nextjs","open-source","postgresql","prisma","script","text-to-speech","transcription","tts","tts-api","vercel","voice","voice-to-text"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamanishsrivastava.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-05T20:08:03.000Z","updated_at":"2025-05-06T13:10:52.000Z","dependencies_parsed_at":"2025-05-06T14:30:09.147Z","dependency_job_id":"29f84c9e-8520-4b1b-bef9-0dc452b9d212","html_url":"https://github.com/iamanishsrivastava/scriptor","commit_stats":null,"previous_names":["iamanishsrivastava/scriptor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamanishsrivastava%2Fscriptor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamanishsrivastava%2Fscriptor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamanishsrivastava%2Fscriptor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamanishsrivastava%2Fscriptor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamanishsrivastava","download_url":"https://codeload.github.com/iamanishsrivastava/scriptor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252890219,"owners_count":21820344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["ai","ai-driven","api","app","full-stack","jest","llm","nextjs","open-source","postgresql","prisma","script","text-to-speech","transcription","tts","tts-api","vercel","voice","voice-to-text"],"created_at":"2025-05-07T13:47:33.663Z","updated_at":"2025-12-30T23:05:05.816Z","avatar_url":"https://github.com/iamanishsrivastava.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License: Custom](https://img.shields.io/badge/license-Custom-blue.svg)](./LICENSE.md)\n\nThis is a personal team project — open for learning and contributions, but **all rights are reserved**. See [LICENSE](./LICENSE) for details.\n\n# Scriptor - Script-to-Voice Transcriptor\n\n**Scriptor** is a powerful tool that helps convert scripts into voices using a backend-driven, scalable architecture built on **Next.js**, **Prisma**, and **PostgreSQL**.\n\nThis project is designed to be a **full-stack application** with a focus on **AI-driven** features, allowing users to create, manage, and transcribe scripts and voices efficiently.\n\n## 🚀 Features\n\n- **Convert scripts to voices**: The application will eventually allow converting scripts into voices using cutting-edge technologies such as Large Language Models (LLMs), Distillation techniques, or Retrieval-Augmented Generation (RAG)-based methods. These technologies will improve the system’s ability to understand and process text contextually and generate human-like voice outputs.\n- **Voice to script transcription**: Allows the system to transcribe audio back into text, enabling a seamless flow between voice and written script, powered by AI-driven transcription models.\n- **AI-driven enhancements**: In the future, I will integrate LLMs or RAG-based technologies to empower the script-to-voice and voice-to-script processes, ensuring context-aware conversions that are more accurate and natural. This will enable the platform to handle diverse input and generate outputs that feel more human, efficient, and adaptable.\n\n## 🛠 Technologies\n\n- **Frontend**: Next.js (App Router for routing and layout)\n- **Backend**: Prisma ORM with PostgreSQL for structured database access\n- **State Management**: Managed via Prisma Client for seamless DB interaction\n- **Authentication**: Custom Auth API endpoints (JWT/session-based)\n- **Testing**: Jest, Supertest, Zod validation, Prisma Test Suite\n- **AI Integration**: Planned LLMs, RAG (Retrieval-Augmented Generation), or distillation-based models\n- **Dev Tools**: ESLint, Prettier, Husky (pre-commit hooks), Git branching conventions\n- **Deployment**: Vercel or similar serverless-compatible platforms\n- **Environment Management**: .env with dotenv support for secrets/configs\n\n## 🌐 Project Structure\n\n\u003cdetails\u003e\n\u003csummary\u003e📁 Project Structure (Click to expand)\u003c/summary\u003e\n\n- **`prisma/`**: Contains Prisma schema and DB migrations.\n- **`public/`**: Holds static assets like images and favicon.\n- **`src/app/`**: Includes app routes and API endpoints for handling requests.\n- **`src/components/`**: Contains reusable UI components like buttons and inputs.\n- **`src/config/`**: Stores app-wide configuration files (e.g., environment variables, rate limits).\n- **`src/controllers/`**: Manages the request logic (API controller functions).\n- **`src/lib/`**: Holds utility libraries like Prisma client initialization.\n- **`src/middleware/`**: Contains logic for authentication, logging, and rate-limiting.\n- **`src/models/`**: Defines data models and TypeScript interfaces.\n- **`src/services/`**: Business logic and database interactions.\n- **`src/utils/`**: Utility functions for tasks like hashing and token generation.\n\n📁 For a full directory tree, [view structure.md ➜](./structure.md)\n\n\u003c/details\u003e\n\n## 🛠 Installation\n\n\u003cdetails\u003e\n\u003csummary\u003e🛠 Installation (Click to expand)\u003c/summary\u003e\n\n### Prerequisites\n\n- Node.js 16.0+ (or LTS version)\n- PostgreSQL\n- Prisma CLI (`npx prisma`)\n\n### 1. Clone the repo\n\n```bash\ngit clone https://github.com/iamanishsrivastava/scriptor.git\ncd scriptor\n```\n\n### 2. Install dependencies\n\n```bash\npnpm install\n```\n\n### 3. Set up environment variables\n\n- Copy the `.env.example` file to `.env` and fill in the required values.\n\n```bash\ncp .env.example .env\n```\n\n### 4. Set up the database\n\n- Create a PostgreSQL database and update the `DATABASE_URL` in your `.env` file. For ref. [PR7](https://github.com/TezBytes/scriptor/pull/7#issue-3054477033)\n- Run the following command to create the database and apply migrations:\n\n```bash\nnpx prisma migrate dev --name init\n```\n\n### 5. Seed the database (optional)\n\n- If you want to seed the database with initial data, run:\n\n```bash\nnpx prisma db seed\n```\n\n### 6. Start the development server\n\n```bash\npnpm run dev\n```\n\n- Open your browser and navigate to `http://localhost:3000` to see the app in action.\n\n\u003c/details\u003e\n\n## 🧪 Running Tests\n\n\u003cdetails\u003e\n\u003csummary\u003e🧪 Running Tests (Click to expand)\u003c/summary\u003e\n\n- To run the tests, use the following command:\n\n```bash\npnpm test\n```\n\n- This will run all the tests in the `__tests__` directory and generate a coverage report.\n- You can also run tests for specific files or directories by specifying the path:\n\n```bash\npnpm test src/components/Button.test.tsx\n```\n\n- For more advanced testing options, refer to the [Jest documentation](https://jestjs.io/docs/cli).\n- You can also run the tests in watch mode for continuous testing during development:\n\n```bash\npnpm test --watch\n```\n\n- This will watch for file changes and re-run the tests automatically.\n\n\u003c/details\u003e\n\n## 📚 API Endpoints\n\n\u003cdetails\u003e\n\u003csummary\u003e📦 API Endpoints (Click to expand)\u003c/summary\u003e\n\n- **POST** `/api/auth/login`: Authenticate user and return JWT token.\n- **POST** `/api/auth/register`: Register a new user.\n- **GET** `/api/auth/user`: Get the authenticated user's details.\n- **POST** `/api/scripts`: Create a new script.\n- **GET** `/api/scripts`: Get all scripts.\n- **GET** `/api/scripts/:id`: Get a specific script by ID.\n- **PUT** `/api/scripts/:id`: Update a specific script by ID.\n- **DELETE** `/api/scripts/:id`: Delete a specific script by ID.\n- **POST** `/api/voices`: Convert script to voice.\n- **GET** `/api/voices`: Get all voices.\n- **GET** `/api/voices/:id`: Get a specific voice by ID.\n- **PUT** `/api/voices/:id`: Update a specific voice by ID.\n- **DELETE** `/api/voices/:id`: Delete a specific voice by ID.\n- **POST** `/api/transcriptions`: Transcribe voice to script.\n- **POST** `/api/projects`: Create a new project.\n- **GET** `/api/projects`: Get all projects.\n- **GET** `/api/projects/:id`: Get a specific project by ID.\n- **PUT** `/api/projects/:id`: Update a specific project by ID.\n- **DELETE** `/api/projects/:id`: Delete a specific project by ID.\n- **POST** `/api/feedback`: Submit feedback.\n- **GET** `/api/feedback`: Get all feedback.\n- **GET** `/api/feedback/:id`: Get a specific feedback by ID.\n- **PUT** `/api/feedback/:id`: Update a specific feedback by ID.\n- **DELETE** `/api/feedback/:id`: Delete a specific feedback by ID.\n- **POST** `/api/notifications`: Create a new notification.\n- **GET** `/api/notifications`: Get all notifications.\n- **GET** `/api/notifications/:id`: Get a specific notification by ID.\n- **PUT** `/api/notifications/:id`: Update a specific notification by ID.\n- **DELETE** `/api/notifications/:id`: Delete a specific notification by ID.\n- **POST** `/api/analytics`: Create a new analytics record.\n- **GET** `/api/analytics`: Get all analytics records.\n- **GET** `/api/analytics/:id`: Get a specific analytics record by ID.\n- **PUT** `/api/analytics/:id`: Update a specific analytics record by ID.\n- **DELETE** `/api/analytics/:id`: Delete a specific analytics record by ID.\n\n\u003c/details\u003e\n\n## 🔑 Authentication\n\nThe API uses a custom authentication system, where users must sign up and log in to access features like script creation and project management. Passwords are securely hashed before being stored in the database.\n\n- JWT tokens are used for authentication, and they should be included in the `Authorization` header of requests to protected endpoints.\n- The token should be in the format `Bearer \u003ctoken\u003e`.\n- Ensure to handle token expiration and refresh tokens as needed.\n- The authentication middleware checks for the presence of a valid token before allowing access to protected routes.\n- You can use the `useAuth` hook in the frontend to manage authentication state and access user information.\n\n## 🔒 License\n\nThis project is **open-sourced with restrictions**.\n\n- All rights are reserved by the core team.\n- You are free to use or adapt the code, but **must credit the original authors**.\n- Contributions are welcome and will be **acknowledged**, but do not grant ownership or redistribution rights.\n- Redistribution or commercial use without explicit permission is **not allowed**.\n- You may not use the code in any way that could be considered **derivative** or **commercial** without explicit permission from the Scriptor Team.  \n  Read more at [LICENSE.md](./LICENSE.md).\n\n## The Scriptor Team\n\n- [Anish Srivastava](https://github.com/iamanishsrivastava)\n- [Sandeep](https://github.com/devwithgroot)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamanishsrivastava%2Fscriptor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamanishsrivastava%2Fscriptor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamanishsrivastava%2Fscriptor/lists"}