Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2906d37
Initial commit
Janek3d Jan 24, 2026
6b472a9
Add PRD and mcp initial config
Janek3d Jan 25, 2026
8ceb809
Add django initial app, django-allauth, nginx config, seaweed, postgr…
Janek3d Jan 25, 2026
55036fc
Add Celery and YAML based config for Django
Janek3d Jan 25, 2026
2c335da
Update config loader to accept yaml key as also env key
Janek3d Jan 25, 2026
b3ab0b6
Add Celery worker for the GPU related tasks
Janek3d Jan 26, 2026
7ddbdf1
Pre download Yolo models during docker buildy
Janek3d Jan 26, 2026
222e6be
Add instructions for the split deployment
Janek3d Jan 26, 2026
772ce38
Add security explanation behind deploy strategy
Janek3d Jan 26, 2026
73e72fa
Move documents into docs/ directory
Janek3d Jan 26, 2026
a35a89e
Add gallery app
Janek3d Jan 26, 2026
1b7ce17
Add frontend for the Gallery
Janek3d Jan 26, 2026
8bc1607
Add initial tests and Github Actions to run those tests
Janek3d Jan 26, 2026
27ed146
Fix tests and add Makefiley
Janek3d Jan 27, 2026
6eac1d3
Add SeaweedFS auth script
Janek3d Jan 27, 2026
b863662
Some minor fixes
Janek3d Jan 28, 2026
92d5fad
Fix Makefile docker compose commands
Janek3d Jan 29, 2026
3ca6669
Add delete and bulk delete operation to pictures
Janek3d Jan 29, 2026
df23ca9
Add delete operations for Galleries and Albums
Janek3d Jan 29, 2026
15f1907
Add celery task to extract text
Janek3d Jan 29, 2026
372eec8
Add edit of Picture tags
Janek3d Jan 29, 2026
c9f4e39
Treat AI tags as normal tags but there is type attribute
Janek3d Jan 29, 2026
a93a00a
Fix removing tag from Gallery
Janek3d Jan 29, 2026
6a2a7c0
Add a way to rerun object recognition and text extraction
Janek3d Jan 30, 2026
a72b171
Optimize dockerfile.celery and change minimul python version
Janek3d Jan 30, 2026
4b9bee1
Add Auth0 to the socialaccount providers
Janek3d Jan 31, 2026
f317ea0
Add e2e tests using Pytest-Playwright
Janek3d Jan 31, 2026
1103447
Fix github action test
Janek3d Jan 31, 2026
96c1b53
Add nginx ssl config
Janek3d Jan 31, 2026
657b1de
Change the way requirements are installed
Janek3d Jan 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .cursor/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"mcpServers": {
"10x-mvp-tracker": {
"command": "npx",
"args": ["-y", "@przeprogramowani/10x-mvp-tracker@latest"],
"transport": "stdio"
}
}
}
38 changes: 38 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.git
.gitignore
.github
.cursor

__pycache__/
*.py[cod]
*.pyo
*.pyd

.venv/
venv/
env/

.pytest_cache/
htmlcov/
.coverage
.coverage.*
junit.xml

# Local/dev config & secrets
.env
.env.*
config.yaml

# Runtime/generated artifacts
app/celerybeat-schedule
app/celerybeat-schedule.*
**/celerybeat-schedule
**/celerybeat-schedule.*

# Media/static outputs (generated or mounted at runtime)
media/
static/
staticfiles/
app/media/
app/static/
app/staticfiles/
71 changes: 71 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Django Settings
# Environment variable names can match YAML paths exactly (dot-separated lowercase)
# or use traditional format (uppercase with underscores)
# Both formats work: 'django.secret_key' OR 'DJANGO_SECRET_KEY'
django.secret_key=your-secret-key-here-change-in-production
django.debug=True
django.allowed_hosts=localhost,127.0.0.1
django.site_id=1
# Alternative uppercase format also works:
# DJANGO_SECRET_KEY=your-secret-key-here-change-in-production
# DJANGO_DEBUG=True

# Database Configuration
# Dot-separated format (matches YAML exactly) or uppercase underscore format
# For VPS: Use local database
database.name=gallery
database.user=postgres
database.password=postgres
database.host=db
database.port=5432
# For Local GPU Worker: Use VPS database via WireGuard VPN
# database.host=10.0.0.1
# database.port=5432
# Alternative: DATABASE_NAME, DATABASE_USER, etc. also work

# Authentication Configuration
# Dot-separated format (matches YAML exactly)
authentication.account_email_verification=none
# Options: 'mandatory', 'optional', or 'none'

# Social Authentication - Google
# Dot-separated format preferred, uppercase underscore also works
social_auth.google.enabled=true
social_auth.google.client_id=your-google-client-id
social_auth.google.secret=your-google-secret

# Social Authentication - Facebook
social_auth.facebook.enabled=false
social_auth.facebook.app_id=your-facebook-app-id
social_auth.facebook.app_secret=your-facebook-app-secret

# Social Authentication - GitHub
social_auth.github.enabled=false
social_auth.github.client_id=your-github-client-id
social_auth.github.secret=your-github-secret

# Celery Configuration
# Dot-separated format (matches YAML exactly)
# For VPS: Use local Redis
celery.broker_url=redis://redis:6379/0
celery.result_backend=redis://redis:6379/0
# For Local GPU Worker: Use VPS Redis via WireGuard VPN
# celery.broker_url=redis://10.0.0.1:6379/0
# celery.result_backend=redis://10.0.0.1:6379/0
REDIS_PORT=6379

# Flower Configuration (Celery Monitoring)
# Note: FLOWER_USERNAME and FLOWER_PASSWORD are still used directly (not from config.yaml)
FLOWER_PORT=5555
FLOWER_USERNAME=admin
FLOWER_PASSWORD=change-this-password-in-production

# SeaweedFS / S3 Configuration
# Dot-separated format (matches YAML exactly)
storage.use_s3=False
storage.s3.access_key_id=
storage.s3.secret_access_key=
storage.s3.bucket_name=gallery
storage.s3.endpoint_url=http://seaweedfs:8333
storage.s3.region_name=us-east-1
storage.s3.use_ssl=False
72 changes: 72 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# GitHub Actions Workflows

This directory contains GitHub Actions workflows for CI/CD.

## Workflows

### `tests.yml` (Enabled)

Runs the full test suite (unit + e2e with Playwright) on every pull request and push to main branches.

**Features:**
- Tests on Python 3.11 and 3.12
- **uv** for installs with dependency cache (`enable-cache: true`, keyed by `uv.lock`)
- **Playwright** for e2e: Chromium only; browser binaries cached (`~/.cache/ms-playwright`, keyed by `uv.lock`); on cache hit only OS deps are installed
- Uses SQLite (no external database required)
- Generates coverage reports
- Uploads test results as artifacts
- Optional Codecov integration

**Triggers:**
- Pull requests to `main`, `master`, or `develop`
- Pushes to `main`, `master`, or `develop`

### `tests.yml.disabled` (Legacy / Disabled)

Previous test workflow (pip-based, no Playwright). Superseded by `tests.yml`.

### `lint.yml.disabled` (Currently Disabled)

Runs code quality checks (optional - can be enabled when you add linting tools).

**Features:**
- Checks code formatting with `black`
- Checks import sorting with `isort`
- Runs `ruff` for linting

**Note:** Currently set to not fail the build (`|| true`). Remove this when you're ready to enforce linting.

## Setup

### Codecov (Optional)

If you want to use Codecov for coverage tracking:

1. Sign up at [codecov.io](https://codecov.io)
2. Add your repository
3. The workflow will automatically upload coverage reports

If you don't want Codecov, the workflow will still work - it just won't upload coverage (the step is set to `continue-on-error: true`).

## Customization

### Enable Lint Workflow

To enable the lint workflow, rename `lint.yml.disabled` → `lint.yml`.

### Add More Python Versions

Edit `.github/workflows/tests.yml`:

```yaml
matrix:
python-version: ["3.11", "3.12", "3.13"]
```

### Add PostgreSQL for Integration Tests

Uncomment the PostgreSQL service section in `tests.yml` if you need it for integration tests.

### Enable Linting Enforcement

Edit `.github/workflows/lint.yml` (after enabling) and remove `|| true` from the commands to make linting failures block PRs.
44 changes: 44 additions & 0 deletions .github/workflows/lint.yml.disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Lint

on:
pull_request:
branches:
- main
- master
- develop
push:
branches:
- main
- master
- develop

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip'

- name: Install linting dependencies
run: |
python -m pip install --upgrade pip
pip install ruff black isort mypy

- name: Run ruff
run: |
ruff check app/ || true

- name: Check code formatting with black
run: |
black --check app/ || true

- name: Check import sorting with isort
run: |
isort --check-only app/ || true
82 changes: 82 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Tests

on:
pull_request:
branches:
- main
- master
- develop
push:
branches:
- main
- master
- develop

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.11", "3.12"]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: Install dependencies
run: uv sync --locked --extra dev

- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('uv.lock') }}
restore-keys: |
playwright-${{ runner.os }}-

- name: Install Playwright Chromium
run: |
if [ "${{ steps.playwright-cache.outputs.cache-hit }}" != "true" ]; then
uv run playwright install chromium --with-deps
else
uv run playwright install-deps
fi

- name: Run tests with pytest (unit + e2e)
env:
DJANGO_SETTINGS_MODULE: config.test_settings
run: |
uv run pytest --cov=app --cov-report=xml --cov-report=term-missing --junitxml=junit.xml -v

- name: Upload coverage to Codecov (optional)
uses: codecov/codecov-action@v4
if: always()
continue-on-error: true
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-${{ matrix.python-version }}
path: |
junit.xml
coverage.xml
retention-days: 30
Loading
Loading