Thanks for your interest in contributing to MediScript AI.
MediScript AI is an open-source clinical documentation blueprint built with a Next.js App Router frontend, serverless API routes, and a two-stage AI pipeline using OpenAI Whisper for speech-to-text transcription and GPT-4o for contextual speaker diarization, SOAP note generation, and medical billing code extraction. We welcome improvements across the codebase, documentation, bug reports, design feedback, and workflow polish.
Before you start, read the relevant section below. It helps keep contributions focused, reviewable, and aligned with the current project setup.
Before you dive in, make sure you have these installed:
# Check Node.js (18+ recommended)
node --version
# Check npm
npm --version
# Check Docker
docker --version
# Check Git
git --versionNew to contributing?
- Open an issue or pick an existing one to work on.
- Fork the repo and create a branch from
main. - Follow the local setup guide below.
- Run the app locally and verify your change before opening a PR.
- Start with the main project docs in
README.md. - If something is unclear, open a GitHub issue with your question and the context you already checked.
- Search existing issues first.
- If the bug is new, open a GitHub issue.
- Include your environment, what happened, what you expected, and exact steps to reproduce.
- Add screenshots, browser console logs, or API error responses if relevant.
- Open a GitHub issue describing the feature.
- Explain the problem, who it helps, and how it fits MediScript AI.
- If the change is large, get alignment in the issue before writing code.
All contributions should come from a fork of the repository. This keeps the upstream repo clean and lets maintainers review changes via pull requests.
Click the Fork button at the top-right of the MediScript AI repo to create a copy under your GitHub account.
git clone https://github.com/<your-username>/MediScriptAI.git
cd MediScriptAIgit remote add upstream https://github.com/cld2labs/MediScriptAI.gitThis lets you pull in the latest changes from the original repo.
Always branch off main. See Branching model for naming conventions.
git checkout main
git pull upstream main
git checkout -b <type>/<short-description>- Node.js 18+ and npm
- Git
- Docker (for containerized deployment testing)
- An OpenAI API key (used for both Whisper STT and GPT-4o)
npm installCreate a .env.local file in the project root:
cp .env.example .env.localOpen .env.local and add your OpenAI API key:
OPENAI_API_KEY=sk-your-openai-api-key-hereNote: MediScript AI uses only the OpenAI API. No other third-party AI service keys are required.
npm run devThe application runs at http://localhost:3000.
Important: Always use the exact
http://localhost:3000URL. Browser microphone access is blocked on non-HTTPS origins —localhostis the only exception. Using127.0.0.1or your machine's local IP address will silently block the microphone.
Open http://localhost:3000 in your browser. You should see the MediScript AI interface with the dark-mode UI, the compliance disclaimer banner, and the audio input panel.
To test without spending API credits, you can temporarily enable the mock backend by replacing the API logic in app/api/process-audio/route.ts with the hardcoded fixture response and a setTimeout of 3 seconds. This lets you verify all UI flows — loading states, keyword highlighting, SOAP note rendering, and export buttons — without making real OpenAI calls.
To test the production build locally:
# Build the image
docker build -t mediscript-ai .
# Run the container, injecting your API key at runtime
docker run -p 3000:3000 -e OPENAI_API_KEY="sk-your-openai-api-key-here" mediscript-aiOpen http://localhost:3000. If the UI loads and audio processing works, the container is production-ready.
- If the microphone is blocked, confirm you are accessing the app via
http://localhost:3000and not a local IP address. - If audio processing returns a 500 error, open the browser console and confirm your
OPENAI_API_KEYis set correctly in.env.localand that you restarted the dev server after saving the file. - If the Docker build fails, confirm that
output: 'standalone'is set innext.config.tsand rebuild withdocker build --no-cache -t mediscript-ai . - If ports
3000are already in use, stop the conflicting process before starting MediScript AI.
- Open or choose an issue.
- Fork the repo and create a feature branch from
main. - Keep the change focused on a single problem.
- Run the app locally and verify the affected workflow end-to-end (audio capture → transcription → SOAP notes → export).
- Update docs when behavior, setup, environment variables, or architecture changes.
- Open a pull request back to upstream
main.
Documentation updates are welcome. Relevant files currently live in:
- Push your branch to your fork.
- Go to the MediScript AI repo and click Compare & pull request.
- Set the base branch to
main. - Fill in the PR template describing what changed and why.
- Submit the pull request.
A maintainer will review your PR. You may be asked to make changes — push additional commits to the same branch and they will be added to the PR automatically.
Before opening your PR, sync with upstream to avoid merge conflicts:
git fetch upstream
git rebase upstream/main- Fork the repo and base new work from
main. - Open pull requests against upstream
main. - Use descriptive branch names with a type prefix:
| Prefix | Use |
|---|---|
feat/ |
New features or enhancements |
fix/ |
Bug fixes |
docs/ |
Documentation changes |
refactor/ |
Code restructuring (no behavior change) |
chore/ |
Dependency updates, CI changes, tooling |
Examples: feat/pdf-export, fix/microphone-permissions, docs/update-setup-guide, refactor/soap-notes-component
Use Conventional Commits format:
<type>(<optional scope>): <short description>
Examples:
git commit -m "feat(api): add ICD-10 code extraction to billing endpoint"
git commit -m "fix(ui): resolve keyword highlight overlap on long transcripts"
git commit -m "docs: add Docker troubleshooting steps to CONTRIBUTING"
git commit -m "chore: upgrade next to latest patch version"Keep commits focused — one logical change per commit.
- Follow the existing project structure and patterns before introducing new abstractions.
- Keep frontend changes consistent with the Next.js App Router, Tailwind CSS, and shadcn/ui setup already in use.
- Keep backend changes consistent with the Next.js serverless API route structure under
app/api/. - The AI pipeline follows a strict two-step pattern: Whisper handles audio-to-text, GPT-4o handles all contextual reasoning (diarization, SOAP generation, billing codes). Preserve this separation.
- Do not introduce additional AI providers or third-party STT services without opening an issue and getting alignment first.
- Avoid unrelated refactors in the same pull request.
- Do not commit secrets, API keys,
.env.localfiles, or generated audio artifacts. - Prefer clear, small commits and descriptive pull request summaries.
- Update documentation when contributor setup, behavior, environment variables, or API usage changes.
Before submitting your pull request, confirm the following:
- You tested the affected flow locally (including the full audio → transcript → SOAP notes → export path where relevant).
- The application still starts successfully in the environment you changed.
- You removed debug code, stray console logs, and commented-out experiments.
- You documented any new setup steps, environment variables, or behavior changes.
- You kept the pull request scoped to one issue or topic.
- You added screenshots for UI changes when relevant.
- You did not commit secrets, API keys, or local audio/generated data.
- You are opening the pull request against
main.
If one or more of these are missing, the pull request may be sent back for changes before review.
MediScript AI is built for demonstration purposes only as part of the Cloud2 Labs Innovation Hub.
This demo is not a clinical documentation system and should not be used for medical decision-making.
Contributors should not introduce features that store, log, or persist any patient audio, transcripts, or personally identifiable information. The ephemeral, zero-storage architecture is a core non-functional requirement of this project.
Thanks for contributing to MediScript AI. Whether you are fixing a bug, improving the AI prompt engineering, refining the UI, or updating the docs, your work helps make the project more useful and easier to maintain.