Skip to content

RedFlag Analyzer – A simple, modern webapp for the objective assessment of red flags in relationships through community-weighted questionnaires and score calculation (Django + PostgreSQL)

License

Notifications You must be signed in to change notification settings

lucmuss/redflag-analyzer

Repository files navigation

RedFlag Analyzer

A Django-based web app for relationship red-flag analysis with a structured questionnaire and scoring model.

Tech stack

  • Django 5.x
  • PostgreSQL
  • HTMX + Tailwind CSS (server-rendered)
  • Gunicorn + Nginx
  • Docker, uv, Ruff, MyPy, Pytest

Quick start (local)

# Create venv and install dependencies
just setup

# Run migrations
uv run python django_app/manage.py migrate

# Seed questions
uv run python django_app/manage.py seed_questions

# Create admin user
uv run python django_app/manage.py createsuperuser

# Start dev server
just dev

Open: http://localhost:8083

Configuration

  • Copy django_app/.env.example to django_app/.env and update values.
  • For Docker, update django_app/.env.docker.
  • A full list of variables is in .env.example.

Usage

Local dev:

just dev

Docker:

just docker-up

Open: http://localhost:8082

Docs:

  • docs/DOCKER_SETUP.md
  • docs/DOCKER_USAGE.md
  • docs/RAILWAY_DEPLOY.md

Examples

See examples/usage.sh for common commands.

Development workflow

# Format
just format

# Lint + format check
just lint

# Type check
just typecheck

# Tests
just test

# Full local CI (includes build)
just ci

Git workflow

  1. Create a feature branch from main.
  2. Make changes and run just format and just check.
  3. Open a pull request and ensure CI is green.
  4. Squash or rebase before merge.

Release steps

  1. Update pyproject.toml version.
  2. Run just ci locally.
  3. Tag the release: git tag vX.Y.Z.
  4. Push tags: git push --tags.
  5. GitHub Actions publishes artifacts and builds binaries.

Troubleshooting

  • Database connection errors: use docker-compose exec web ... inside the container.
  • Port conflicts: ensure 8082, 8083, and 5433 are available.
  • Missing env vars: compare django_app/.env.example and .env.example.

License

MIT. See LICENSE.

About

RedFlag Analyzer – A simple, modern webapp for the objective assessment of red flags in relationships through community-weighted questionnaires and score calculation (Django + PostgreSQL)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages