Skip to content

Releases: TNet-Tech/chacc-api

ChaCC API v1.0.0-beta 5 - CHACC INSTALL COMMAND AND IMPROVEMENTS

Choose a tag to compare

@Jonas1015 Jonas1015 released this 08 Sep 10:17

1.0.0-b5

Update now:

PyPi Package:

pip install --upgrade chacc-api:1.0.0-b5

Docker

docker pull jonas1015/chacc-api:1.0.0-b5

Added

  • chacc install command – Install any ChaCC module from a Git repository or local folder in one step. You can use a full URL, an SSH address, or the short form like TNet-Tech/chacc_outbound. Use --dev to copy the module into the plugins directory for active development, or leave it off to build a production .chacc archive automatically. Supports --ref for branches, tags, and commits, --force to overwrite existing modules, and private repositories via GITHUB_TOKEN, GITLAB_TOKEN, BITBUCKET_TOKEN, or CHACC_GIT_TOKEN. Includes a friendly step-by-step progress display with colored status markers so you always know what is happening. See the CLI install guide for the full reference.

  • Async database support for modules – Modules can now connect to the database without blocking the server. When you create a new module with chacc create, the generated code includes everything needed to run database queries asynchronously.

  • Chacc Outbound module – A new official module for sending emails, SMS, and other messages. It includes automatic retries, delivery status tracking, and a pluggable adapter system (SMTP and console adapters included out of the box). See the Chacc Outbound docs for setup, REST API, and how to write custom adapters.

Fixed

  • Database connections leaking in generated code – The scaffolded get_db dependency now properly closes the database session after each request, preventing connection leaks over time.
  • Docker startup issues – Fixed a problem where the database failed to migrate during startup in production mode.
  • Docker permission errors – Fixed a permission issue that prevented the dependency resolver from writing its cache.
  • PostgreSQL enum migration crashes – Fixed a crash when changing a column from one enum type to another. ChaCC now handles the conversion smoothly through an intermediate step, so enum migrations work without manual SQL.
  • Module loading crashes – Fixed a crash that occurred when some plugins loaded their models in certain orders. The startup process is now more forgiving and handles edge cases gracefully.
  • Migration crashes – Improved how ChaCC reads migration plans from Alembic, eliminating rare crashes during database updates.
  • Code cleanup – Removed unreachable error handling code and eliminated an unnecessary global directory change during archive building, making the install flow easier to follow and safer in multi-threaded environments.

Changed

  • Module name validation enforced in build pathchacc build and the internal build step of chacc install now both normalize module names the same way. This ensures that module names behave consistently whether you are building a package or installing one.

ChaCC API v1.0.0-b4.5 Release Notes

Choose a tag to compare

@Jonas1015 Jonas1015 released this 15 Jul 17:04
d72e715

ChaCC API v1.0.0-b4.5 Release Notes - Theme Improvement, bug fixes and perfomance improvements

Update now:

pip install --upgrade chacc-api

Changed

  • Module naming convention – Module directories now use underscores instead of hyphens (chacc_file_manager instead of chacc-file-manager) to align with Python naming standards and use the standard import system. Module name fields in module_meta.json must also use underscores. Migration required: rename module directories and update metadata.
  • Code formatter – Switched from Black to Ruff. Code is now formatted via ruff format (100-char line length). Use ruff format . to format and ruff format --check . to verify.
  • Documentation workflow – Docs Docker images build/push automatically on release. Manual builds via "build docs" in a commit message (develop/main) or the workflow_dispatch action.
  • Changelog location – Moved to chacc-docs/docs/changelog.md; root CHANGELOG.md removed.
  • ChaCC theme – Custom branding applied to Swagger UI and ReDoc.

Added

  • Manual Docker workflowsdocker-manual.yml (main image) and docker-docs-manual.yml (docs image) for on-demand builds.

Fixed

  • Module loading duplicate class registration – Resolved "Multiple classes found for path" SQLAlchemy errors by unifying discovery and setup phases on the same sys.modules objects, eliminating duplicate registry entries.
  • AutoIncrement Indexed ID – Fixed auto-increment for indexed primary keys from ChaCCBaseModel. Backup your database before upgrading — this is a breaking change.

ChaCC API v1.0.0-b4.2 Release Notes

Choose a tag to compare

@Jonas1015 Jonas1015 released this 02 Jul 19:37
c34078e

Release Date: 2026-07-02
Type: Beta Patch


We're excited to announce the latest beta patch for ChaCC API! This release brings a polished dark‑mode welcome page, a more robust model discovery system, and safer, more reliable migrations. Several critical startup bugs have been squashed, making development and production startups smoother than ever.


What's New

  • Dark‑Mode Welcome Page & Themed Docs – The root endpoint (/) now serves an elegant, dark‑themed landing page featuring the ChaCC teal/navy palette, the project logo, and quick links to Swagger UI, ReDoc, and the chacc.dev documentation.
  • Simplified Model Discovery – Plugin models are now automatically discovered via SQLAlchemy’s declarative metadata. The manual @register_model decorator is no longer required – just inherit from ChaCCBaseModel.
  • Safer Migration Handling – A new dependency resolver and operation executor centralise migration logic. They handle PostgreSQL enum conflicts, validate table dependencies before applying foreign keys, and prevent spurious synthetic migrations on SQLite.

Bug Fixes

  • Fixed a startup crash caused by Multiple classes found for path "User" errors when PLUGIN_AUTO_DISCOVERY=False in development mode.
  • Removed the legacy _model_registry mechanism, eliminating duplicate table registration errors. Model discovery now relies exclusively on SQLAlchemy’s metadata.
  • Corrected SQLite table_exists() behaviour so that existing tables are properly recognised, preventing unnecessary synthetic add_table migrations.
  • Resolved a chicken‑and‑egg problem with audit schema initialisation: audit fields are now applied correctly regardless of service registration order via two idempotent passes.
  • When a module fails to load, it is now marked as disabled in the database – preventing repeated crash loops on restart.
  • Fixed crashes in route logging when module entry‑points had None paths or methods.

Changed

  • Unified Startup Sequence – Development and production modes now share the same loading pipeline: discover models → initialise database → run migrations → load entry points → apply deferred schema changes → optional follow‑up migration.
  • Database Initialisationinitialize_database_models() now discovers tables by enumerating ChaCCBaseModel subclasses, rather than iterating a removed registry.
  • Backward Compatibility – The old register_model() decorator is retained as a no‑op shim, so existing module code continues to work during the transition.

Removed


Upgrade Notes

  • Module Authors: Remove any @register_model decorators from your model classes. Inherit from ChaCCBaseModel as before – the system now discovers models automatically via SQLAlchemy’s declarative metadata.
  • Import Prefixes: Ensure intra‑module imports use the bare module prefix (e.g., from chacc_authentication.module.models.user import User). Mixing plugins.chacc_authentication and bare prefixes can trigger duplicate‑class‑resolution errors.
  • Fresh Start Recommended: If you encountered the startup crash or migration errors in a previous beta, we strongly recommend running migrations fresh after upgrading.

Verify the Update

Start the server with chacc run server and visit http://localhost:8085/ to see the new welcome page in action.


For a complete list of changes, please see the CHANGELOG.md.

BUG FIXES AND DEVELOPER EXPERIENCE IMPROVEMENT - 1.0.0-b4.1

Choose a tag to compare

@Jonas1015 Jonas1015 released this 19 Jun 19:48

[1.0.0-b4.1] - 2026-06-19

Added

  • PostgreSQL enum migration support through alembic-postgresql-enum, including handling for create_enum, sync_enum_values, and drop_enum operations.
  • Migration runner support for Alembic PostgreSQL enum operation objects generated by alembic-postgresql-enum.
  • Automatic enum type creation before adding enum-backed columns or tables in PostgreSQL migrations to prevent UndefinedObject failures.
  • uuid7-based default UUID generation for ChaCCBaseModel, using Python 3.12+ uuid.uuid7 with uuid-utils fallback on older Python versions.
  • uuid-utils runtime dependency for environments without native uuid7 support.
  • SQLITE_DATABASE_NAME and SQLITE_DATABASE_PATH environment variables for custom SQLite database names and storage locations.
  • CHACC_VERBOSE and CHACC_DEBUG environment controls for runtime log level selection.
  • CLI chacc run server -v/--verbose support that now propagates verbose logging into the server subprocess.
  • Docker health checks and exposed ports updated to the current default server port.
  • Production Docker Compose now uses the published Docker Hub image directly instead of local image build comments.

