ParticiApp frontend UI module for LitePolis
Project description
LitePolis-ui-particiapp
ParticiApp frontend UI module for LitePolis. This module packages the ParticiApp frontend as a LitePolis UI module, providing a clean, modern interface for participating in Polis conversations using the ParticiAPI specification.
Learn more about the amazing work by Code for NL: https://gitlab.com/particiapp/particiapi
Overview
ParticiApp provides a simpler alternative to the Polis participation frontend:
- Clean, accessible UI design
- Works with ParticiAPI specification
- Static HTML/CSS/JS (no build step required)
- Supports voting, statement submission, and visualization
Installation
litepolis-cli deploy add-deps litepolis-database-default
litepolis-cli deploy add-deps litepolis-database-particiapi
litepolis-cli deploy add-deps litepolis-router-particiapi
litepolis-cli deploy add-deps litepolis-ui-particiapp
litepolis-cli deploy sync-deps
Configuration
This module exports default configuration that will be used automatically. To customize, create a config file:
litepolis-cli deploy init-config
Then edit ~/.litepolis/litepolis.config to add:
[litepolis_ui_particiapp]
base_url = /particiapp
api_base_url = /api
Or set environment variables:
export LITEPOLIS_UI_PARTICIAPP_BASE_URL=/particiapp
Quick Start
- Install all ParticiAPI modules:
litepolis-cli deploy add-deps litepolis-router-particiapi
litepolis-cli deploy add-deps litepolis-database-particiapi
litepolis-cli deploy add-deps litepolis-ui-particiapp
litepolis-cli deploy sync-deps
- Start LitePolis server:
litepolis-cli deploy serve
- Access ParticiApp:
- Main UI:
http://localhost:8000/particiapp/ - Conversation:
http://localhost:8000/particiapp/{conversation_id}
- Main UI:
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/particiapp/ |
GET | Main ParticiApp UI |
/particiapp/privacy |
GET | Privacy policy page |
/particiapp/{conversation_id} |
GET | Conversation view |
/particiapp/scripts/* |
GET | JavaScript files |
/particiapp/style/* |
GET | CSS stylesheets |
/particiapp/images/* |
GET | Image assets |
/particiapp/fonts/* |
GET | Web fonts |
ParticiAPI Compatibility
This UI module works with LitePolis-router-particiapi:
| ParticiAPI Endpoint | Method | Description |
|---|---|---|
/api/session |
POST | Create/refresh session |
/api/conversations/{id} |
GET | Get conversation |
/api/conversations/{id}/statements/ |
GET/POST | Get/submit statements |
/api/conversations/{id}/votes/{tid} |
PUT | Submit vote |
/api/conversations/{id}/participant |
GET | Get participant info |
/api/conversations/{id}/results/ |
GET | Get results |
Testing
# Run unit tests
pytest tests/ -v
# E2E test with running server
python -c "
import requests
resp = requests.get('http://localhost:8000/particiapp/')
assert resp.status_code == 200
assert 'Agree' in resp.text
print('✓ ParticiApp UI test passed!')
"
Project Structure
LitePolis-ui-particiapp/
├── pyproject.toml
├── README.md
├── litepolis_ui_particiapp/
│ ├── __init__.py # Exports: router, DEFAULT_CONFIG, prefix, dependencies
│ ├── core.py # FastAPI router
│ └── static/ # ParticiApp frontend
│ ├── index.html
│ ├── privacy.html
│ ├── scripts/
│ │ └── particiapi-client.js
│ ├── style/
│ ├── images/
│ └── fonts/
└── tests/
└── test_core.py
Architecture
┌─────────────────────────────────────────────────────────────┐
│ LitePolis + ParticiApp │
├─────────────────────────────────────────────────────────────┤
│ Browser → /particiapp/{conversation_id} │
│ ↓ │
│ LitePolis-ui-particiapp (static HTML/CSS/JS) │
│ ↓ API calls │
│ LitePolis-router-particiapi (/api/* ParticiAPI) │
│ ↓ │
│ LitePolis-database-particiapi (SQLModel) │
└─────────────────────────────────────────────────────────────┘
Comparison: ParticiApp vs Polis Frontend
| Feature | ParticiApp | Polis Frontend |
|---|---|---|
| Framework | Vanilla JS | Backbone.js/React |
| API | ParticiAPI | Polis API v3 |
| Complexity | Simple | Complex |
| Customization | Easy | Moderate |
Related Projects
- LitePolis - Main project
- LitePolis-router-particiapi - ParticiAPI backend
- LitePolis-database-particiapi - Database layer
- ParticiApp - Official ParticiApp project
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file litepolis_ui_particiapp-0.1.1.tar.gz.
File metadata
- Download URL: litepolis_ui_particiapp-0.1.1.tar.gz
- Upload date:
- Size: 24.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5386267bbbe323d51c8c6ab628fc9cd1a08fa1bd3b71708543dc4fe2f0a4d74c
|
|
| MD5 |
1baac47b0bcf889e6292c9cf67dbc273
|
|
| BLAKE2b-256 |
88d665a1e81d4a9db06d4698240b152f29e8be3b3ee322c07f706148e9c1e6e8
|
Provenance
The following attestation bundles were made for litepolis_ui_particiapp-0.1.1.tar.gz:
Publisher:
python-publish.yml on NewJerseyStyle/LitePolis-ui-particiapp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
litepolis_ui_particiapp-0.1.1.tar.gz -
Subject digest:
5386267bbbe323d51c8c6ab628fc9cd1a08fa1bd3b71708543dc4fe2f0a4d74c - Sigstore transparency entry: 1376478056
- Sigstore integration time:
-
Permalink:
NewJerseyStyle/LitePolis-ui-particiapp@54c6e149b8734e8036ead6ce05237fcb34d2e8cb -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/NewJerseyStyle
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@54c6e149b8734e8036ead6ce05237fcb34d2e8cb -
Trigger Event:
release
-
Statement type:
File details
Details for the file litepolis_ui_particiapp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: litepolis_ui_particiapp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 24.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ededf577a40caeb28fb39b5519e35663123e9cc74bb22b68c0560d2cdf5db878
|
|
| MD5 |
880dc17953691da7514bc566f637c345
|
|
| BLAKE2b-256 |
12265359577c3016d891bdb3b8ceb1148a9bf6aa0b3d074ee17ea01232e5a25a
|
Provenance
The following attestation bundles were made for litepolis_ui_particiapp-0.1.1-py3-none-any.whl:
Publisher:
python-publish.yml on NewJerseyStyle/LitePolis-ui-particiapp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
litepolis_ui_particiapp-0.1.1-py3-none-any.whl -
Subject digest:
ededf577a40caeb28fb39b5519e35663123e9cc74bb22b68c0560d2cdf5db878 - Sigstore transparency entry: 1376478084
- Sigstore integration time:
-
Permalink:
NewJerseyStyle/LitePolis-ui-particiapp@54c6e149b8734e8036ead6ce05237fcb34d2e8cb -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/NewJerseyStyle
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@54c6e149b8734e8036ead6ce05237fcb34d2e8cb -
Trigger Event:
release
-
Statement type: