|
||
---|---|---|
.vscode | ||
admin | ||
campaign_manager | ||
features | ||
git-hooks | ||
migrations | ||
tests | ||
.env | ||
.envrc | ||
.gitignore | ||
.gitlab-ci.yml | ||
alembic.ini | ||
developer-requirements.txt | ||
README.md | ||
requirements.txt | ||
TODO.MD |
CampaignManager
Project status
Pre-Alpha - Not ready for use
Badges
#TODO: Add badges
Description
This software allows a team to co-ordinate a political or public relations campaign. This software includes elements of a Customer Relationship Management (CRM) tool and a project management tool.
Features are defined in the features directory.
Roadmap
2024 - First release
Features:
- Database for tracking contacts
- Event management including calendar
- OAuth2 authentication
- Interface to allow synchronization with legacy CRM
Not in scope:
- Javascript. MVP will be a server-side rendered application.
Tools
- PostgreSQL 17 - Database
- Python 3.13 - Software
- Alembic - Database migrations
- Behave - Feature definition, Behavior Driven Development
- Flask - Web framework
- SQlModel - ORM
- Pytest - Unit testing
- mypy - Static type checking
Installation
#TODO: Add installation instructions
Getting to postgres
docker run --name campaignmanager-postgres \
-e "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}" \
-p 127.0.0.1:5432:5432 \
-d postgres
Usage
Very early days
flask run
Migrations
python -m alembic revision --autogenerate -m "reason"
Then review the changes in the generated file in the alembic/versions
directory.
Then apply the changes
python -m alembic upgrade head
Grants
If you're not logging in as the database owner (which is the design for production, but overhead for dev) then you'll need
GRANT ALL ON DATABASE ? TO ?;
GRANT ALL ON SCHEMA public to ?;
GRANT ALL ON ALL TABLES IN SCHEMA public to ?;
/* you might need this too
SELECT 'ALTER TABLE '|| table_name||' OWNER TO ?;'
FROM Information_schema.tables
where table_schema = 'public'
*/
OAuth
The OAuth logins require configuration at the far end.
Nationbuilder
The "App" in Nationbuilder uses this callback URL http://127.0.0.1:5000/login/nationbuilder/authorized
Support
No support for this version
Contributing
Python code is formatted with black and linted with flake8 Development has been done on OSX 14, dependencies on that platform un not desired, but probably exist. #TODO: Add contributing guidelines
Authors and acknowledgment
Steven Ensslen
License
GNU AFFERO GENERAL PUBLIC LICENSE Version 3 https://www.gnu.org/licenses/agpl-3.0.html