Fixed

  • PostgreSQL migration failures when Alembic detects enum changes by importing and enabling alembic-postgresql-enum hooks.
  • PostgreSQL UndefinedObject crashes when adding enum-backed columns or tables by creating enum types before table/column operations.
  • Migration operation ordering to apply enum creation before tables, columns, constraints, indexes, and enum synchronization.
  • Migration descriptions for enum create, sync, and drop operations.
  • CLI verbose flag propagation so chacc run server -v affects the child server process.
  • Docker and Docker Compose default port mismatch by replacing stale 8080 references with 8085.
  • Alembic log noise by forcing the alembic logger to WARNING.
  • Default logging behavior so normal server runs are quieter while CHACC_VERBOSE and CHACC_DEBUG still enable detailed logs.
  • Repeated logger imports by centralizing default log level detection in get_default_log_level().
  • SQLite database path handling so SQLITE_DB_PATH uses the configured SQLITE_DATABASE_PATH and SQLITE_DATABASE_NAME.

Removed

  • Removed redundant LogLevels.INFO logger setup across server, database, migration, module loader, Redis, health, and environment validation modules.
  • Removed stale Docker 8080 exposed port and health check references.
  • Removed local-build instructions from the production Docker Compose file.

Changed

  • README file has been updated to focus on ChaCC brief intro and link the entire guidance to chacc.dev

ChaCC API v1.0.0-beta.4 - STABILITY RELEASE

Choose a tag to compare

@Jonas1015 Jonas1015 released this 30 May 10:35
d5479d8

[1.0.0-b4] - 2026-05-30

Added

  • Breaking: GUID TypeDecorator for cross-database UUID support (PostgreSQL UUID type / SQLite TEXT storage)
  • SQLite batch operation support for constraints, indexes, and columns via batch_alter_table()
  • Automatic .env file creation from .env.sample on application startup if .env does not exist
  • .env.sample included in package distribution for ready-to-use configuration reference
  • Migration version counter suffix to prevent duplicate migration versions
  • New database engine detection to distinguish PostgreSQL vs other databases

Fixed

  • Breaking: Migration tracker table rollback_available column conversion from BOOLEAN to INTEGER for PostgreSQL, and compatibility for SQLITE
  • Migration runner now uses run_in_executor() for synchronous DB operations to prevent blocking async event loop
  • Made tracker/backup lazy properties to defer DB initialization
  • Catch ProgrammingError/OperationalError for already-existing resources to make migrations idempotent
  • GUID TypeDecorator now returns UUID instances directly without unnecessary conversion
  • Tracker table now filtered from migration detection to prevent accidental drops
  • Resolved requirements.txt path issue for installed package layout

Removed

  • Removed redundant database type conversion in GUID TypeDecorator

Caution: Users migrating to 1.0.0-b4 will need to drop their existing databases and start afresh. The rollback_available column type changed from BOOLEAN to INTEGER, and GUID column changes require a clean schema migration that cannot be automatically applied to existing data.

BUG FIXES AND DEVELOPER EXPERIENCE IMPROVEMENT - 1.0.0-b3.2

Choose a tag to compare

@Jonas1015 Jonas1015 released this 26 May 16:25
5aae5c1

Added

  • Automatic creation of .env.sample if it does not exist on application startup, providing a ready-to-use configuration reference.
  • Included .env.sample in the package distribution to ensure it is available when the package is installed.

Fixed

  • Improved migration engine to be able to distinguish default database vs postgres database accordingly

Module Import Patches

Choose a tag to compare

@Jonas1015 Jonas1015 released this 21 May 12:05
08f50f2

Standardizing the "Home Base":

Instead of every file trying to guess where it is relative to itself, we’ve told the app to always look at the Project Root (BASE_DIR). This ensures the app can always find the "backbone" requirements, no matter where it's installed.

