🧹 frontend: Final cleanup — reorganize assets, update stale references
Moved `assets/bootstrap/js/bootstrap.bundle.min.js` to `assets/js/` and deleted the now-empty `assets/bootstrap/` directory. All frontend assets now live under `assets/css/`, `assets/js/`, `assets/fonts/`, and `assets/webfonts/` — no more nested vendor directories. Cleaned `assets/css/custom.css`: - Replaced a gradient with four identical color stops with a plain `background: var(--primary-color)` (the gradient was a no-op) - Removed dead `.google` share button styles (no Google share button exists in any template) Updated stale references: - `templates/follow.html`: Updated X (formerly Twitter) share URL from deprecated `intent/tweet` to `intent/post` endpoint - `templates/base.html`: Updated footer issue tracker links from Pagure to Forgejo (`forge.fedoraproject.org`) - `AGENTS.md`: Marked Phases 3–5 as completed, updated stack description, replaced config file docs with env var docs, updated Docker references to Podman Assisted-by: Claude Opus 4.6 (1M context) Signed-off-by: Justin Wheeler <jwheel@fedoraproject.org>
This commit is contained in:
parent
6a98ddb9de
commit
ba84784baa
5 changed files with 17 additions and 48 deletions
27
AGENTS.md
27
AGENTS.md
|
|
@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) and other AI agents
|
|||
|
||||
Fedora Happiness Packets is a Django web application that enables Fedora community members to send anonymous appreciation messages. It integrates with Fedora Account System (FAS) for user lookup, Fedora OIDC (via `mozilla-django-oidc`) for authentication, and `fedora-messaging` for publishing events to the Fedora message bus.
|
||||
|
||||
**Current stack**: Django 5.1, Python 3.14, Poetry for dependency management, PostgreSQL, Redis, Celery.
|
||||
**Current stack**: Django 5.1, Python 3.12–3.14, Poetry for dependency management, PostgreSQL, Redis, Celery, Bootstrap 5.3, CKEditor 5.
|
||||
|
||||
## Modernization Vision
|
||||
|
||||
|
|
@ -17,11 +17,11 @@ This project was dormant from 2021 to 2026 and is undergoing an incremental mode
|
|||
- Phase 1: Django 2.0 → 5.1 upgrade (four incremental LTS steps) and deprecated package replacement
|
||||
- Phase 2: Pipenv → Poetry migration, pyproject.toml, v1.0.0 release
|
||||
- Phase 2.5: Forgejo Actions CI pipeline (lint + test)
|
||||
|
||||
**Upcoming phases:**
|
||||
- Phase 3: Containerfile and Podman migration (replace Docker)
|
||||
- Phase 4: Settings refactoring (12-factor, eliminate config files read at import time)
|
||||
- Phase 5: Frontend modernization (Bootstrap 5, self-hosted fonts, CKEditor 5)
|
||||
- Phase 5: Frontend modernization (Bootstrap 5.3, self-hosted fonts, CKEditor 5, jQuery removed)
|
||||
|
||||
**Upcoming phases:**
|
||||
- Phase 6: OpenShift-native manifests (Kustomize, health probes, Routes)
|
||||
- Phase 7: Search backend replacement (Haystack/Whoosh → PostgreSQL full-text search)
|
||||
- Phase 8: Fedora integration updates (OIDC JWKS discovery, FAS/Noggin API, fedora-messaging)
|
||||
|
|
@ -40,18 +40,15 @@ poetry install
|
|||
poetry install --without docs
|
||||
```
|
||||
|
||||
### Required Config Files
|
||||
### Environment Variables
|
||||
|
||||
These files are read at import time by `dev.py` and `base.py` (to be replaced with env vars in Phase 4):
|
||||
- `config.yml` — admin user config (copy from `config.yml.example`)
|
||||
- `client_secrets.json` — OIDC client credentials (`{"client_id": "...", "client_secret": "..."}`)
|
||||
- `fas-admin-details.json` — FAS admin credentials (`{"ADMIN_USERNAME": "...", "ADMIN_PASSWORD": "..."}`)
|
||||
All configuration is via environment variables (12-factor). Copy `.env.example` to `.env` for local development. See `.env.example` for the full list of available variables.
|
||||
|
||||
### Running with Docker Compose (temporary, until Phase 3 Podman migration)
|
||||
### Running with Podman Compose
|
||||
|
||||
```bash
|
||||
docker-compose up --build
|
||||
docker-compose exec web python manage.py migrate
|
||||
podman-compose up --build
|
||||
podman-compose exec web python manage.py migrate
|
||||
```
|
||||
|
||||
## Testing and Linting
|
||||
|
|
@ -94,8 +91,8 @@ Each message has separate `sender_email_token` and `recipient_email_token` for a
|
|||
### Settings Hierarchy
|
||||
|
||||
`happinesspackets/settings/`:
|
||||
- `base.py` — shared config, reads `config.yml` at import time (to be replaced with env vars in Phase 4)
|
||||
- `dev.py` — extends base; DEBUG=True, console email, connects to Docker services, reads `client_secrets.json` and `fas-admin-details.json`
|
||||
- `base.py` — shared config, all settings via environment variables with sensible defaults
|
||||
- `dev.py` — extends base; DEBUG=True, console email, connects to Podman Compose services
|
||||
- `tsting.py` — extends dev; MD5 password hasher, ModelBackend auth, disables debug toolbar
|
||||
- `deployment.py` — production; Redis cache, file logging, Mailjet SMTP
|
||||
- `ci.py` — CI environment
|
||||
|
|
@ -118,7 +115,7 @@ Messages have layered privacy controls: `sender_named`, `sender_approved_public`
|
|||
- **URL routing**: Uses `re_path` (regex patterns)
|
||||
- **Views**: Class-based views with `django.contrib.auth.mixins`
|
||||
- **Forms**: Crispy Forms with Bootstrap 5 template pack
|
||||
- **Rich text**: CKEditor for message composition, nh3 for HTML sanitization
|
||||
- **Rich text**: CKEditor 5 for message composition, nh3 for HTML sanitization
|
||||
- **Email**: HTML emails rendered from Django templates, sent via Celery
|
||||
- **Database**: PostgreSQL with `ATOMIC_REQUESTS = True`
|
||||
- **Linting**: ruff (configured in `pyproject.toml`)
|
||||
|
|
|
|||
|
|
@ -241,27 +241,7 @@ blockquote {
|
|||
position: fixed;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
background: -moz-linear-gradient(
|
||||
top,
|
||||
var(--primary-color) 0%,
|
||||
var(--primary-color) 27%,
|
||||
var(--primary-color) 27%,
|
||||
var(--primary-color) 100%
|
||||
);
|
||||
background: -webkit-linear-gradient(
|
||||
top,
|
||||
var(--primary-color) 0%,
|
||||
var(--primary-color) 27%,
|
||||
var(--primary-color) 27%,
|
||||
var(--primary-color) 100%
|
||||
);
|
||||
background: linear-gradient(
|
||||
to bottom,
|
||||
var(--primary-color) 0%,
|
||||
var(--primary-color) 27%,
|
||||
var(--primary-color) 27%,
|
||||
var(--primary-color) 100%
|
||||
);
|
||||
background: var(--primary-color);
|
||||
}
|
||||
|
||||
aside .sidebar {
|
||||
|
|
@ -341,14 +321,6 @@ blockquote {
|
|||
background-color: #2f4779;
|
||||
}
|
||||
|
||||
.google {
|
||||
background-color: #d34836;
|
||||
}
|
||||
|
||||
.google:hover {
|
||||
background-color: #b72213;
|
||||
}
|
||||
|
||||
@media (max-width: 360px) {
|
||||
.btn-responsive {
|
||||
font-size: 12.5px;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<link href="{% static 'css/fedora-theme.css' %}" rel="stylesheet">
|
||||
<link href="{% static 'css/custom.css' %}" rel="stylesheet">
|
||||
<link href="{% static 'images/favicon.ico' %}" rel="icon" type="image/x-icon">
|
||||
<script src="{% static 'bootstrap/js/bootstrap.bundle.min.js' %}" defer></script>
|
||||
<script src="{% static 'js/bootstrap.bundle.min.js' %}" defer></script>
|
||||
<script src="{% static 'js/fas_details.js' %}" defer></script>
|
||||
{% block extra_head %}{% endblock %}
|
||||
</head>
|
||||
|
|
@ -120,10 +120,10 @@
|
|||
{% endblock %}
|
||||
Fedora Happiness Packets is a fork of <a href="https://github.com/mxsasha/happinesspackets/">Happiness Packets</a> and part of GSoC 2018.
|
||||
<br>
|
||||
Need help? Report an issue <a href="https://pagure.io/coc">here</a>.
|
||||
Need help? Report an issue <a href="https://forge.fedoraproject.org/commops/fedora-happiness-packets/issues">here</a>.
|
||||
<img class="emoji" src="{% static 'images/emoji/loveletter.png' %}" alt="💌" title="Love letter" aria-label="Emoji: Love letter" style="vertical-align: text-bottom">
|
||||
<br>
|
||||
Got feedback? File an issue <a href="https://pagure.io/fedora-commops/fedora-happiness-packets/new_issue">here</a>
|
||||
Got feedback? File an issue <a href="https://forge.fedoraproject.org/commops/fedora-happiness-packets/issues/new">here</a>
|
||||
</div>
|
||||
<div class="socio-buttons">
|
||||
<a href="https://www.facebook.com/TheFedoraProject"><i class="fab fa-facebook-f fa-lg"></i></a>
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
<p>Share <span class="wearefedora">#WeAreFedora </span> </p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="https://x.com/intent/tweet?button_hashtag=WeAreFedora" class="sharebutton twitter" data-size="large" data-dnt="true"><i class="fab fa-twitter fa-lg"></i> Post </a>
|
||||
<a href="https://x.com/intent/post?hashtags=WeAreFedora" class="sharebutton twitter" data-size="large" data-dnt="true"><i class="fab fa-twitter fa-lg"></i> Post </a>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue