Skip to content

lexradar/lex-radar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lex Radar

Lex Radar is a production-oriented regulatory monitoring application for Turkish Resmî Gazete publications.

It scans Gazette issues, parses documents, matches organization interests and custom keywords, creates daily digest records, and supports email-ready notification flows.

Production URLs

Backend:

https://lex-radar-backend.onrender.com

Backend health check:

https://lex-radar-backend.onrender.com/api/health/

Frontend:

https://lex-radar.netlify.app

Repository:

https://github.com/lexradar/lex-radar

Tech stack

Backend:

Python
Django
Django REST Framework
PostgreSQL
Gunicorn
WhiteNoise

Frontend:

React
TypeScript
Vite
Tailwind CSS
Playwright

Automation and deployment:

GitHub Actions
Render
Netlify

Repository structure

backend/      Django backend and API
frontend/     React frontend
docs/         Project operations and E2E documentation
.github/      GitHub Actions workflows

Local backend setup

From the repository root:

cd backend
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver

Useful backend checks:

python manage.py check
python manage.py makemigrations --check --dry-run
python manage.py test --keepdb

Local frontend setup

From the repository root:

cd frontend
npm install
npm run dev

Production build check:

npm run build

E2E smoke tests

The frontend includes Playwright-based production smoke tests.

Run locally:

cd frontend
$env:E2E_APP_URL="https://lex-radar.netlify.app"
$env:E2E_API_BASE_URL="https://lex-radar-backend.onrender.com/api"
$env:E2E_EMAIL="YOUR_TEST_EMAIL"
$env:E2E_PASSWORD="YOUR_TEST_PASSWORD"
npm run test:e2e

GitHub workflow:

Actions → E2E Smoke

The E2E Smoke workflow can run manually and is also scheduled daily at:

06:00 UTC = 09:00 Turkey time

See:

docs/e2e-smoke-tests.md

Demo digest data

A deterministic demo digest can be seeded for E2E/demo accounts:

python manage.py seed_demo_digests --email "$E2E_EMAIL" --password "$E2E_PASSWORD" --reset-password

On Render Free, shell access is not available. Use a temporary Build Command only when needed, then immediately restore the golden Build Command.

See:

docs/production-readiness-checklist.md

GitHub Actions workflows

Main workflows:

CI
Daily Gazette
Gazette Source Probe
SMTP Test
E2E Smoke

Important notes:

  • CI validates backend and frontend health.
  • Daily Gazette handles Gazette scan execution.
  • E2E Smoke validates production user-facing flows.
  • Playwright reports are uploaded as artifacts when E2E runs.

Production readiness

The operational checklist is here:

docs/production-readiness-checklist.md

It covers:

Render golden settings
Deploy checks
Health checks
Daily Gazette checks
E2E Smoke triage
Secrets and credential rules
Known harmless warnings

Render golden backend settings

Root Directory:

backend

Build Command:

pip install -r requirements.txt && python manage.py collectstatic --noinput && python manage.py migrate

Start Command:

gunicorn config.wsgi:application --timeout 180

Health Check Path:

/api/health/

Security notes

Never commit:

passwords
deploy hooks
SMTP credentials
Render environment variables
GitHub repository secrets
production database URLs
private tokens

Required GitHub E2E secrets:

E2E_EMAIL
E2E_PASSWORD

If a password was shared in chat, screenshots, logs, or a public place, rotate it.

Development rule of thumb

Before calling a production step complete:

local tests/builds pass
CI passes
deploy succeeds
health check is 200
E2E Smoke passes when relevant
git status is clean
one-off Build Commands are restored

About

Production-ready regulatory monitoring app for Turkish Resmî Gazete publications, with interest matching, daily digests, and E2E smoke testing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors