SpeakWise-Backend is a Django-based backend for the SpeakWise application, designed to provide robust APIs and backend services.
- Django 5.x project structure
- Environment-based settings (development, production)
- Code formatting and linting scripts (
black.sh,flake8.sh) - Modular settings and scripts
- Python 3.10+
- pip
- Virtualenv (recommended)
-
Clone the repository:
git clone https://github.com/hellospeakwise-hq/speakwise-backend.git cd SpeakWise-Backend -
Create and activate a virtual environment:
python3 -m venv env source env/bin/activate -
Install dependencies:
pip install -r requirements.txt
-
Configure Environment
cp .env.example .env # Create your environment file # Edit .env with your preferred settings
-
Run migrations:
python manage.py migrate
-
Start the development server:
python manage.py runserver
Note: SpeakWise uses three settings environments:
settings/base.pysettings/local.pysettings/prod.pyTo specify which settings to use, you can run:
python3 manage.py runserver --settings=speakwise.settings.localpython3 manage.py runserver --settings=speakwise.settings.prodOr set the environment variable so you don't have to specify it every time:
export DJANGO_SETTINGS_MODULE=speakwise.settings.local
speakWise/- Main Django projectsettings/- Environment-specific settingsscripts/- Formatting and linting scriptsenv/- Virtual environment (not tracked in git)
We welcome contributions! Please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name
- Make your changes and pre-commit before you commit your changes:
please make sure to install pre-commit with
uv pip install pre-commitorpip install pre-commitif you are not usinguvas a package manager. You can also installuvwithpip install uvread more aboutuvhere
git add .
pre-commit run --all-files
git commit -m "Describe your changes"-
Run formatting and linting:
./speakwise/scripts/black.sh ./speakwise/scripts/flake8.sh
-
Push to your fork:
git push origin feature/your-feature-name
-
Open a Pull Request on GitHub.
- Use Black for formatting.
- Use Flake8 for linting.
- Use pre-commit for running git hooks