This project provides a backend service for the Extended IPA Symbols application. The backend handles data storage, audio file serving, and manages extended phoneme data.
- RESTful API for phoneme data
- Extended IPA symbols support
- Audio file serving
- Proposal system for new symbols
- Discussion forum
- Database support (SQLite or PostgreSQL)
- Python 3.9+
- pip (Python package manager)
- Optional: Docker and Docker Compose for containerized deployment
The easiest way to get started is using the provided start script:
# Make the script executable
chmod +x start.sh
# Run the script
./start.shThe script will:
- Check for and create required directories
- Set up a Python virtual environment
- Install dependencies
- Initialize the database
- Start the FastAPI server
If you prefer to set up manually:
# Create a virtual environment
python -m venv venv
# Activate the virtual environment
# On Windows:
venv\Scripts\activate
# On Unix or MacOS:
source venv/bin/activate
# Install dependencies
pip install -r backend/requirements.txt
# Initialize the database
python -m backend.scripts.init_db
# Start the server
cd backend
uvicorn app.main:app --reload# Start all services
docker-compose up -d
# View logs
docker-compose logs -fmy_extended_ipa_symbols/
├── backend/ # Python FastAPI server
│ ├── app/
│ │ ├── __init__.py
│ │ ├── main.py # FastAPI application entry point
│ │ ├── models/ # Database models
│ │ ├── routers/ # API route handlers
│ │ ├── schemas/ # Pydantic models for validation
│ │ ├── services/ # Business logic
│ │ └── database.py # Database connection
│ ├── audio_files/ # Storage for audio files
│ ├── scripts/ # Utility scripts
│ ├── requirements.txt # Dependencies
│ └── Dockerfile # For containerization
└── docker-compose.yml # For local development
- GET
/api/languages- List all languages - GET
/api/languages/{lang_code}- Get specific language details
- GET
/api/languages/{lang_code}/phonemes- Get all phonemes for a language - GET
/api/languages/{lang_code}/phonemes/{phoneme_id}- Get specific phoneme - GET
/api/languages/{lang_code}/phonemic- Get phonetic view data - GET
/api/languages/{lang_code}/extended-phonemes- Get only extended IPA phonemes - GET
/api/languages/{lang_code}/impossible-phonemes- Get impossible phonemes - GET
/api/phonemes/categories- Get phoneme categories
- GET
/api/audio/{lang_code}/{filename}- Serve audio file
If you've implemented the extended features:
- GET/POST
/api/proposals- Symbol proposals system - GET/POST
/api/discussions- Discussion forum - GET
/api/notifications- Notification system
To import extended IPA data:
# Extract data from HTML
python -m backend.scripts.extract_extended_phonemes
# Import to database
python -m backend.scripts.import_extended_ipa- Create a new model file in
app/models/ - Create a corresponding schema file in
app/schemas/ - Create a router in
app/routers/ - Include the router in
app.main:app
# Run tests
pytest- Deploy on AWS EC2, DigitalOcean Droplet, or similar
- Use Docker for containerization
- Set up a PostgreSQL database for production
- Configure Nginx as a reverse proxy
- Deploy the backend on Heroku, Render, or Railway
- Use their PostgreSQL add-ons
- Store audio files on AWS S3 or similar storage service
- Convert backend to AWS Lambda functions with API Gateway
- Use a service like DynamoDB for data storage
- Store audio files in S3
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.