Kekay Bundles β€” Hexagonal Architecture SvelteKit App

This project is a modern inventory & product bundling web app built with SvelteKit, using a clean Hexagonal (Ports & Adapters) architecture.

It integrates with:

  • πŸ—„οΈ PostgreSQL (via Drizzle ORM)
  • ☁️ Cloudinary (image uploads)
  • πŸ”’ Secure Argon2 authentication
  • 🎯 Modular domain logic

🧱 Folder Structure

src/
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ core/                     # Business logic (pure, framework-agnostic)
β”‚   β”‚   β”œβ”€β”€ domain/entities/      # Product, Bundle, User, etc.
β”‚   β”‚   β”œβ”€β”€ ports/                # Interfaces (DB, Auth, Cloud, etc.)
β”‚   β”‚   └── use-cases/            # Business logic (register user, add product)
β”‚   β”‚
β”‚   β”œβ”€β”€ infrastructure/           # Implementations of ports
β”‚   β”‚   β”œβ”€β”€ db/drizzle/           # Drizzle ORM + schema + repositories
β”‚   β”‚   └── auth/                 # SessionManager, Argon password hasher
β”‚   β”‚
β”‚   β”œβ”€β”€ adapters/                 # External 3rd-party clients (e.g. Cloudinary)
β”‚   └── shared/                   # (Optional) shared logic/helpers (e.g. config, utils)
β”‚
β”œβ”€β”€ routes/                       # SvelteKit UI layer

🧠 Hexagonal Principles Applied βœ… Core is pure β€” no direct import of SvelteKit, Drizzle, or Cloudinary

βœ… Use-cases are testable β€” they only depend on ports

βœ… Adapters are swappable β€” just implement the ports

βœ… Domain-driven β€” entities are clean and well-typed

πŸ“¦ Tech Stack Frontend: SvelteKit (Svelte 5, Runes)

Backend: PostgreSQL via Drizzle ORM

Auth: Argon2 + Session Cookies

Image Upload: Cloudinary

Hosting: Vercel / SSR compatible

🚧 Coming Next Check out the GitHub issues to see what’s being worked on.

✨ Author Made with πŸ’ͺ by Kevin Coto @thekoto.dev

You can preview the production build with npm run preview.

To deploy your app, you may need to install an adapter for your target environment.

Top categories

svelte logo

Need a Svelte website built?

Hire a professional Svelte developer today.
Loading Svelte Themes