Skip to content

Feat: Implement Session and Stateless Session subsystems #21

@3m1n3nc3

Description

@3m1n3nc3

Background: Applications require both standard session management (stateful, server-backed) and stateless session alternatives (signed cookies, token-based).

Tasks:

  • Create a new package [@h3ravel/session] in the framework/packages directory
  • Design base Session interface/contract (get/set/forget/regenerate).
  • Implement a stateful session driver (e.g., in-memory + file + DB driver).
  • Implement a stateless driver (signed cookies or JWT-backed).
  • Provide configuration for driver selection and driver options.
  • Add middleware to inject session into HTTP requests/responses.
  • Unit and integration tests for both drivers and middleware.
  • Document session lifecycle and config in the guide directory of the website repo.

Acceptance criteria:

  • App can switch session.driver = 'stateless' | 'stateful' in config.
  • Stateless driver signs/encrypts session payload and validates on each request.
  • Tests show session persistence and regeneration behavior.
  • Interface mirrors laravel as much as possible, creating the familiar DX while also adding it own unique twists and turns.

Difficulty: large

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions