Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
e5a33e6
refactor: abstract database operations into a pluggable engine archit…
codewithmpia May 26, 2026
8eaa107
Add Redis cache & session backend support and update README
codewithmpia May 27, 2026
3732b11
Implement S3 Storage Adapter and Redis-backed Task Queue with tests
codewithmpia May 27, 2026
8842f06
Fix linting issues found by Ruff
codewithmpia May 27, 2026
7f0384b
feat: implement S3 static asset serving and add Redis-backed asynchro…
codewithmpia May 27, 2026
2659eb1
feat: implement ASGI support for Asok and add async ORM methods
codewithmpia May 27, 2026
e2b4399
fix: implement SQLite transaction support and add unit tests
codewithmpia May 27, 2026
776cc0a
Merge branch 'feature/multi-db-backends' into feature/asgi-async-support
codewithmpia May 27, 2026
0d73afd
perf: optimize ASGI async middleware chain to use run_coroutine_threa…
codewithmpia May 27, 2026
1c49795
chore: remove unused aiosqlite dependency from pyproject.toml
codewithmpia May 27, 2026
b16fe93
fix(orm): fix query cache serialization, compound query aggregates, a…
codewithmpia May 27, 2026
83b5260
feat(orm): implement advanced features including nested eager loading…
codewithmpia May 27, 2026
cf77a59
feat: add current_request proxy, context propagation for background t…
codewithmpia May 27, 2026
9960940
docs(readme): update ASGI status β€” implemented, not planned; add ASGI…
codewithmpia May 27, 2026
353bc05
chore: bump project version to 0.3.0 and remove local sqlite database…
codewithmpia May 27, 2026
95496d1
security: comprehensive security audit and XSS fixes for v0.3.0
codewithmpia Jun 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ env/

# Logs
*.log

db.sqlite3
:memory:
75 changes: 51 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ admin = Admin(app)
- ⛓️ **Dynamic Routes** - Parameters via `[id]`, `[slug:slug]` patterns

### Database & ORM
- πŸ—„οΈ **Built-in ORM** - SQLite with relations, migrations, soft deletes
- πŸ” **Full-Text Search** - FTS5 integration for lightning-fast search
- πŸ—„οΈ **Built-in ORM** - SQLite (default), PostgreSQL, and MySQL support with relations, migrations, soft deletes
- πŸ” **Full-Text Search** - FTS5/FULLTEXT integration for lightning-fast search
- πŸ” **Auto Password Hashing** - PBKDF2-SHA256 with **600,000 iterations**
- πŸ“Š **Query Builder** - Fluent API with eager loading

Expand Down Expand Up @@ -117,12 +117,26 @@ Asok doesn't aim to replace existing frameworksβ€”it offers a different approach
## πŸ› οΈ Installation & Setup

### 1. Installation
You can install Asok via pip:
By default, Asok has zero external dependencies and works out of the box with SQLite:

```bash
pip install asok
```

If you wish to use optional database engines or the Redis backend (for caching and sessions), install the corresponding extra(s):

```bash
# Optional database engines & capabilities
pip install "asok[postgres]"
pip install "asok[mysql]"
pip install "asok[redis]"
pip install "asok[async]"

# Combined extras (e.g. Postgres + Redis)
pip install "asok[postgres,redis]"

```

or clone the repo and use the `asok/` folder.

### 2. Create a project
Expand Down Expand Up @@ -264,9 +278,14 @@ The admin automatically detects the source of resources:
---

## πŸš€ Towards Production
Asok is WSGI compatible. You can use Gunicorn or any other WSGI server:
Asok supports both **WSGI** and **ASGI**. Use Gunicorn for WSGI or Uvicorn for ASGI:

```bash
# WSGI (Gunicorn)
gunicorn wsgi:app

# ASGI (Uvicorn) β€” for async/await support
uvicorn asgi:app
```

---
Expand Down Expand Up @@ -373,41 +392,49 @@ Thanks to all our amazing contributors! πŸŽ‰

Asok is actively developed with exciting features planned:

**v0.2.0** - Enterprise Features
- PostgreSQL & MySQL support
- Advanced ORM relationships (many-to-many improvements)
- WebSocket rooms for real-time collaboration
- Background job queue system
- Plugin ecosystem & CLI enhancements

**v0.3.0** - Modern Stack
- GraphQL API support with auto-generated schemas
- Server-side rendering (SSR) & static site generation
- Built-in monitoring & observability tools
- Full async/await support (ASGI)
**v0.3.0** - Enterprise Ready βœ… **Released June 2026**
- **Async/ASGI**: Full async/await support with ASGI/WSGI dual engine
- **Multi-DB**: PostgreSQL & MySQL with connection pooling, vector search
- **Advanced ORM**: Polymorphic relations, self-referencing, nested eager loading, N+1 detection
- **WebSocket Rooms**: Multi-user collaboration with room broadcasting
- **Redis**: Caching, sessions, cache warming, fragment caching
- **Cloud**: AWS S3 storage integration
- **Background Jobs**: `asok worker` for async task processing
- **Admin Enhancements**: Inline editing, advanced filtering, saved presets, column customization
- **VSCode Extension**: Syntax highlighting, IntelliSense, snippets, route navigation
- **Localization**: Translation management UI and automatic string extraction
- **Query Optimization**: N+1 detection, query analysis, index suggestions, slow query logging

**v0.4.0** - GraphQL & Scale (Planned Q4 2026)
- GraphQL API with auto-generated schemas and subscriptions
- Advanced WebSocket features (presence, permissions, private messages)
- Multi-database scaling (read replicas, sharding, load balancing)
- Plugin ecosystem for third-party extensions
- Built-in monitoring & observability (Prometheus/Grafana)
- Advanced SSR & hydration (islands architecture, SSG, ISR)

**Note:** Timelines are subject to change based on community feedback and development priorities.

---

## 🏭 Production Status

Asok v0.1.x is **early-stage software** under active development. It's suitable for:
Asok v0.3.0 is **actively developed software** with growing production adoption. It's suitable for:

**βœ… Recommended for:**
- Personal projects and MVPs
- Production web applications and APIs
- Internal tools and admin dashboards
- Personal projects and MVPs
- Rapid prototyping and experimentation
- Learning full-stack Python development
- Projects where dependency auditing is critical
- Projects requiring zero runtime dependencies
- Applications where dependency auditing is critical

**⚠️ Current Limitations:**
- **Database**: SQLite only (PostgreSQL/MySQL planned for v0.2.0)
- **Concurrency**: WSGI only, no async/await yet (ASGI planned for v0.3.0)
- **Ecosystem**: Early-stage community, limited third-party plugins
- **Maturity**: v0.1.x - APIs may evolve before v1.0
- **Ecosystem**: Growing community, limited third-party plugins
- **Maturity**: v0.3.x - APIs are stabilizing but may evolve before v1.0

**For mission-critical production applications**, consider your specific requirements and evaluate if Asok's current feature set meets your needs.
**For mission-critical production applications**, Asok v0.3.0 provides enterprise features (async, multi-DB, Redis, S3) suitable for production workloads. Evaluate if the current feature set meets your specific requirements.

---

Expand Down
174 changes: 84 additions & 90 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,47 @@ This roadmap outlines the planned features and improvements for upcoming Asok re

## Current Stable Release

### v0.3.0 (Released: June 2026)

**Status**: βœ… Stable

Modern async stack, enterprise database support, and developer tooling:

**Core Framework:**
- **Async/ASGI Support**: Full async/await support with ASGI/WSGI dual engine, async middlewares, and non-blocking database queries
- **Multi-Database Support**: PostgreSQL and MySQL backends with connection pooling, cross-engine migrations, and config-driven DB binds
- **Redis Integration**: Native Redis support for caching, session persistence, cache warming, and fragment caching
- **Cloud Storage**: AWS S3 file storage with automatic mime-type detection
- **Background Jobs**: `asok worker` command for background task processing with Redis resilience
- **Database Fixtures**: New `asok dumpdata` and `asok loaddata` CLI commands for data seeding

**Advanced ORM:**
- **Polymorphic Relationships**: MorphTo/MorphMany for flexible model associations
- **Self-Referencing Relationships**: Models can reference themselves (parent/child hierarchies)
- **Nested Eager Loading**: Prevent N+1 queries with deep relation loading
- **Custom Relationship Types**: Extensible relationship system
- **Vector Similarity Search**: Built-in support for embedding-based search (PostgreSQL pgvector)
- **Query Optimization Tools**: N+1 detection in development, query plan analysis, automatic index suggestions, slow query logging

**Real-Time Features:**
- **WebSocket Rooms**: Room-based broadcasting with join/leave for multi-user collaboration

**Admin Panel Enhancements:**
- **Inline Editing**: Quick updates without full page navigation
- **Advanced Filtering**: Date ranges, multi-field filters, saved filter presets
- **Column Customization**: Toggle column visibility for personalized views

**Developer Experience:**
- **VSCode Extension**: Official IDE integration with syntax highlighting, IntelliSense, template autocompletion, route navigation, and snippets
- **Localization Tools**: Translation management UI and automatic string extraction for i18n
- **Query Debugging**: Built-in tools for identifying and fixing performance issues

[View Full Changelog](https://github.com/asok-framework/asok-docs/blob/main/CHANGELOG.md)

---

## Previous Releases

### v0.1.7 (Released: May 2026)

**Status**: βœ… Stable
Expand All @@ -15,47 +56,42 @@ Framework refactoring and architecture overhaul for long-term maintainability:
- **Asset Compilation**: Pre-compiled minified assets for admin, API, and developer toolbar. Added official Python 3.13 support.
- **Enhanced Test Coverage**: Added dedicated suites for AJAX CSRF rotation, SPA reactivity fixes, developer toolbar, and API static files.


[View Full Changelog](https://github.com/asok-framework/asok-docs/blob/main/CHANGELOG.md)

---

## Upcoming Releases

### v0.2.0 - Enterprise Features (Q2 2026)
### v0.4.0 - GraphQL & Enterprise Scale (Q4 2026)

**Status**: 🚧 In Progress
**Status**: πŸ“‹ Planned

#### Database & ORM
#### API & GraphQL

- **PostgreSQL & MySQL Support** - Multi-database backend support beyond SQLite
- PostgreSQL support with JSONB, Arrays, and advanced types
- MySQL/MariaDB support with full compatibility
- Connection pooling and transaction management
- Migration compatibility layer
- Database switching via configuration
- Unified query builder across all databases
- **GraphQL Support** - Modern API development
- Built-in GraphQL server
- Auto-generated schema from models
- Query complexity analysis
- GraphQL playground in development
- Subscriptions via WebSockets

- **Advanced Relationships** - Enhanced ORM capabilities
- Polymorphic relationships (morphTo/morphMany)
- Self-referencing relationships
- Nested eager loading optimization
- Query scopes and global scopes
- **API Versioning** - Professional API management
- URL-based versioning (/api/v1/, /api/v2/)
- Header-based versioning
- API deprecation warnings and sunset headers
- Version negotiation and content-type versioning

#### Real-time & Background Jobs
#### Enterprise & Scalability

- **WebSocket Rooms** - Multi-user real-time collaboration
- Room-based message broadcasting
- User presence tracking
- **Advanced WebSocket Features** - Enhanced real-time capabilities
- User presence tracking and status updates
- Room permissions and authentication
- Private messaging support
- Private messaging and direct messages
- Typing indicators and read receipts

- **Job Queue System** - Background task processing
- Redis/SQLite-based queue backends
- Delayed job execution
- Job retry with exponential backoff
- Job status monitoring and logging
- Priority queues
- **Multi-Database Scaling** - Horizontal scaling
- Read replicas configuration
- Sharding strategies for large datasets
- Multi-region database support
- Automatic read/write load balancing

#### Developer Experience

Expand All @@ -65,72 +101,26 @@ Framework refactoring and architecture overhaul for long-term maintainability:
- Plugin configuration API
- Official plugin registry

- **CLI Enhancements** - Improved developer tools
- **CLI Enhancements** - Advanced developer tools
- Performance profiling tools (flame graphs, memory usage)
- Database introspection commands (show schema, explain queries)
- Asset pipeline optimization (automatic sprite generation)
- Environment management (config validation, secrets vault)

- **VSCode Extension** - Official IDE integration
- Syntax highlighting for Asok templates
- IntelliSense for template tags and filters
- Model field autocompletion
- Route navigation and URL reverse lookup
- Built-in snippets for common patterns
- **VSCode Extension Enhancements** - Advanced IDE features
- Debug configuration templates
- Live preview for templates
- Integrated test runner
- Visual database schema browser

#### Admin Interface

- **Admin UI Improvements** - Enhanced administration experience
- Inline editing for quick updates
- Drag-and-drop file uploads with progress
- Advanced filtering with date ranges
- Column visibility customization
- Saved filter presets
- Dashboard widgets and statistics

---

### v0.3.0 - Modern Stack (Q3 2026)

**Status**: πŸ“‹ Planned

#### API & GraphQL

- **GraphQL Support** - Modern API development
- Built-in GraphQL server
- Auto-generated schema from models
- Query complexity analysis
- GraphQL playground in development
- Subscriptions via WebSockets

- **API Versioning** - Professional API management
- URL-based versioning (/api/v1/, /api/v2/)
- Header-based versioning
- API deprecation warnings and sunset headers
- Version negotiation and content-type versioning

#### Performance & Scalability
#### Performance & Rendering

- **Advanced SSR & Hydration** - Enhanced rendering strategies
- Hybrid rendering (SSR + Client-side hydration)
- Selective/Partial hydration for islands architecture
- Static site generation (SSG) for marketing pages
- Incremental static regeneration (ISR)

- **Multi-Database Support** - Horizontal scaling
- Read replicas configuration
- Sharding strategies
- Connection pooling per database
- Load balancing

- **Async/Await Support** - ASGI compatibility
- Full async request handling
- Async ORM queries
- Async middleware support
- WebSocket async handlers

#### Monitoring & Observability

- **Built-in Monitoring** - Production-ready observability
Expand All @@ -140,17 +130,21 @@ Framework refactoring and architecture overhaul for long-term maintainability:
- Health check endpoints
- Integration with Prometheus/Grafana

- **Query Optimization** - Automatic performance tuning
- N+1 query detection in development
- Query plan analysis
- Automatic index suggestions
- Slow query logging
#### Admin Interface

- **Admin Dashboard Enhancements** - Advanced administration features
- Drag-and-drop file uploads with progress
- Dashboard widgets and statistics
- Batch operations interface
- Advanced export/import tools

---

---

## Long-term Vision (2027+)

### v0.4.0 and Beyond
### v0.5.0 and Beyond

These features are under consideration based on community feedback:

Expand Down Expand Up @@ -193,9 +187,9 @@ Check [GitHub Discussions](https://github.com/asok-framework/asok/discussions) f
| v0.1.4 | May 9, 2026 | βœ… Released | DX & Advanced UI |
| v0.1.6 | May 15, 2026 | βœ… Released | Security & UI Transitions |
| v0.1.7 | May 25, 2026 | βœ… Released | Architecture Overhaul |
| v0.2.0 | June 2026 | 🚧 In Progress | Enterprise Features |
| v0.3.0 | September 2026 | πŸ“‹ Planned | Modern Stack |
| v0.4.0 | Q1 2027 | πŸ’­ Conceptual | Advanced Features |
| v0.3.0 | June 1, 2026 | βœ… Released | Async & Multi-DB Support |
| v0.4.0 | Q4 2026 | πŸ“‹ Planned | Advanced Features |
| v0.5.0 | Q2 2027 | πŸ’­ Conceptual | Enterprise Scale |

**Note**: Dates are approximate and subject to change based on community priorities and development capacity.

Expand Down Expand Up @@ -223,6 +217,6 @@ We maintain backward compatibility within major versions and provide clear upgra

---

**Last Updated**: May 25, 2026
**Last Updated**: June 1, 2026

For the most up-to-date information, check the [GitHub Projects board](https://github.com/asok-framework/asok/projects).
3 changes: 2 additions & 1 deletion asok/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import sys

__version__ = "0.1.7"
__version__ = "0.3.0"

# Disable bytecode generation (__pycache__) by default to keep the file-system based routing clean.
# Can be overridden by setting ASOK_WRITE_BYTECODE=true in the environment.
Expand All @@ -15,6 +15,7 @@
from .cache import Cache as Cache
from .cache import cache_page as cache_page
from .component import Component as Component
from .context import current_request as current_request
from .core import Asok as Asok
from .exceptions import (
AbortException as AbortException,
Expand Down
Loading