~loges/poaster

minimal, libre bulletin board for posts

23c8e4c refactor: attach sub commands to the root command

~loges pushed to ~loges/poaster git

6 months ago

f036b37 build: bump to version 1.5.0

~loges pushed to ~loges/poaster git

7 months ago

#poaster


builds.sr.ht status PyPI - Version License: AGPL v3

Minimal, libre bulletin board for posts.

You can see a simple demo of poaster here.

#Features

  • Display bulletin posts to all users.
  • Create, update, and delete posts as authenticated user.
  • Manage posts through web app and JSON API.
  • Offer CLI for managing users and app state.
  • Expose configuration options through environment variables.

#Roadmap

  • Refined access control (admin, members, public).
  • Add markdown support for post content.

#Quickstart

Install package:

pip install poaster

Initialize application:

poaster init

Add a user:

poaster users add

Launch application server:

poaster run

#Configuration

You can configure parts of the application in the shell environment. Here's an example .env:

# Logging
LOG_LEVEL="info"

# Database
DB_PATH="/./poaster.db"

# Security
SECRET_KEY="<generated-when-initializing-app>"
SECRET_KEY_N_BYTES=32
ALGORITHM="HS256"

# Theming
TITLE="poaster"
COLOR_DANGER="#FF595E"
COLOR_INFO="#1982C4"
COLOR_PRIMARY="#6A4C93"
COLOR_SUCCESS="#8AC926"
COLOR_WARINING="#FFCA3A"

#Development

The easiest way to develop locally with poaster is to use hatch. With hatch, you will have access to important helper scripts for running locally, linting, type-checks, testing, etc.

#Testing

Lint and check types with:

hatch run check

Format code with:

hatch run format

Run test suite and report coverage with:

hatch run cov

#Database Management

To upgrade the local database to latest schema, run:

hatch run db:upgrade

Now that the tables are created, you can add fixtures:

hatch run db:fixtures

If you add or update a table, you can generate a migration script by running:

hatch run db:migration

If the migration script wasn't generated, check to see if you imported the model to env.py.

#Local Server

Run the application server locally with:

hatch run dev

The server should reload on changes to the source code.

#License

poaster is distributed under the terms of the AGPLv3 license.