cd backend
./start.sh
or manually:
cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python -m spacy download en_core_web_sm
python -m app.main
cd backend
start.bat
or manually:
cd backend
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
python -m spacy download en_core_web_sm
python -m app.main
Backend will be running at http://localhost:8000.
API Documentation: http://localhost:8000/api/docs
Open a new terminal:
cd frontend
npm install
npm start
Frontend will automatically open at http://localhost:3000.
Go to backend directory:
cd backend
Create virtual environment:
python3 -m venv venv
# Windows: python -m venv venv
Activate virtual environment:
source venv/bin/activate
# Windows: venv\Scripts\activate
Install packages:
pip install -r requirements.txt
Download spaCy model (for NLP):
python -m spacy download en_core_web_sm
For Turkish (optional):
python -m spacy download tr_core_news_sm
Start Backend:
python -m app.main
Or with uvicorn:
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
โ If the backend is running successfully, you will see:
INFO: Uvicorn running on http://0.0.0.0:8000
INFO: Application startup complete.
Go to frontend directory:
cd frontend
Install packages:
npm install
Start Frontend:
npm start
โ If the frontend is running successfully, your browser will open automatically:
Compiled successfully!
You can now view locatethenews-frontend in the browser.
Local: http://localhost:3000
Import error:
# Check if virtual environment is active
which python # macOS/Linux
where python # Windows
# Should point to venv/bin/python or venv\Scripts\python
spaCy model error:
python -m spacy download en_core_web_sm
Port already in use:
# Find and kill the process using port 8000
lsof -ti:8000 | xargs kill # macOS/Linux
# or change SERVER_PORT in config.py
npm install error:
# Check Node.js version
node --version # should be 16+
# Clean npm cache
npm cache clean --force
npm install
Port 3000 in use:
# Use a different port
PORT=3001 npm start
Backend connection error:
cd frontend
npm run build
# Static files will be generated in build/ folder
# With Gunicorn (recommended)
pip install gunicorn
gunicorn app.main:app -w 4 -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:8000
docker-compose up
If you encounter issues: