Welcome to the Aipress24 project! Aipress24 is an innovative, open-source digital platform designed to transform the way journalists, news agencies, and media professionals collaborate and monetize their work. Developed by Techno-Chroniqueurs Associés, with the technical expertise of Abilian, Aipress24 provide a comprehensive B2B environment tailored to the needs of the information and innovation sectors.
Warning
This code is still evolving quickly, and not meant for production yet. In particular, the database schema is still evolving, and we don't support schema migrations yet.
- Introduction
- Features
- Getting Started / Installation
- Contributing
- License
- Technology used
- Security
- Deployment
Additionals notes:
- CODE_OF_CONDUCT.md - Code of Conduct
- TROUBLESHOOTING.md - Troubleshooting guide
- PUBLIC_CODE_COMPLIANCE.md - Public Code Compliance self-assessment
- STANDARDS.md - Standards used by Aipress24
- CHANGELOG.md - Changelog
- CITATION.cff - Citation file
- DCO.txt - Developer Certificate of Origin
- DEPLOYMENT.md - Deployment instructions (on cloud platforms or on-premises)
See also the companion documentation https://doc.aipress24.com/ and its source, the documentation repository: https://github.com/aipress24/aipress24-doc.
Aipress24 aims to revolutionize the media industry by offering a suite of tools that enhance productivity, foster community interaction, and create new revenue streams for journalists and media organizations. Our mission is to support journalism and innovation by providing a platform that facilitates content creation, collaboration, and distribution.
- Collaborative Newsroom: A digital workspace where journalists can create, edit, and publish content collaboratively.
- Professional Social Network: Connect with other media professionals, share insights, and build your network.
- Marketplace: Sell and purchase editorial products and services, including articles, reports, and multimedia content.
- Content Management: Advanced tools for managing articles, press releases, event schedules, and more.
- Event Scheduling: Organize and manage media events, press conferences, and interviews.
- Reputational Performance Index (IRP): Evaluate journalists based on their interactions and contributions.
- Secure and Transparent: Ensures secure transactions and interactions with rigorous verification of professionals.
Assuming you have Python (version 3.12 or 3.13) and poetry installed, to get started with Aipress24, follow these
steps:
- Clone the Repository:
git clone https://github.com/aipress24/aipress24.git
- Install Dependencies:
Navigate to the project directory and install the necessary dependencies.
cd aipress24 poetry shell make develop - Set environment variables:
And then edit
cp .env.sample .env
.envto set the environment variables to your liking. - Create fake data:
make fake
- Run the Application:
Start the development server.
make run
- Open Your Browser:
Open your browser and go to
http://localhost:5000to see the application in action.
- PostgreSQL
- Redis
- Typesense
To start Typesense (currently):
docker run -p 8108:8108 -v/srv/typesense-server-data-1c/:/data -d typesense/typesense:0.23.1 --data-dir /data --api-key=<key> --listen-port 8108 --enable-cors
- Testing + static checking:
poetry install
poetry run make lint
poetry run make test-sqlite
poetry run noxWe welcome contributions from the community! Whether you're a developer, designer, journalist, or simply someone passionate about media and innovation, there are many ways to get involved:
- Submit Issues: If you find bugs or have feature requests, please submit an issue on our GitHub repository issue tracker.
- Fork the Repository: Make changes in your own fork, and submit a pull request when you're ready.
- Join Discussions: Participate in discussions on our forums or GitHub issues to help shape the future of Aipress24.
- Documentation: Help improve our documentation by contributing to this README, the notes or the documentation.
Okay, here's the revised "Development Environment" section, incorporating your feedback and focusing on the Python (with some NodeJS) nature of the application:
To set up your development environment for this primarily Python-based application, with some Node.js components for the frontend, ensure you have the following installed:
- Python: Version 3.12 or 3.13.
- Poetry: For managing Python dependencies and virtual environments. (NB: we're currently phasing our Poerty for uv)
- Node.js: We recommend using the latest LTS version for frontend development.
- npm or Yarn Bun: To manage Node.js packages.
Once you have these installed, follow these steps to set up your development environment:
-
Clone the Repository: Clone the repository to your local machine using Git:
git clone ...
-
Type
make developto install the necessary dependencies and set up the development environment.
Besides the uv tool, we use the following tools to maintain the codebase:
- ruff: A modern, flexible, and efficient way to manage Python environments.
- black: The uncompromising Python code formatter.
- isort: A Python utility / library to sort imports.
- flake8: A Python tool that glues together pep8, pyflakes, mccabe, and third-party plugins to check the style and quality of some Python code.
- mypy: An optional static type checker for Python.
- pyright: A static type checker for Python that runs in the background.
- pytest: A framework that makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries.
- beartype: A runtime type-checker for Python functions.
- typeguard: Run-time type checking for Python functions.
- nox: A flexible test automation tool that automates testing in multiple Python environments.
We orchestrate these tools using make, the standard build tool on Unix-like systems, which provides shortcuts for common tasks based on these tools:
The provided Makefile orchestrates various tasks to streamline development, testing, formatting, and maintenance workflows. Here’s a high-level overview of the key functionalities it provides:
develop: Installs development dependencies, activates pre-commit hooks, and configures Git for rebase workflows by default.install-deps: Ensures the project's dependencies are synced and up-to-date usinguv sync.update-deps: Updates the project's dependencies to the latest compatible versions usinguv sync -U.activate-pre-commit: Installs pre-commit hooks to automatically enforce coding standards during commits.configure-git: Sets Git to use rebase workflows automatically when pulling branches.test: Runs Python unit tests usingpytest.test-randomly: Executes tests in a randomized order to uncover order-dependent issues.test-e2e: Placeholder for running end-to-end tests (not yet implemented).test-with-coverage: Runs tests and generates a coverage report for the specified package.test-with-typeguard: Verifies runtime type checking for the package usingTypeguard.lint: Performs linting and type-checking usingadt checkto ensure code quality.format: Formats code to meet the style guide usingdocformatterfor documentation strings andadt formatfor general formatting.clean: Cleans up temporary files, cache directories, and build artifacts, leaving the repository in a pristine state.help: Displays availablemakecommands and their descriptions, leveragingadt help-make.
The full list of available commands can be viewed by running make help.
- Fork the Repository: Create a fork of the repository in your own GitHub/GitLab account.
- Create a Feature Branch: Make a new branch in your fork for the feature or bugfix you plan to work on.
- Follow the Code Style: Adhere to the project's code style guidelines (see below).
- Add Tests: Ensure your changes are covered by appropriate unit and integration tests.
- Document Changes: Update relevant sections in the documentation, including this README if necessary.
- Submit a Pull Request: Open a pull request against the
mainbranch of this repository with a clear description of your changes.
We use PEP 8 as the basis for our code style. In practice, most of the code formatting is handled by the following tools:
- Ruff: Does most of the formatting, and also handles linting and static analysis.
- Black: Ensures consistent formatting (currently phased out in favor of
ruff). - isort: Organizes imports (currently phased out in favor of
ruff). - Pyupgrade: Upgrades syntax to newer versions of Python.
To apply formatting and linting, simply run:
black .
isort .
ruff format
ruff . --fix(ruff last as it may conflict with some of the changes made by black and isort.)
Or, better yet, use the provided Makefile shortcuts:
make format: Apply formatting.
Tests are critical to maintaining the quality and reliability of the codebase. We encourage contributors to:
- Add unit tests for new or modified functionalities.
- Write integration tests for changes that affect multiple components.
Run all tests using:
pytestFor test coverage, use:
pytest --cov=aipress24The Makefile provides shortcuts for common testing tasks:
make test: Run all tests.make test-randomly: Run tests in random order.make test-with-coverage: Run tests with coverage report.make test-with-typeguard: Run tests with typeguard enabled.make test-with-beartype: Run tests with beartype enabled.make lint: Run linters and static analysis.
All new features or changes should be documented. The documentation should include:
- Code Comments: Explain non-trivial parts of the code.
- README Updates: Update this file for any major changes in functionality or usage.
- Changelog: Add a note in the upcoming changelog (to be implemented).
To ensure a smooth review process:
- Make sure your branch is up to date with the
mainbranch. - Ensure all tests pass and there are no linting or formatting issues.
- Provide a clear and concise description of the changes in your pull request, including any relevant issue numbers.
- Be responsive to reviewer feedback and address any requested changes promptly.
This project adheres to the PSF Code of Conduct. By participating, you agree to abide by its terms. Please be respectful and collaborative in all interactions.
For further details, see the [CODE_OF_CONDUCT.md](notes/CODE_OF_CONDUCT.md) file in the repository.
Aipress24 is built using modern web technologies to ensure scalability, security, and performance:
- Frontend: Developed using HTMX and TailwindCSS for a responsive and interactive user interface.
- Backend: Powered by Python, with a PostgreSQL database for data management.
- Search: Utilizes ElasticSearch for powerful and efficient search capabilities.
- Storage: Amazon S3 compatible open-source solutions like Minio or Ceph for object storage.
- Security: Implements best practices for security, including bcrypt for password hashing and proactive monitoring.
For more details, see: https://doc.aipress24.com/dev/architecture/
- Update Documentation
- Update the documentation to reflect the latest changes and features.
- See: README, notes, https://doc.aipress24.com/
- Finalize Core Platform Stabilization
- Refactor and stabilize the data model to ensure compatibility with future updates.
- News Portal MVP
- Launch the news portal with basic features for publishing, viewing, and ranking articles.
- Social Interaction Features
- Deploy Like, Share, and Comment functionality with customizable settings for authors.
- Implement metrics for content popularity and interaction (e.g., views, shares, purchases).
- Business Wall Subscriptions
- Complete Business Wall subscription system for PR professionals, organizations, and media.
- Marketplace for Journalists
- Launch a marketplace for selling articles, multimedia content, and intellectual property licenses.
- Content Management Tools
- Add advanced tools for categorizing, tagging, and managing articles.
- Enable bulk publishing and scheduling for agencies.
- Matchmaking System
- Develop ML-driven matchmaking for connecting journalists, PR professionals, and experts.
- Allow filters for specific sectors, regions, or topics.
- ERP Integration
- Integrate Dolibarr ERP for managing organizational finances. Cf. https://doc.aipress24.com/dev/dolibarr/.
- Cloud Deployment
- Package as a Nix / NixOS application for easy deployment on cloud platforms.
- Support deployment on Hop3.
- Refactor blob storage to support S3-compatible solutions.
- Reputational Performance Index (IRP)
- Introduce IRP to measure journalist contributions based on metrics like engagement and content quality.
- Provide organization-specific IRP settings to customize evaluation criteria.
- ActivityPub Integration
- Begin pilot integration with ActivityPub to enable federated content sharing across instances.
- Build connectors for interoperability with Mastodon, Mobilizon, and other platforms.
- Press and Media Tools
- Develop advanced analytics for organizations to track content performance and audience reach.
- Launch tools for submitting requests for interviews or expert commentary.
- Improved Payment System for the Marketplace
- Integrate GNU Taler for secure micropayments and wallet management.
- Federation Architecture
- Establish framework for hosting multiple instances of AiPRESS24.
- Define governance models for federated instances to ensure interoperability.
- Personalized RSS Feeds
- Enable users to generate personalized RSS feeds for curated content distribution.
- Advanced Security Features
- Implement data encryption for sensitive information and enhance user role management.
- Develop GDPR-compliant privacy settings for data storage and sharing.
- AI-Powered Content Insights
- Deploy AI tools to provide trend analysis, topic suggestions, and content recommendations.
- Implement NLP-based tools for summary generation and keyword extraction.
- Enhanced Marketplace Features
- Launch custom workflows for agencies managing large volumes of content.
- Introduce modules for pricing and payment tracking with GNU Taler.
- Custom API for Third-Party Tools
- Release API endpoints for integrating external tools (e.g., newsroom software, analytics platforms).
- Certification and Badging
- Implement “Source Agency” and “Certified Author” badges to verify content authenticity.
- Align certifications with Journalism Trust Initiative (JTI) standards.
- Multimedia Content Expansion
- Introduce support for podcasts, video content, and interactive visualizations.
- Enable monetization and licensing of multimedia formats on the marketplace.
- Event Scheduling Module
- Launch event tools for managing press conferences, interviews, and live streams.
- Federated Governance
- Formalize federated governance structure, with committees for ethics, development, and community feedback.
- Develop dashboards for instance administrators to monitor performance and compliance.
- Localization and Regional Adaptations
- Roll out support for multilingual interfaces and localized content recommendations.
- Deploy region-specific adaptations of payment systems, including GNU Taler integrations.
- Global Scaling
- Support the creation and management of new federated instances in key global regions.
- Develop automated tools for onboarding local administrators and partners.
- Open Plugin Ecosystem
- Introduce plugin support for extending platform features, based on frameworks like Pluggy.
- Provide SDK and documentation for developers to create custom extensions.
- Advanced Analytics and Reporting
- Enable organizations to generate detailed reports on engagement, financial performance, and IRP metrics.
- Full ActivityPub Integration
- Complete integration of ActivityPub for seamless inter-instance and inter-platform content sharing.
- Social Graph and Networking
- Build a professional social graph for networking between journalists, PR professionals, and organizations.
- Add tools for tracking professional connections and collaboration history.
- Accessibility Improvements
- Enhance accessibility features, including WCAG-compliant UI improvements.
Join our growing community of contributors and users! Stay updated and participate in discussions:
- Discussions: Participate in discussions on our GitHub repository and share your feedback, or join the Aipress24.com community as a "Transformer" (when the platform is open).
- Meetups: Attend our virtual meetups and webinars to learn more about Aipress24 and how you can contribute.
Aipress24 is licensed under the AGPL-3.0 License, except for vendored code. See the LICENSE file for more information.
Here is the REUSE summary as of 2024/06/17:
- Bad licenses: 0
- Deprecated licenses: 0 >
- Licenses without file extension: 0
- Missing licenses: 0
- Unused licenses: 0
- Used licenses: MIT, LicenseRef-ARR, ISC, AGPL-3.0-only
- Read errors: 0
- files with copyright information: 2363 / 2363
- files with license information: 2363 / 2363
Congratulations! Your project is compliant with version 3.0 of the REUSE Specification :-)
- Flask
- RQ -> Actually, replaced by Dramatiq
- SQLAlchemy
- Typesense
- Redis
- PostgreSQL
- Scikit-learn
- Spacy
- And also: Gensim, NLTK, Pandas, etc.
Before going into production, you should run:
# Assuming APP_ROOT_URL = URL of a demo or local instance
adt audit
docker run --rm secscan/nikto -h $APP_ROOT_URLSee DEPLOYMENT.md for deployment instructions on cloud platforms or on-premises.
Older instrustions are below.
To deploy Aipress24 to Heroku, you can use the following commands:
heroku create my-aipress24 # Use your own app name
heroku addons:create heroku-postgresql:essential-0
heroku addons:create heroku-redis:mini
# heroku addons:create typesense:free # Not yet available
heroku config:set FLASK_APP=aipress24
heroku config:set FLASK_ENV=production
heroku config:set FLASK_SECRET_KEY=$(openssl rand -hex 16)
heroku config:set FLASK_SQLALCHEMY_DATABASE_URI=$(heroku config:get DATABASE_URL)
heroku config:set FLASK_REDIS_URL=$(heroku config:get REDIS_URL)
# heroku config:set FLASK_TYPESENSE_URL=$(heroku config:get TYPESENSE_URL)
# heroku config:set FLASK_TYPESENSE_KEY=$(heroku config:get TYPESENSE_KEY)
heroku config:set FLASK_MAIL_SERVER=smtp.sendgrid.net
heroku config:set FLASK_MAIL_PORT=587
heroku config:set FLASK_MAIL_USE_TLS=1
heroku config:set FLASK_MAIL_USERNAME=apikey
heroku config:set FLASK_MAIL_PASSWORD=YOUR_SENDGRID_API_KEY
heroku config:set FLASK_MAIL_DEFAULT_SENDER=YOUR_SENDGRID_EMAILThank you for your interest in Aipress24! We are excited to have you join our mission to support journalism and innovation through open-source technology. If you have any questions or need further assistance, please feel free to reach out to us through our community channels.