VoiceBridge is a free and open source web app that helps children or adults with autism communicate by offering visual tools for daily activities, including navigating places, choosing food, and accessing calming music playlists.
- Frontend: React 18, TypeScript, Tailwind CSS 3.4, shadcn/ui
- Backend: Next.js 16 (App Router), better-auth
- Database: MongoDB (direct driver, no ORM)
- State Management: TanStack React Query, React Context
- Forms: react-hook-form, Zod
- Analytics: PostHog
- UI Kit: shadcn/ui, Lucide Icons
- Hosting: Coolify (self-hosted)
For comprehensive codebase documentation, refer to:
/docs/index.md— Main documentation hub (start here)CODEBASE_MAP.md— Quick navigation and overviewAGENTS.md— Detailed coding guidelines, conventions, and patterns
The /docs/ directory contains 11 comprehensive markdown files covering architecture, API endpoints, components, hooks, database patterns, authentication, styling, and conventions.
- Node.js 18+
- npm or yarn
- MongoDB instance (local or cloud)
- Google OAuth credentials (for authentication)
-
Clone the repository:
git clone https://github.com/harryt04/voice-bridge.git cd voice-bridge -
Install dependencies:
npm install
-
Set up environment variables:
cp .env.sample .env.local
Then edit
.env.localwith your actual values:NEXT_PUBLIC_POSTHOG_KEY— PostHog analytics keyNEXT_PUBLIC_POSTHOG_HOST— PostHog host URLBETTER_AUTH_SECRET— Random string (min 32 chars) for better-authBETTER_AUTH_URL— Server-side auth base URL (e.g.,http://localhost:3000)NEXT_PUBLIC_BETTER_AUTH_URL— Client-side auth base URL (same as above)GOOGLE_CLIENT_ID— Google OAuth client IDGOOGLE_CLIENT_SECRET— Google OAuth client secretNEXT_PUBLIC_APP_URL— Public app URL (e.g.,http://localhost:3000)MONGO_CONNECTION_STRING— MongoDB connection URI
-
Create MongoDB indexes (optional but recommended):
npx gulp create-indexes
Note: If gulp is not found, install it globally first:
npm install -g gulp -
Start the development server:
npm run dev
Open http://localhost:3000 in your browser.
npm run dev # Start development server (next dev)
npm run build # Production build (also serves as type checker)
npm run start # Start production server
npm run lint # Run ESLint
npm run prettify # Format all files with Prettier
npx gulp create-indexes # Create MongoDB indexesWe welcome contributions! Whether you're fixing bugs, adding features, or improving documentation, please follow these steps:
# Update main branch
git checkout master
git pull origin master
# Create a new branch for your work
git checkout -b feature/your-feature-name
# or for bug fixes:
git checkout -b fix/bug-descriptionUse descriptive branch names (e.g., feature/add-dark-mode, fix/speaker-deletion-bug).
- Follow the coding conventions in AGENTS.md:
- Use
kebab-casefor file names - Use
PascalCasefor React components - Use
use-prefix for custom hooks - Follow the naming conventions table in AGENTS.md
- Use
- Ensure code is properly formatted with
npm run prettify - Check for linting errors with
npm run lint - Update documentation in
/docs/if your changes affect existing functionality
npm run build # Catches TypeScript errors
npm run lint # Checks for ESLint violations
npm run dev # Test locally in browserBefore opening a PR, format your changes and run the complete validation suite:
npm run prep # Formats your changes with Prettier (prettier --write .)
npm run ci # Runs all checks: format check, lint, build, and testnpm run ci is non-mutating and is the same command GitHub Actions runs on every
pull request into master, so a clean local run means the PR check will pass too.
We loosely follow conventional commits:
git add .
git commit -m "fix: resolve speaker deletion crash"
# or
git commit -m "feat: add dark mode toggle"
# or
git commit -m "docs: update API route specifications"Common prefixes:
fix:— Bug fixesfeat:— New featuresdocs:— Documentation updatesrefactor:— Code restructuring (no behavior change)chore:— Dependency updates, tooling changes
git push origin feature/your-feature-nameThen:
- Visit the repository on GitHub
- You'll see a prompt to create a Pull Request for your branch
- Fill in the PR title and description:
- Title: Keep it concise (under 70 characters)
- Description: Explain what changed and why. Reference any related issues.
- Click "Create Pull Request"
Before submitting your PR, ensure:
- Code is formatted (
npm run prettify) - No linting errors (
npm run lint) - TypeScript compiles (
npm run build) - Changes follow coding conventions in AGENTS.md
- Documentation is updated if needed
- Related issues are referenced in the PR description
- Supply values for the environment variables (see
.env.sample) - Deploy to your hosting provider:
- Set your
MONGO_CONNECTION_STRINGin.env.local - Create indexes in your MongoDB instance:
npx gulp create-indexes
- No semicolons, single quotes, trailing commas enforced via Prettier
- 80-character line width for readability
- Path aliases: Use
@/*for all internal imports (maps to project root) - TypeScript strict mode enabled with optional implicit
anyallowed - Server Components by default,
'use client'for client components
See AGENTS.md for comprehensive style and naming guidelines.
VoiceBridge is free and open source. Check the LICENSE file for details.