Cleaning up the Math:

Previously, different parts of the app used different "path math" to find files, which led to some "off-by-one" errors (looking one folder too high or too low). We’ve unified this across the plugin loader, the archive system, and the dependency manager.

Reliable Dependencies:

This patch ensures that when you install or enable a module, the app successfully finds the list of libraries it needs to download.

BUG FIXES AND PERFOMANCE IMPROVEMENTS - v1.0.0b3

Choose a tag to compare

@Jonas1015 Jonas1015 released this 20 May 09:49
852ce98

Release Notes - v1.0.0b3

Features

CORS Configuration

  • Add configurable CORS settings via environment variables:
    • CORS_ALLOWED_ORIGINS - comma-separated allowed origins
    • CORS_ALLOW_CREDENTIALS - enable/disable credentials
    • CORS_ALLOW_METHODS - allowed HTTP methods
    • CORS_ALLOW_HEADERS - allowed headers

CLI Server Commands

  • New CLI flags for controlling server mode:
    • chacc run server --dev - Development mode with hot reload (CHACC_DEV_MODE env var no longer used)
    • chacc run server - Production mode without hot reload
  • Removed DEVELOPMENT_MODE environment variable in favor of CLI flags

Bug Fixes

Module Loading & Migrations

  • Fix critical timing issue where plugin setup functions ran before database migrations completed
  • Implement two-phase module loading: first discover models → run migrations → execute setup functions

Redis Startup

  • Disable Redis by default (REDIS_ENABLED=False) to prevent 5-second startup delay
  • Reduce Redis connection timeout from 5s to 2s for faster failure detection
  • Change Redis unavailable log level from error to debug for cleaner output

CLI & Server

  • Fix CLI start server command for production mode
  • Fix start server path resolution
  • Remove DevBackboneContext from CLI scaffold (simplified context factory)
  • Add get_db() async function to context factory for Depends usage

Model Discovery

  • Fix relative import resolution by loading sibling files before __init__.py

Performance

Environment Validation

  • Optimize env_validator to use pre-loaded constants instead of repeated decouple_config() calls
  • Eliminates disk I/O during startup validation

Startup Time

  • Remove backbone test execution from server startup (was blocking initialization)

Configuration Changes

Removed

  • DEVELOPMENT_MODE environment variable (use CLI --dev flag instead)

BUG FIXES AND IMPROVEMENTS (v1.0.0-beta.2)

Choose a tag to compare

@Jonas1015 Jonas1015 released this 19 Mar 07:33

Bug Fixes

  • Authentication: Fixed SECRET_KEY config lookup bug in production - the method now falls back to global config if module-specific config is not found
  • Migration: Fixed PostgreSQL compatibility issues with rollback_available column (use FALSE for PostgreSQL, 0 for SQLite)
  • Migration: Increased version_num column size from VARCHAR(32) to VARCHAR(64) for longer version strings
  • Migration: Skip already applied migrations to prevent duplicate key errors
  • Migration: Skip phantom migrations with unknown table names to prevent false positives
  • Development Server: Fixed import issue in development server starting module

ChaCC API v1.0.0-beta.1 - Initial Beta Release

Choose a tag to compare

@Jonas1015 Jonas1015 released this 12 Mar 19:00

ChaCC API v1.0.0-beta.1 - Initial Beta Release

Highlights

  • First public beta release of ChaCC API
  • Modular FastAPI application with plugin/module system

Features

  • Dynamic module loading system
  • REST API with automatic documentation
  • Database persistence (SQLite/PostgreSQL)
  • Redis support for caching and rate limiting
  • CLI tool for module management

Bug Fixes

  • Test infrastructure improvements
  • GitHub Actions Node.js 24 compatibility

For Testing (v1.0.0-beta.1)

Installation

pip install chacc-api

Quick Start

chacc run server --dev

API Documentation

Visit http://localhost:8080/docs when running

Generate module

chacc create mymodule

module will be generated into plugins/ directory

Build module

chacc build plugins/mymodule

Deploy module

Ensure environment variables are set accordingly

chacc deploy mymodule