feat(frontend): integrate tailwind pipeline and update templates
This commit is contained in:
22
README.md
22
README.md
@ -9,6 +9,7 @@ A minimal read-only API is included as a secondary integration surface.
|
||||
- Python 3.12+
|
||||
- Django
|
||||
- Django Templates + HTMX
|
||||
- Tailwind CSS (CLI build pipeline)
|
||||
- PostgreSQL
|
||||
- Redis
|
||||
- Celery + Celery Beat
|
||||
@ -45,6 +46,8 @@ A minimal read-only API is included as a secondary integration surface.
|
||||
├── docs/
|
||||
├── nginx/
|
||||
├── requirements/
|
||||
├── package.json
|
||||
├── tailwind.config.js
|
||||
├── static/
|
||||
├── templates/
|
||||
├── tests/
|
||||
@ -91,8 +94,10 @@ docker compose exec web python manage.py createsuperuser
|
||||
## Setup and Run Notes
|
||||
|
||||
- `web` service starts through `entrypoint.sh` and waits for PostgreSQL readiness.
|
||||
- `web` service also builds Tailwind CSS before `collectstatic` when `AUTO_BUILD_TAILWIND=1`.
|
||||
- `celery_worker` executes background sync work.
|
||||
- `celery_beat` supports scheduled jobs (future scheduling strategy can be added per provider).
|
||||
- `tailwind` service runs watch mode for development (`npm run dev`).
|
||||
- nginx proxies web traffic and serves static/media volume mounts.
|
||||
|
||||
## Docker Volumes and Persistence
|
||||
@ -104,6 +109,7 @@ docker compose exec web python manage.py createsuperuser
|
||||
- `media_data`: user/provider media artifacts
|
||||
- `runtime_data`: app runtime files (e.g., celery beat schedule)
|
||||
- `redis_data`: Redis persistence (`/data` for RDB/AOF files)
|
||||
- `node_modules_data`: Node modules cache for Tailwind builds in containers
|
||||
|
||||
This keeps persistent state outside container lifecycles.
|
||||
|
||||
@ -135,6 +141,22 @@ Run a focused module:
|
||||
docker compose run --rm web sh -lc 'pip install -r requirements/dev.txt && pytest -q tests/test_api.py'
|
||||
```
|
||||
|
||||
## Frontend Assets (Tailwind)
|
||||
|
||||
Build Tailwind once:
|
||||
|
||||
```bash
|
||||
docker compose run --rm web sh -lc 'npm install --no-audit --no-fund && npm run build'
|
||||
```
|
||||
|
||||
Run Tailwind in watch mode during development:
|
||||
|
||||
```bash
|
||||
docker compose up tailwind
|
||||
```
|
||||
|
||||
Source CSS lives in `static/src/tailwind.css` and compiles to `static/css/main.css`.
|
||||
|
||||
## Superuser and Auth
|
||||
|
||||
Create superuser:
|
||||
|
||||
Reference in New Issue
Block a user