Skip to content

9) Setup Guide

jsh6269 edited this page Nov 30, 2025 · 2 revisions

Environment Requirements

  • Backend: Django (Python 3.8+)
  • Frontend: Android (Kotlin, Jetpack Compose)
  • Database: SQLite (development) / PostgreSQL (production)
  • External Services: OpenAI API, AWS S3, Google Cloud Speech-to-Text API

Step 1: Backend Setup

Note: The backend is currently running on Team 3's remote server. You can use the app directly without local backend setup.

Click to expand if you want to set up backend locally
  1. Poppler Installation

    Please install Poppler for your OS and make sure its bin folder is added to your system PATH.

    • Windows: Install Poppler (prebuilt binaries) and add bin to PATH
    • macOS: brew install poppler (ensure PATH is updated)
    • Linux: Install poppler-utils via your package manager

    Verify by running pdfinfo in a new terminal.

  2. Navigate to Backend Directory

    cd backend
  3. Create .env File

    Create your S3 bucket first, and make .env at backend/ directory like below.

    OPENAI_API_KEY='YOUR_OPENAI_API_KEY'
    SECRET_KEY='DJANGO_SECRET_KEY'
    
    AWS_ACCESS_KEY_ID='YOUR_AWS_ACCESS_KEY_ID'
    AWS_SECRET_ACCESS_KEY='YOUR_AWS_SECRET_ACCESS_KEY'
    AWS_REGION=ap-northeast-2
    AWS_STORAGE_BUCKET_NAME='YOUR_S3_BUCKET_NAME'
    GOOGLE_APPLICATION_CREDENTIALS='YOUR_PATH/service-account-key.json'

    Create secret key (Optional) If you want to create secret key for Django, run the command below to generate a key.

    python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
  4. Google Cloud Setup (for speech-to-text)

    1. Create project at Google Cloud Console
    2. Activate Speech-to-Text API
    3. Create Service accounts & Download Json key
    4. Set GOOGLE_APPLICATION_CREDENTIALS in .env file
  5. Create Virtual Environment

    python -m venv venv
  6. Activate Virtual Environment

    # Windows
    venv\Scripts\activate
    
    # Linux/Mac
    source venv/bin/activate
  7. Install Dependencies

    pip install -r requirements-local.txt
  8. SentenceTransformer Model Setup

    # Download model for semantic feature extraction
    python -c "from sentence_transformers import SentenceTransformer; model = SentenceTransformer('snunlp/KR-SBERT-V40K-klueNLI-augSTS'); model.save('submissions/utils/KR_SBERT_local')"
  9. RoBERTa Model Setup

    Download model from LINK, unzip and place at backend/reports/utils/models directory

  10. Run Django Server

# Run database migrations
python manage.py makemigrations
python manage.py migrate

# Create superuser (optional)
python manage.py createsuperuser

# Create initial sample data for testing (recommended)
python manage.py create_all

# Run development server
python manage.py runserver

Step 2: Run Android App

  1. Open Android Studio and open the frontend directory

  2. For Emulator Testing:

    • Open the "Extended Controls" window of your selected virtual device
    • Go to "Microphone" and enable "Virtual microphone uses host audio input"
    • This allows the emulator to capture real voice input for testing
  3. Build and Run the app on your device or emulator

  4. Configure API Endpoint (if needed):

    • Ensure the app is configured to connect to http://10.0.2.2:8000 for emulator
    • For physical device, use your computer's local IP address

Clone this wiki locally