Thank you for your interest in contributing to the Language Learning App! This document provides guidelines and instructions for contributing.
- Node.js (v20 or higher)
- npm (v9 or higher)
- Git
- An Inworld AI account and API key
-
Fork the repository on GitHub
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/language-learning-node.git cd language-learning-node -
Install dependencies:
npm install
-
Set up environment variables: Create a
backend/.envfile:INWORLD_API_KEY=your_api_key_here ASSEMBLY_AI_API_KEY=your_api_key_here
-
Verify the setup:
npm run build npm run lint --prefix backend npm run lint --prefix frontend
-
Create a feature branch:
git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix -
Make your changes and test them locally
-
Run code quality checks before committing:
# Backend npm run lint --prefix backend # Check for linting errors npm run lint:fix --prefix backend # Auto-fix linting issues npm run format:check --prefix backend # Verify formatting npm run type-check --prefix backend # Check TypeScript types # Frontend npm run lint --prefix frontend npm run format:check --prefix frontend # Build both npm run build
-
Commit your changes:
git add . git commit -m "Your descriptive commit message"
Write clear, descriptive commit messages that explain what and why you changed something.
- Use TypeScript strict mode
- Provide explicit types for function parameters and return values
- Avoid
anytypes - useunknownor proper types instead - Follow the existing code style and patterns
- This project uses ESM modules (
type: "module")
- Code is automatically formatted with Prettier
- Run
npm run format --prefix backendandnpm run format --prefix frontendbefore committing - Maximum line length: 80 characters
- Use single quotes for strings
- Use semicolons
- ESLint is configured with TypeScript support
- All linting errors must be resolved before submitting a PR
- Run
npm run lint:fix --prefix backendornpm run lint:fix --prefix frontendto auto-fix issues
language-learning-node/
├── backend/ # Backend TypeScript code
│ ├── src/
│ │ ├── __tests__/ # Backend unit tests
│ │ ├── config/ # Language & server configuration
│ │ ├── graphs/ # Inworld Runtime conversation graphs
│ │ ├── helpers/ # Audio utils, connection management
│ │ ├── prompts/ # Nunjucks prompt templates
│ │ ├── services/ # Server components
│ │ ├── utils/ # Logger
│ │ └── server.ts # Entry point
│ └── vitest.config.ts # Backend test config
├── frontend/ # Frontend React application
│ ├── src/
│ │ ├── __tests__/ # Frontend unit tests
│ │ ├── components/ # React components
│ │ ├── context/ # App state & auth
│ │ ├── hooks/ # Custom React hooks
│ │ ├── services/ # WebSocket client, audio, storage
│ │ ├── styles/ # CSS
│ │ └── types/ # TypeScript types
│ └── vitest.config.ts # Frontend test config
├── supabase/
│ └── migrations/ # Database schema
└── render.yaml # Render deployment config
-
Update your fork:
git checkout main git pull upstream main git push origin main
-
Create your PR:
- Push your branch to your fork
- Open a Pull Request on GitHub
- Fill out the PR template (if available)
- Link any related issues
-
PR Requirements:
- All tests pass (if applicable)
- Code follows style guidelines
- Linting passes (
npm run lint --prefix backend && npm run lint --prefix frontend) - Type checking passes (
npm run type-check --prefix backend) - Build succeeds (
npm run build) - Documentation is updated if needed
-
Code Review:
- Address any feedback from reviewers
- Keep your PR focused on a single change
- Keep commits clean and logical
When reporting bugs, please include:
- A clear, descriptive title
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Environment details (Node.js version, OS, etc.)
- Relevant code snippets or error messages
For feature requests, please include:
- A clear description of the feature
- Use case and motivation
- Proposed implementation approach (if you have one)
- GitHub Issues: Open an issue
By contributing, you agree that your contributions will be licensed under the MIT License.